3

I'm looking for the right way to embed the mediaelement.js player.

I have to add the player dynamically because I don't know the URL of the video at the beginning. The video will always be a MP4-video. How can I make sure that every browser uses the right player/plugin to be able to display the video? Current versions of Firefox for example can playback HTML5 video but it doesn't support MP4 - in this case the HTML5-video with flash fallback works but what about silverlight? I want to make sure that I'm doing this the right way (JS-only or jQuery-based doesn't matter).

Philipp Kyeck
  • 18,402
  • 15
  • 86
  • 123
  • I'm new to mediaelement too and currently looking at putting it into a corporate website. All of your questions can be answered by reading the documentation! http://mediaelementjs.com/ – Kevin Brydon Feb 22 '13 at 15:58
  • @KevinBrydon no, sadly not. I did read the docs but couldn't find the answer I was looking for. If you got the answer, please post it ... – Philipp Kyeck Feb 22 '13 at 16:04

1 Answers1

-1

MediaElement (and all other html5 video wrappers) is designed to take all this worry away. If a clients browser supports html5 video but not mp4 natively (as is the case with all browsers except IE9+ and Safari) then it will try to play the mp4 using the flash player.

You may wish to encode your videos is other formats such as ogv or webm to enable other browsers to use their native html5 functionality.

The documentation can be found on the mediaelement github site.

Kevin Brydon
  • 12,524
  • 8
  • 46
  • 76
  • but as I said in my question - how do I have to setup the HTML and JavaScript for this to work as you described? And what about the silverlight plugin - how does this work? – Philipp Kyeck Feb 22 '13 at 18:15
  • 1
    There's practically no information on the front page of the site, no clear documentation and no good examples on how to do basic things. – Aaria Carter-Weir Aug 15 '18 at 02:34
  • @AariaCarter-Weir the page must have changed since posting the question. I've updated the link as it looks like the documentation is now mostly in the github repository. I should have probably added a code example when originally answering the question. – Kevin Brydon May 26 '20 at 07:42