-- experiment with forcefully closing the session on dispose
This commit is contained in:
parent
42a8f3180d
commit
561ed0ea23
1 changed files with 4 additions and 0 deletions
|
@ -267,6 +267,10 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
|
|
||||||
const player = playerRef.current;
|
const player = playerRef.current;
|
||||||
if (player) {
|
if (player) {
|
||||||
|
try {
|
||||||
|
window.cast.framework.CastContext.getInstance().getCurrentSession().endSession(false);
|
||||||
|
} catch {}
|
||||||
|
|
||||||
player.dispose();
|
player.dispose();
|
||||||
window.player = undefined;
|
window.player = undefined;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue