Ott 1833 player on ios (#544)
* fix(1833): conditionally apply aspect ratio styles * fix(1833): removed redundant component * chore(1833): added fr to prod builds * fix(1833): send token in cookie on iOSkeep-around/af30b88d367751c9e05a735e4a0467a96238ef47
parent
84aa4cc7ed
commit
b681fa3fd6
@ -1,13 +1,19 @@ |
||||
import Hls from 'hls.js' |
||||
|
||||
import { readToken } from 'helpers/token' |
||||
import { isIphone } from 'config/userAgent' |
||||
|
||||
export const streamConfig: Partial<Hls.Config> = { |
||||
liveSyncDuration: 30, |
||||
maxBufferLength: 30, |
||||
xhrSetup: (xhr, urlString) => { |
||||
const url = new URL(urlString) |
||||
url.searchParams.set('access_token', readToken() || '') |
||||
xhr.open('GET', url.toString()) |
||||
if (isIphone) { |
||||
// eslint-disable-next-line no-param-reassign
|
||||
xhr.withCredentials = true |
||||
} else { |
||||
const url = new URL(urlString) |
||||
url.searchParams.set('access_token', readToken() || '') |
||||
xhr.open('GET', url.toString()) |
||||
} |
||||
}, |
||||
} |
||||
|
||||
Loading…
Reference in new issue