You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/features/StreamPlayer/config.tsx

17 lines
424 B

import Hls from 'hls.js'
import { readToken } from 'helpers/token'
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())
},
}
export const REWIND_SECONDS = 5
export const HOUR_IN_MILLISECONDS = 60 * 60 * 1000