mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Added YouTube posts
This commit is contained in:
parent
2fc57b40ab
commit
0e18bdf154
@ -23,4 +23,9 @@
|
||||
|
||||
.post .post-pdf {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.post .post-youtube {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
@ -124,6 +124,23 @@ ComunicWeb.components.posts.ui = {
|
||||
|
||||
}
|
||||
|
||||
//In case of YouTube video
|
||||
else if(infos.kind == "youtube"){
|
||||
|
||||
//Create iframe
|
||||
var youtube_iframe = createElem2({
|
||||
appendTo: postRoot,
|
||||
type: "iframe",
|
||||
class: "post-youtube",
|
||||
src: "https://www.youtube-nocookie.com/embed/"+infos.file_path+"?rel=0"
|
||||
});
|
||||
youtube_iframe.setAttribute("frameborder", 0);
|
||||
youtube_iframe.setAttribute("gesture", "media");
|
||||
youtube_iframe.setAttribute("allow", "encrypted-media");
|
||||
youtube_iframe.setAttribute("allowfullscreen", "");
|
||||
|
||||
}
|
||||
|
||||
//In case of PDF
|
||||
else if(infos.kind == "pdf"){
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user