Play m3u8 in the browser

Source: Internet
Author: User

There are two ways to play the m3u8 video address on the browser: the way of the HTML video tag, which is simple to play:

<! DOCTYPE hmtl>

The above code, you directly paste into a index.html, with the Safari browser open can directly broadcast.

However, only safari support is available at this time, and versatility is not good. So you have to use Flash to play, and the second method below. With open source Swfobject.js and two flash components: OSMF and Hlsprovider to play, on the code:

<! DOCTYPE html>  

Through the combination of these three things can be broadcast m3u8, the result is very simple, but for me this to flash layman or search for a long. This code through the browser access to the file is not available, you can afford a Web service such as: Python-m simplehttpserver. Then visit your saved index.html to work.

The result is not very simple. However, in the search, there is no one to provide such a solution, but found a lot of OSMF based on the development of the charge Flash player. Based on these three components, I have also made a simple page, convenient to watch m3u8 video on the internet: m3u8 player

Above several open source project address: http://osmf.org http://osmf.org/dev/2.0gm/StrobeMediaPlayback.html https://github.com/mangui/HLSprovider

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.