diff --git a/assets/css/components/posts/ui.css b/assets/css/components/posts/ui.css index 23c9c036..f8fcf51e 100644 --- a/assets/css/components/posts/ui.css +++ b/assets/css/components/posts/ui.css @@ -17,6 +17,10 @@ } .post .post-video { + text-align: center; +} + +.post .post-video video { max-width: 100%; height: 300px; } diff --git a/assets/js/components/posts/ui.js b/assets/js/components/posts/ui.js index 6c482ca0..17eb5cfc 100644 --- a/assets/js/components/posts/ui.js +++ b/assets/js/components/posts/ui.js @@ -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", "");