This commit is contained in:
parent
24d9a945b3
commit
c2bcc86527
12 changed files with 252 additions and 83 deletions
|
|
@ -127,7 +127,7 @@
|
|||
const sources = [
|
||||
{
|
||||
type: 'hls',
|
||||
file: `${proto}://${host}:${STREAM_PORT}/app/${actualStreamKey}/llhls.m3u8?token=${viewerToken}`,
|
||||
file: `${proto}://${host}:${STREAM_PORT}/app/${actualStreamKey}/llhls.m3u8?token=${encodeURIComponent(viewerToken)}`,
|
||||
label: 'LLHLS'
|
||||
}
|
||||
];
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
// Only add token if not already present (segments don't have it)
|
||||
if (viewerToken && url.includes('/app/') && !url.includes('token=')) {
|
||||
const separator = url.includes('?') ? '&' : '?';
|
||||
xhr.open('GET', url + separator + 'token=' + viewerToken, true);
|
||||
xhr.open('GET', url + separator + 'token=' + encodeURIComponent(viewerToken), true);
|
||||
}
|
||||
xhr.withCredentials = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue