mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
refactor: update vjs onRequst to onRequest
This commit is contained in:
parent
cf237c2923
commit
d43227d2de
@ -36,9 +36,9 @@ export const VideoJS: FC<VideoJSProps> = ({ options, onReady }) => {
|
||||
) {
|
||||
(
|
||||
videojs.getPlayer(videoRef.current).tech({ IWillNotUseThisInPlugins: true }) as any
|
||||
).vhs.xhr.beforeRequest = o => {
|
||||
).vhs.xhr.onRequest = o => {
|
||||
if (o.uri.match('m3u8')) {
|
||||
const cachebuster = Math.random().toString(16).substr(2, 8);
|
||||
const cachebuster = Math.random().toString(16).slice(2, 8);
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
o.uri = `${o.uri}?cachebust=${cachebuster}`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user