Improved video rendering

This commit is contained in:
Pierre 2018-01-04 17:16:27 +01:00
parent 1fdb576318
commit 6ab0c8fff1
2 changed files with 12 additions and 2 deletions

View File

@ -17,6 +17,10 @@
}
.post .post-video {
text-align: center;
}
.post .post-video video {
max-width: 100%;
height: 300px;
}

View File

@ -107,11 +107,17 @@ ComunicWeb.components.posts.ui = {
//In case of video
else if(infos.kind == "movie"){
var videoContener = createElem2({
appendTo: postRoot,
type: "div",
class: "post-video"
});
//Create video element
var video = createElem2({
appendTo: postRoot,
appendTo: videoContener,
type: "video",
class: "video-js vjs-default-skin post-video"
class: "video-js vjs-default-skin"
});
video.setAttribute("controls", "");