Shaka loggin
This commit is contained in:
parent
9191a06600
commit
0e9ac4d125
@ -229,6 +229,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!nativeRef.current || rate === undefined) {
|
if (!nativeRef.current || rate === undefined) {
|
||||||
|
console.log("Not starting shaka yet bc undefined")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (shakaPlayerRef.current) {
|
if (shakaPlayerRef.current) {
|
||||||
@ -246,13 +247,14 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
console.log("Initializing and attaching shaka")
|
||||||
shakaPlayerRef.current.attach(nativeRef.current, true);
|
shakaPlayerRef.current.attach(nativeRef.current, true);
|
||||||
if (source) {
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
shakaPlayerRef.current.load(source?.uri).then(
|
shakaPlayerRef.current.load(source?.uri).then(
|
||||||
() => console.log(`${source?.uri} finished loading`)
|
() => console.log(`${source?.uri} finished loading`)
|
||||||
);
|
);
|
||||||
}
|
console.log("STarted shaka loading");
|
||||||
}, [source])
|
}, [source])
|
||||||
|
|
||||||
useMediaSession(source?.metadata, nativeRef, showNotificationControls);
|
useMediaSession(source?.metadata, nativeRef, showNotificationControls);
|
||||||
|
Loading…
Reference in New Issue
Block a user