picssel / mp4-videos-mediaelement-fancybox

Play (mp4) videos with mediaelement.js in fancyBox
MIT License
4 stars 3 forks source link

Webm support ? #2

Open Rob75018 opened 10 years ago

Rob75018 commented 10 years ago

Hi,

would it be possible to set up a mp4 and webm support in mediaelement/fancybox ? I tried to...but no result.

Thanks !

Rob75018 commented 10 years ago

First (half weird, half dumb) solution :

 this.content = "<video id='video_player' poster='" + _videoPoster + "' width='" + _videoWidth + "' height='" + _videoHeight + "'  controls='controls' > <source src='" + _videoHref + ".mov'/>  <source src='" + _videoHref + ".mp4'/> <source src='" + _videoHref + ".webm'/> </video>"; 

with no extension on the video file :

<a class="fancy_video" href="path/video"  >
<h1>Something</h1>
<img src="path/img.something"/></a

Works, but no support yet for .mov files. Don't know why...

picssel commented 10 years ago

I replied to your post at stackoverflow : http://stackoverflow.com/a/26766263/1055987

For browser and device support, check http://mediaelementjs.com/#howitworks

(notice .mov is not included)