Art*_*hur 6 javascript video-streaming http-live-streaming m3u8 hls.js
问题:
我正在努力向网址添加查询参数。?md5=<string>&expires=<number>
我想为每个请求网址(m3u8,ts)添加。我听说fetchSetup
很有用,但我没有看到任何例子,有人知道如何解决这个问题吗?
我已经尝试过了,但什么也没发生:
const hlsConfig = {
fetchSetup: (context, initParams) => {
initParams.credentials = 'include';
return new Request(
context.url + '?md5=test123&expires=test123',
initParams
);
}
}
Run Code Online (Sandbox Code Playgroud)
同样的问题video.js
:Appending paramaters to every m3u8 and ts file while Playing live Stream
我们通过修改 window.XMLHttpRequest.prototype.open 来更新 url 来解决这个问题。可能与 xhrSetup 有关(尝试过但没有花太多时间)。
归档时间: |
|
查看次数: |
3006 次 |
最近记录: |