fix(extension): support cross-origin media frames

This commit is contained in:
KoalaDev
2026-08-17 16:49:53 +02:00
parent 77bdf21405
commit 082b69f509
31 changed files with 2858 additions and 263 deletions
+11 -8
View File
@@ -49,14 +49,6 @@
*Ideas and feature requests under evaluation.*
### Cross-origin frame video detection and control
- **Priority:** P3
- **Category:** Compatibility / Embedded Players
- **Background:** KoalaSync injects on demand into the selected tab's top frame. Since the same-origin frame walk shipped, the top-frame script also reaches players inside first-party iframes (`jkanime.net`-style `/jkplayer/` frames, `srcdoc` and `about:blank` frames that inherit the parent origin). What remains uncovered is the real `<video>` living inside a **cross-origin** iframe, where `contentDocument` is unreachable by design.
- **Possible approach:** Add an opt-in frame bridge (`allFrames: true` injection) where child frames announce detected videos to the top frame, and the top frame routes remote play/pause/seek commands to the active child video. Needs a frame-election rule so ad frames cannot claim the session.
- **Status:** Same-origin part completed; cross-origin frame bridge still open. Not needed for current Emby behavior.
### Sticky player selection
- **Priority:** P3
@@ -90,6 +82,17 @@
---
## ✅ Completed
### Cross-origin frame video detection and control
- **Priority:** P3
- **Category:** Compatibility / Embedded Players
- **Completed:** v3.1.2
- **Outcome:** The background probes accessible frames, elects the visible HTML5 player without trusting child-frame claims, and routes injection, ordered commands, state, chat, audio and teardown to the selected document. Hidden equal candidates without visibility evidence are rejected. A tab-wide frame sentinel plus subframe-navigation events recover CSS visibility switches, document reloads, lazy video insertion and failed delivery. Google Drive and YummyAnime-style nested external players are covered by live topology inspection plus packed-Chromium E2E fixtures; live two-peer service runs remain tracked separately.
---
## ❌ Rejected
*Declined features with rationale — keeps decisions documented so they don't get re-debated.*