使用m3u8播放列表播放分段的hls流 [英] Playback of segmented hls stream with m3u8 playlist

查看:541
本文介绍了使用m3u8播放列表播放分段的hls流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mediaelement播放器可以播放在m3u8播放列表中定义的分段的mpegts hls流吗?如果可以,则可以显示执行此操作的代码.就我而言,网络服务器上有一个test.m3u8播放列表:

Can mediaelement player play a segmented mpegts hls stream defined in an m3u8 playlist and if so could you show the code to do this. In my case there is a test.m3u8 playlist on a webserver:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:7291
#EXTINF:12,
test-7291.ts
#EXTINF:12,
test-7292.ts
#EXTINF:12,
test-7293.ts
#EXTINF:12,
test-7294.ts
#EXTINF:12,
test-7295.ts
#EXTINF:12,
test-7296.ts
#EXTINF:12,
test-7297.ts
#EXTINF:12,
test-7298.ts
#EXTINF:12,
test-7299.ts
#EXTINF:12,
test-7300.ts

iOS设备可以毫无问题地观看实时流.

iOS devices can view the live stream with no problems.

推荐答案

您需要在库中进行一些更改.您可以查看我的更改.通过仅以受支持的格式添加m3u8,它似乎可以完美运行. https://github.com/sourcebits-harshitakasera/mediaelement-and-player-v2 看来对我有用.

You need to make some changes in the library. You can check out my changes. By just adding m3u8 in the supported formats it seems to work perfectly. https://github.com/sourcebits-harshitakasera/mediaelement-and-player-v2 It seems to work for me.

这篇关于使用m3u8播放列表播放分段的hls流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆