Safeguard Netflix player session ID lookup in background.js

This commit is contained in:
Timo
2026-07-02 13:01:14 +02:00
parent 9cbeb661d6
commit ce522e2ab7
+2 -1
View File
@@ -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));
}