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.
17 lines
438 B
17 lines
438 B
import type { HlsConfig } from 'hls.js'
|
|
|
|
import { readToken } from 'helpers/token'
|
|
|
|
export const streamConfig: Partial<HlsConfig> = {
|
|
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
|
|
|