mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-26 12:08:15 +00:00
Safeguard Netflix player session ID lookup in background.js
This commit is contained in:
@@ -1672,7 +1672,8 @@ function installPageApiSeekBridge() {
|
||||
try {
|
||||
if (match.provider === 'netflix') {
|
||||
const videoPlayer = window.netflix?.appContext?.state?.playerApp?.getAPI?.().videoPlayer;
|
||||
const sessionId = videoPlayer?.getAllPlayerSessionIds?.()[0];
|
||||
const ids = videoPlayer?.getAllPlayerSessionIds?.();
|
||||
const sessionId = ids ? ids[0] : null;
|
||||
const player = sessionId ? videoPlayer.getVideoPlayerBySessionId(sessionId) : null;
|
||||
player?.seek(Math.round(time * 1000));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user