xgplayer
xgplayer copied to clipboard
hls地址解析bug
您使用的西瓜播放器版本是多少? What version of xgplayer are you using? xgplayer: 2.31.4 xgplayer-hls: 2.5.1
您使用的操作系统和浏览器分别是? What OS and browser are you using? chrome, mac os
如何复现问题? What did you do? 在 演示地址里 https://v2.h5player.bytedance.com/examples/ 播放hls 视频地址: 下面地址 https://video.yunjilink.com/recordings/z1.yunji-live.5f1f8f79d384c73704e272bb/1596092571_1596095882.m3u8
实际播放器的表现是? What actually happened? 通过 hls.js 播放 ok 通过西瓜hls 播放 失败
从日志看 ts 的解析有点问题 将地址 “http://video.yunjilink.com/fragments/z1.yunji-live.5f1f8f79d384c73704e272bb/1596092565888-1596092574222.ts” 错误的解析成 “http://video.yunjilink.com/recordings/z1.yunji-live.5f1f8f79d384c73704e272bb/fragments/z1.yunji-live.5f1f8f79d384c73704e272bb/1596092565888-1596092574222.ts”
m3u8 的 ts 地址解析有点问题。请问如何解决此问题。 谢谢
我看到 包 xgplayer-helper-transmuxers 的 lib/hls/m3u8.js中 ts url 匹配有问题。 https://zhuanlan.zhihu.com/p/358217465
下面的这段代码 解析有点武断
if (nextline.match(/.*:\/\/.*/)) {
var isHTTPS = M3U8Parser.isHTTPS;
if ((M3U8Parser.envisHttps || (M3U8Parser.envisHttps = isHTTPS(window.location.href))) && !isHTTPS(nextline)) {
nextline = nextline.replace('http:', 'https:');
}
frag.url = nextline;
} else {
frag.url = baseurl + nextline;
}
已经修复,请使用xgplayer-hls 2.5.2版本
已经修复,请使用xgplayer-hls 2.5.2版本
没有解决,key的加载同样存在地址判断问题,m3u8文件的key如果是相对路径,会直接用location加载,而不是source url
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue has been automatically closed after a period of inactivity. If it is still present in the latest release, please create a new issue with up-to-date information. Thank you!