开发者

Using fullscreen from a pop up with MediaElementJS

I am currently trying to use MediaElement by launching a Colorbox pop up. The video plays inside the lightbox and all is good. However if I try to use the fullscreen icon the video only fills the pop up window instead of the full screen. I am launching the popup using the inline attribute from colorbox that looks like:

$(".colorboxInline").colorbox({width:"610px", height:"395px", inline:true, href:"#inlineVid"});

Any one have any ideas on how to make the video ac开发者_Go百科tually go fullscreen. There is also a CMS under all of this so building seperate pages for each video and using an iFrame is not a good solution.


I was able to display a video that was able to go fullscreen outside the bounds of the colorbox by building the tag inside of the function, like such. I also noted that there was some funky fullscreen behavior until I specified the video size in the video tag.

$('a#videotrigger').colorbox({html:function(){
var tag = '<video id="video" controls="controls" preload="none" width="544" height="304"  src="mysrc.mp4" poster="myposter.jpg"></video>';
$('#videocontainer').html(tag);
createMediaElement(true);
}});

I then put the colorbox inline class and href in my corresponding anchor tag [in my html.]

I'm using the Drupal module, and I'm using MediaElement as a fallback, so the surrounding markup may be different from yours.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜