Playing with video.js ustream m3u8 file streaming

后端 未结 3 2308
时光取名叫无心
时光取名叫无心 2021-02-14 22:13

I have tried to play in a web page a m3u8 file streaming with video.js, But I could not do it, I do not know where the mistake is




        
3条回答
  •  情话喂你
    2021-02-14 22:34

    Instead of type='video/mp4' you need type='application/x-mpegURL'.

    Check also if cross-domain requests are allowed (CORS).

    Hosting Considerations

    Unlike a native HLS implementation, the HLS tech has to comply with the browser's security policies. That means that all the files that make up the stream must be served from the same domain as the page hosting the video player or from a server that has appropriate CORS headers configured. Easy instructions are available for popular webservers and most CDNs should have no trouble turning CORS on for your account.

    Source: https://github.com/videojs/videojs-contrib-hls

    CORS How-To: http://enable-cors.org/server.html

提交回复
热议问题