Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS(m3u8)不支持多级的index吗?试了下报错了Parse playlist error. #69

Open
apm29 opened this issue Aug 16, 2021 · 4 comments

Comments

@apm29
Copy link

apm29 commented Aug 16, 2021

用的demo.html,改成自己的HLS地址,m3u8文件的内容如下:

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=2000000
/playlist/d268a4dbccba639f4dfc457bbb46f1ff.m3u8

错误信息:

goldplay-h265-sdk.js:formatted:399 Error: [GOLDPLAY ERROR:default-1001]0
    at e.value (goldplay-h265-sdk.js:formatted:396)
    at n.<anonymous> (goldplay-h265-sdk.js:formatted:11939)
    at goldplay-h265-sdk.js:formatted:1558
    at Array.forEach (<anonymous>)
    at e.value (goldplay-h265-sdk.js:formatted:1557)
    at n.value (goldplay-h265-sdk.js:formatted:2925)
    at Worker.httpWorker.onmessage (goldplay-h265-sdk.js:formatted:2904) "[message]:" "0" "[args]:" 
(3) ["Parse playlist error.", "data:", e]
0: "Parse playlist error."
1: "data:"
2: e {source: "#EXTM3U\n#EXT-X-STREAM-INF:BANDWIDTH=2000000\n/playlist/d268a4dbccba639f4dfc457bbb46f1ff.m3u8\n", segments: Array(0), _currentSegment: null, discontinuous: false, tags: {…}, …}
length: 3

@yiwen03
Copy link
Contributor

yiwen03 commented Aug 17, 2021 via email

@seven-cm
Copy link

自行修改 getBaseUrl(file) 应该可以支持到

@seven-cm
Copy link

  getBaseUrl(file) {
    const sourceURL = this.options.sourceURL;
    const isAbsolute = file.indexOf("//") > -1;
    if (!isAbsolute) {
      const isAbsoultStart = file.indexOf("/") == 0;
      if (isAbsoultStart) {
        //sourceURL.replace(/^https?://[^/]*/,'$1')
        return sourceURL.match(/^https?:\/\/[^\/]*/g)[0];
      } else {
        const lastSlash = sourceURL.lastIndexOf("/");
        return sourceURL.substr(0, lastSlash + 1);
      }
    }
    return "";
  }

@katfionn
Copy link

katfionn commented Mar 6, 2024

嗯,不支持多级的

------------------ 原始邮件 ------------------ 发件人: apm29 @.> 发送时间: 2021年8月16日 16:49 收件人: goldvideo/h265player @.> 抄送: Subscribed @.***> 主题: 回复:[goldvideo/h265player] HLS(m3u8)不支持多级的index吗?试了下报错了Parse playlist error. (#69) 用的demo.html,改成自己的HLS地址,m3u8文件的内容如下: #EXTM3U #EXT-X-STREAM-INF:BANDWIDTH=2000000 /playlist/d268a4dbccba639f4dfc457bbb46f1ff.m3u8 错误信息: goldplay-h265-sdk.js:formatted:399 Error: [GOLDPLAY ERROR:default-1001]0 at e.value (goldplay-h265-sdk.js:formatted:396) at n.<anonymous> (goldplay-h265-sdk.js:formatted:11939) at goldplay-h265-sdk.js:formatted:1558 at Array.forEach (<anonymous>) at e.value (goldplay-h265-sdk.js:formatted:1557) at n.value (goldplay-h265-sdk.js:formatted:2925) at Worker.httpWorker.onmessage (goldplay-h265-sdk.js:formatted:2904) "[message]:" "0" "[args]:" (3) ["Parse playlist error.", "data:", e] 0: "Parse playlist error." 1: "data:" 2: e {source: "#EXTM3U\n#EXT-X-STREAM-INF:BANDWIDTH=2000000\n/playlist/d268a4dbccba639f4dfc457bbb46f1ff.m3u8\n", segments: Array(0), _currentSegment: null, discontinuous: false, tags: {…}, …} length: 3 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

大佬,什么叫多级,我把demo.html里这个“rateList:”这里块给注释掉了,就切换清晰度那个功能,这个就是你们说的“多级”吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants