Merge d43227d2de3d67925b92b980d913e5fa352237e2 into f0323731dd3007c65a5cf940837ab41d96ddc940

This commit is contained in:
Mahlangu 2024-10-10 08:14:32 -07:00 committed by GitHub
commit 729afec9ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}`;
}