iaian7 / mediaboxAdvanced

mediabox displays flash, video, audio, & html content in a modal dialog. Based on Slimbox and the Mootools javascript library.
http://iaian7.com/webcode/mediaboxAdvanced
85 stars 29 forks source link

Native HTML5 video #24

Open Shulyaka opened 9 years ago

Shulyaka commented 9 years ago

Hi

I think the time has come that all modern browsers are now able to play video with built-in players. Please consider the possibility to implement the following code, which I have successfully tested on Firefox (Windows and Linux) and Chrome (Android):

// HTML5 Video } else if (URL.match(/.mp4|.avi|.mts/i)) { mediaType = 'video'; mediaWidth = mediaWidth || options.defaultWidth; mediaHeight = mediaHeight || options.defaultHeight; mediaId = "mediaId_"+new Date().getTime(); // Safari may not update iframe content with a static id. preload = new Element('video', { 'src': URL, 'id': mediaId, 'width': mediaWidth, 'height': mediaHeight, 'frameborder': 0, 'controls': 1 }); startEffect();