Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Renamed and added screenshot
  • Loading branch information
RayTCosgrove committed Jul 24, 2019
1 parent 08978b5 commit 44e424d
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
15 changes: 15 additions & 0 deletions LocalVideoPlayer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
video, input {
display: block;
}

video{
width: 100%;
margin-right: auto;
margin-left: auto;
object-fit: cover;

}

input {
width: 100%;
}
55 changes: 55 additions & 0 deletions MMM-LocalVideoPlayer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Module.register("MMM-LocalVideoPlayer", {
defaults: {},

getStyles: function(){
return ["Chungus.css"];
},

start: function () {},


getDom: function() {

var playSelectedFile = function(){

var file = this.files[0];
var type = file.type;



var fileURL = URL.createObjectURL(file);

var videoNode = document.querySelector('video');
videoNode.src = fileURL;

}

var element = document.createElement("div");

var video = document.createElement("video");
video.autoplay = true;
video.loop = true;
video.controls = true;

var input = document.createElement("input");



input.type = "file";
input.accept = "video/*";

input.addEventListener('change', playSelectedFile, false);


element.appendChild(input);
element.appendChild(video);

return element;

},

notificationReceived: function() {},
socketNotificationReceived: function() {},
})


Binary file added screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 44e424d

Please sign in to comment.