Search code examples
asp.nethtmlvideotagshttp-live-streaming

How to insert HLS video link


I have an HLS link from Vimeo which I want to put into an html5 video tag.

This is the link: http://player.vimeo.com/external/123834994.m3u8?p=high,standard,mobile&s=53a796101334e99bff44f62f9e7a28df

This is the video tag:

<video autoplay muted loop class="bgvid" id="HomeVideoBig">
    <source src="http://player.vimeo.com/external/123834994.hd.mp4?s=8cd812ab0db3a9ce0d256814f9e6dcd8&profile_id=113" type="video/mp4">
</video>

How should I do this? I am using asp.net. I want it to work properly on all browsers.


Solution

  • Use the provided link as src and application/x-mpegURL or vnd.apple.mpegURL for type.

    Please note that HLS is not supported natively on all browsers/devices. On desktop only Safari 6+ has native HLS support. You'll have to use a player which offers Flash fallback. Some players that will work are:

    See more: HLS Device Compatibility