fix(1748): changed sending token from cookie to url param in player (#515)
parent
6bd436b80b
commit
59aa0063dd
@ -1,10 +1,13 @@ |
||||
import Hls from 'hls.js' |
||||
|
||||
import { readToken } from 'helpers/token' |
||||
|
||||
export const streamConfig: Partial<Hls.Config> = { |
||||
liveSyncDuration: 10, |
||||
maxBufferLength: 15, |
||||
xhrSetup: (xhr) => { |
||||
// eslint-disable-next-line no-param-reassign
|
||||
xhr.withCredentials = true |
||||
xhrSetup: (xhr, urlString) => { |
||||
const url = new URL(urlString) |
||||
url.searchParams.set('access_token', readToken() || '') |
||||
xhr.open('GET', url.toString()) |
||||
}, |
||||
} |
||||
|
||||
Loading…
Reference in new issue