mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 09:58:51 +00:00
Integraged VideoJS
This commit is contained in:
parent
715871b5e1
commit
6f3bfaff1e
@ -15,3 +15,8 @@
|
||||
.post .post-image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.post .post-video {
|
||||
max-width: 100%;
|
||||
height: 300px;
|
||||
}
|
@ -100,6 +100,30 @@ ComunicWeb.components.posts.ui = {
|
||||
}
|
||||
}
|
||||
|
||||
//In case of video
|
||||
else if(infos.kind == "movie"){
|
||||
|
||||
//Create video element
|
||||
var video = createElem2({
|
||||
appendTo: postRoot,
|
||||
type: "video",
|
||||
class: "video-js vjs-default-skin post-video"
|
||||
});
|
||||
video.setAttribute("controls", "");
|
||||
|
||||
//Add source
|
||||
var video_src = createElem2({
|
||||
appendTo: video,
|
||||
type: "source",
|
||||
src: infos.video_infos.url
|
||||
});
|
||||
video_src.type = infos.video_infos.file_type;
|
||||
|
||||
//Enable videoJS
|
||||
videojs(video);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
//Log error
|
||||
ComunicWeb.debug.logMessage("Not implemented kind of post: " + infos.kind);
|
||||
|
Loading…
Reference in New Issue
Block a user