How to play any format of media file in the Microsoft's SMF HTML5 Player

448 Views Asked by At

The HTML5 media player of SMF Framework has just a few media codecs like ogg vorbis, and mp4, so is there any way to play a media file of say, flv format or mkv or mp3 format? And also, is there any way with which we can play local media files if the above case is satisfied?

1

There are 1 best solutions below

4
On

Because of the browser support of video codecs in HTML5 Video, you can use only a few codecs in those. Also not all browsers support all video codecs. So you have to provide one H264 video in the mp4 Container (IE, Safari, Chrome) and a Ogg Theora video. You can transcode your Videos with a lot of free desktop tools like this one. You have to provide the different files like that:

<video id="myVideo" class="pf-video" width="480" height="320" controls="controls" poster="../media/bigbuck.png">
    <source src="../media/bigbuck.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
    <source src="../media/bigbuck.ogv" type='video/ogg; codecs="theora, vorbis"' />
</video>

Hope I could help you.