mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Integraged VideoJS
This commit is contained in:
		@@ -14,4 +14,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.post .post-image {
 | 
					.post .post-image {
 | 
				
			||||||
	width: 100%;
 | 
						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 {
 | 
							else {
 | 
				
			||||||
			//Log error
 | 
								//Log error
 | 
				
			||||||
			ComunicWeb.debug.logMessage("Not implemented kind of post: " + infos.kind);
 | 
								ComunicWeb.debug.logMessage("Not implemented kind of post: " + infos.kind);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user