From 4fd609f7857898445554dff8e6f9b8d3329894db Mon Sep 17 00:00:00 2001 From: Frodouwu Date: Mon, 23 Nov 2026 12:02:41 -0300 Subject: [PATCH] feat(streaming): count Netflix, Crunchyroll, Prime Video and Disney+ Each site is off until turned on in the dashboard settings, which asks for scripting and that site's pages only (inside the optional , so no new install warning). A page script copies what the player says; pure readers turn it into the episode, its audio language and whether an ad plays. The audio track decides; a player that cannot be read counts nothing. The popup shows the title of what it counts. Investigation in docs/streaming.md. Assisted-by: Claude Code:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 10 ++ PRIVACY.md | 21 ++- README.md | 4 + docs/plan.md | 23 ++- docs/store-listing.md | 51 +++--- docs/streaming.md | 172 +++++++++++++++++++ extension/dashboard/dashboard.css | 23 +++ extension/dashboard/dashboard.html | 8 + extension/dashboard/dashboard.js | 46 +++++ extension/manifest.json | 24 +++ extension/popup/popup.css | 9 + extension/popup/popup.html | 1 + extension/popup/popup.js | 5 +- extension/src/background.js | 50 +++++- extension/src/content.js | 2 +- extension/src/generic.js | 5 + extension/src/sites.js | 103 ++++++++++++ extension/src/status.js | 9 + extension/src/streaming-bridge.js | 196 ++++++++++++++++++++++ extension/src/streaming-content.js | 220 ++++++++++++++++++++++++ extension/src/streaming.js | 205 +++++++++++++++++++++++ tests/sites.test.js | 118 +++++++++++++ tests/status.test.js | 9 + tests/streaming.test.js | 259 +++++++++++++++++++++++++++++ 24 files changed, 1546 insertions(+), 27 deletions(-) create mode 100644 docs/streaming.md create mode 100644 extension/src/sites.js create mode 100644 extension/src/streaming-bridge.js create mode 100644 extension/src/streaming-content.js create mode 100644 extension/src/streaming.js create mode 100644 tests/sites.test.js create mode 100644 tests/streaming.test.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba409b..984f4ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ note on what to update. ## [Unreleased] +### Added + +- **Streaming sites without the immersion profile.** "Count streaming sites" in the dashboard settings turns on + Netflix, Crunchyroll, Prime Video and Disney+ (the last two experimental), each one apart, asking for access + to that site's pages only. Inputly reads which audio track the player plays and counts the episode or film + only when it is in your language; ads are left out where the player shows them. The popup and the day's list + name the episode. In the immersion profile every title of a site turned on counts. See + [docs/streaming.md](docs/streaming.md). +- The popup shows the title of the video it is counting, on YouTube too. + ## [0.1.1] - 2026-11-23 Fixes that make the count more honest: ads, a failed player and crashes no longer add or lose time. diff --git a/PRIVACY.md b/PRIVACY.md index 936b2ff..f48d9c0 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -35,7 +35,7 @@ It stores on your computer (in `chrome.storage.local`): Mosaik" on, it goes to your Mosaik: [see below](#what-happens-when-you-turn-on-send-to-mosaik)); - the **corrections** you make to a day (a number of seconds, and when you made it); - your **daily goal** and your settings (the language you learn, light or dark, the range of the chart, the - immersion profile); + immersion profile, the streaming sites you turned on); - the **ids of the videos you marked** as in the language you learn or not, for each language, so the decision is remembered; - only if you turn on "Send to Mosaik": its settings (with the device token, if your Mosaik is on a @@ -69,6 +69,24 @@ its language. When you turn it on in the dashboard settings, your browser asks y Turning it off stops the script. The permissions stay granted until you remove them in `chrome://extensions`. +## Streaming sites + +Counting Netflix, Crunchyroll, Prime Video and Disney+ is **optional and off by default**, for each site apart. +When you turn a site on in the dashboard settings ("Count streaming sites"), your browser asks you for +`scripting` and access to that site's pages only (for Crunchyroll also `static.crunchyroll.com`, where its +player is; for Prime Video also the Amazon stores where it plays: amazon.com, .co.uk, .de and .co.jp). Then, +in the pages of that site, Inputly reads **in your browser**: + +- whether the video is playing, and whether the player shows an ad (ads are not counted); +- from the player, the id and the title of the episode or film, the language of the audio track it plays and + of the subtitles shown, only to decide whether it is in the language you learn. + +It keeps the address, the title and the seconds of each episode or film in your language in the list of the +day above, and your decisions about which ones are in your language. It does not read your account, your +profile, your watch history, your lists or your recommendations, and makes no request to those sites or to +anyone else. Turning a site off stops its scripts; the access stays granted until you remove it in +`chrome://extensions`. + ## Reading counted by hand The popup has a button to count reading with no video (a comic, for example). While it runs, Inputly counts the @@ -118,6 +136,7 @@ dashboard (the squares button). Then: ## Your choices - **Turn off the immersion profile** in the dashboard settings: no more pages are looked at. +- **Turn off a streaming site** in the dashboard settings: its pages are no longer looked at. - **Turn off "Send to Mosaik"** in the dashboard: nothing more is sent, and what was waiting is deleted. - **Uninstall** the extension to delete everything it kept on that computer. diff --git a/README.md b/README.md index b60f356..2a22ac3 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,10 @@ days, weeks and months, so you can see how much input you really get. - **A day you can explain and correct.** Click a day in the dashboard to see which videos made it up (for the last 60 days), take out the ones that were not in your language, or say how many minutes you really watched. +- **Netflix and Crunchyroll, if you want.** Turn a site on in the settings of the dashboard ("Count + streaming sites") and Inputly counts what plays there in your language, from the audio track the player + says it plays; ads are left out. Prime Video and Disney+ are there too, as experimental. Each site asks + for access to its own pages only. See [docs/streaming.md](docs/streaming.md). - **An immersion profile.** In a Chrome profile you use only for the language you learn, turn it on in the settings of the dashboard and every video that plays with sound counts, on any site, with no guessing. So does any tab that plays sound for 30 seconds or more, like a podcast; a word a dictionary says does not. diff --git a/docs/plan.md b/docs/plan.md index c45b3e5..cb3598b 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -84,9 +84,12 @@ data stays German. Worth doing before or soon after the first release; each is its own task. -- [ ] **2.7 Streaming sites without the immersion profile.** Count Netflix, Prime Video, Crunchyroll and +- [x] **2.7 Streaming sites without the immersion profile.** Count Netflix, Prime Video, Crunchyroll and Disney+ in the target language, from the audio or subtitle track the player says is playing. Investigate each player first; the store review needs a reason for each new host permission. + Done in [streaming.md](streaming.md): all four ship, off by default, each asked for from the settings + as an optional host inside ``; Prime Video and Disney+ marked experimental. What is left is a + check by hand with real accounts (see the note of 2.7). - [x] **2.8 Leave out ads** on YouTube (and on the sites of 2.7): time an ad plays is not input. - [x] **2.9 Recover after a crash.** Time counted while the browser or the service worker dies is not lost. @@ -311,3 +314,21 @@ Sessions add here what the next one needs to know: decisions taken, dead ends, f instead) and the sleep path of the sound, both covered by unit tests. Follow-up: after an extension update or reload, a tab opened before it keeps a content script that cannot reach the extension any more and counts nothing until the page is reloaded; re-injecting the scripts on update needs `scripting` for YouTube. +- 2026-11-23, task 2.7: the streaming sites are registered at runtime (`scheduleStreaming` in `background.js`) + from a per-site switch in the settings, which asks for `scripting` and that site's origins only + (`sites.js`). Both are inside the optional `scripting` and `` the manifest already had, so the + manifest only gained a `web_accessible_resources` entry and 0.2.0 shows no new warning at install; static + content scripts would have warned every user and disabled the extension until accepted. A page script + (`streaming-bridge.js`, world `MAIN`) copies plain values from each player and `streaming.js` reads them; + the audio track decides, subtitles never do, and a site whose player cannot be read counts nothing (fails + closed). Stored: a new key `streamingSites` (`{ netflix: true }`) and web items `web:` of + `https://www.netflix.com/watch/` and the like, so no stored shape changed and `STORAGE_VERSION` stays; + `override` messages and "take out of the day" now accept web item ids too. What was seen: Crunchyroll's + store (`content.media.byId[watch.id].audioLocale`) on the real site, logged out (every episode was premium + only, so nothing played; no free tier with ads seen); counting was then checked in Chrome 157 with that + store shape served at a Crunchyroll address, in the page and in a `static.crunchyroll.com` frame, because + the real site shows a bot check to a browser driven through CDP. Netflix comes from published probe output + (LingoFlix); Prime Video and Disney+ from one open-source tool each, hence "experimental". Not checked: any + real playback, ads on any of the four, Firefox. Follow-ups: the maintainer's check by hand + ([streaming.md](streaming.md#checking-by-hand)); a Crunchyroll ad rule if a free tier with ads shows up; more + Amazon stores for Prime Video if someone asks. diff --git a/docs/store-listing.md b/docs/store-listing.md index 9a154e6..5ecbc05 100644 --- a/docs/store-listing.md +++ b/docs/store-listing.md @@ -47,8 +47,9 @@ WHAT MAKES INPUTLY DIFFERENT HOW IT COUNTS • It counts the real seconds a video in your language plays. Pausing, rewinding and looping are handled, and at 2x a minute is still a minute. Two tabs playing at once count once. -• By itself it counts YouTube. Other sites (streaming sites, Twitch, podcasts) count only with the - immersion profile on. +• By itself it counts YouTube. Netflix and Crunchyroll count too once you turn them on in the settings (Prime + Video and Disney+ as experimental): Inputly reads which audio track the player plays and counts it only in + your language. Other sites (Twitch, podcasts) count with the immersion profile on. • Pick your language when you install it, and change it any time in the settings. The popup says it: "Counting Japanese", "Not Japanese, not counted". @@ -62,8 +63,9 @@ WHAT YOU SEE OPEN SOURCE The extension is open source (MIT): https://github.com/joaquinmuzzi/inputly -Inputly is an independent project. It is not affiliated with, endorsed by or sponsored by YouTube or -Google. YouTube is a trademark of Google LLC. +Inputly is an independent project. It is not affiliated with, endorsed by or sponsored by YouTube, Google, +Netflix, Crunchyroll, Amazon or Disney. YouTube is a trademark of Google LLC; the other names are trademarks +of their owners. ``` **Images** (1280 × 800 JPEG, from the real extension pages with the invented history of someone who learns @@ -91,27 +93,36 @@ They are made with `node scripts/screenshots/capture.mjs` (see task 2.2 in the [ **Single purpose:** -> Track how much time the user spends on input in the language they learn (videos on YouTube, any video or -> sound in a Chrome profile the user sets for that language, and reading they count by hand), and show their -> progress toward a daily goal. +> Track how much time the user spends on input in the language they learn (videos on YouTube, the streaming +> sites the user turns on, any video or sound in a Chrome profile the user sets for that language, and reading +> they count by hand), and show their progress toward a daily goal. **Permission justifications** (one field per permission in the form; paste the text of its row): -| Permission | Why | -| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `storage` | Keeps, in the browser of the user, the seconds counted per day, the videos and readings of the last 60 days with their title, address and seconds, the corrections the user made to a day, the daily goal, the settings (the language the user learns among them) and the decisions of the user about which videos are in that language. Nothing is synced or sent by this permission. | -| `alarms` | A service worker cannot keep a timer, so a one-minute alarm does the periodic work: it adds up the reading the user started by hand, the sound of tabs while the immersion profile is on, and, only while the user has "Send to Mosaik" on, sends to their Mosaik. No alarm runs while none of these is in use. | -| `idle` | Stops the reading counted by hand when nobody has used the computer for 15 minutes, so that time away is not counted. It says only whether the computer is in use. | -| `activeTab` | The popup works on the tab the user has open when they click the toolbar button: "Count reading" reads the address and the title of that one tab to name what is being read, and the popup asks that tab whether its video is in the language the user learns. | -| Optional permission `scripting` | Not granted at install. Asked for only when the user turns on the immersion profile in the settings: it registers the small script that finds the videos of other sites and whether they play. Turning the profile off unregisters it. | -| Optional host permissions `http://127.0.0.1/*` and `http://localhost/*` | Not granted at install. Asked for only when the user turns on "Send to Mosaik" in the dashboard with the address of Mosaik on their own computer: it sends the counted time to that app of the user. Nothing goes to another computer. | -| Optional host permission `` | Not granted at install. Asked for whole only when the user turns on the immersion profile, meant for a Chrome profile they use only for the language they learn: every video that plays with sound counts, on any site, and so does a tab that plays sound. The script only looks for videos and whether they play; only the address, the title and the seconds of a page where something played are kept, in the browser, never sent unless "Send to Mosaik" is on. It also covers "Send to Mosaik" with the address of the user's own Mosaik server: then the extension asks for that one host only (`https:///*`), never for the whole pattern, because the address is typed by the user and cannot be known in advance. The server takes the data only with a device token the user made in it. | -| Content scripts on `https://www.youtube.com/*` | Read, in the page of the video, whether it is playing, which audio track plays and the language of its captions, title and description, to count only the time of videos in the language the user learns. One small script runs in the page itself because the player data is not visible to the isolated content script; it only reads it and never writes to the page. Only the id and the title of the video counted are kept. | - -`web_accessible_resources` lists two scripts (`src/tracker.js`, `src/watcher.js`) for ``. It is not -a permission: it lets the immersion script, which runs only where the user granted ``, load the +| Permission | Why | +| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `storage` | Keeps, in the browser of the user, the seconds counted per day, the videos and readings of the last 60 days with their title, address and seconds, the corrections the user made to a day, the daily goal, the settings (the language the user learns among them) and the decisions of the user about which videos are in that language. Nothing is synced or sent by this permission. | +| `alarms` | A service worker cannot keep a timer, so a one-minute alarm does the periodic work: it adds up the reading the user started by hand, the sound of tabs while the immersion profile is on, and, only while the user has "Send to Mosaik" on, sends to their Mosaik. No alarm runs while none of these is in use. | +| `idle` | Stops the reading counted by hand when nobody has used the computer for 15 minutes, so that time away is not counted. It says only whether the computer is in use. | +| `activeTab` | The popup works on the tab the user has open when they click the toolbar button: "Count reading" reads the address and the title of that one tab to name what is being read, and the popup asks that tab whether its video is in the language the user learns. | +| Optional permission `scripting` | Not granted at install. Asked for only when the user turns on the immersion profile, or a streaming site (Netflix, Crunchyroll, Prime Video, Disney+), in the settings: it registers the small scripts that find the videos of those sites and whether they play. Turning the profile or the site off unregisters them. | +| Optional host permissions `http://127.0.0.1/*` and `http://localhost/*` | Not granted at install. Asked for only when the user turns on "Send to Mosaik" in the dashboard with the address of Mosaik on their own computer: it sends the counted time to that app of the user. Nothing goes to another computer. | +| Optional host permission `` | Not granted at install. Asked for whole only when the user turns on the immersion profile, meant for a Chrome profile they use only for the language they learn: every video that plays with sound counts, on any site, and so does a tab that plays sound. The script only looks for videos and whether they play; only the address, the title and the seconds of a page where something played are kept, in the browser, never sent unless "Send to Mosaik" is on. It also covers "Send to Mosaik" with the address of the user's own Mosaik server: then the extension asks for that one host only (`https:///*`), never for the whole pattern, because the address is typed by the user and cannot be known in advance. The server takes the data only with a device token the user made in it. It also covers the streaming sites: when the user turns one on in the settings, the extension asks for that site's pages only (`https://www.netflix.com/*`; `https://www.crunchyroll.com/*` and `https://static.crunchyroll.com/*`, where its player is; `https://www.primevideo.com/*` and the Amazon stores where Prime Video plays, `https://www.amazon.com/*`, `.co.uk`, `.de`, `.co.jp`; `https://www.disneyplus.com/*`), never for the whole pattern. There a script reads which episode plays, which audio language the player says it plays and whether an ad plays, to count the episode only when it is in the language the user learns. | +| Content scripts on `https://www.youtube.com/*` | Read, in the page of the video, whether it is playing, which audio track plays and the language of its captions, title and description, to count only the time of videos in the language the user learns. One small script runs in the page itself because the player data is not visible to the isolated content script; it only reads it and never writes to the page. Only the id and the title of the video counted are kept. | + +`web_accessible_resources` lists three scripts (`src/tracker.js`, `src/watcher.js`, `src/delivery.js`) for +``, and the counting modules for the streaming sites' pages. It is not a permission: it lets the +immersion script and the streaming sites' script, which run only where the user granted access, load the extension's own counting code. The reviewer may ask; the answer is this. +**Why the streaming sites are optional, one by one** (task 2.7, see [streaming.md](streaming.md)): they could +have been content scripts in the manifest, like YouTube, but a new host in `host_permissions` or in a content +script's `matches` shows a new warning to every user at the update ("Read and change your data on +www.netflix.com…") and disables the extension until they accept it. Asked for at runtime, inside the optional +`` the manifest already declares, nothing changes for whoever does not use those sites, the update +needs no new approval, and each person grants only the sites they turn on. Each request names one site's own +pages, which is also the easiest reason for a reviewer to accept. + **Remote code:** No, I am not using remote code. All the code is in the package; the extension loads nothing from the internet and evaluates no strings as code. diff --git a/docs/streaming.md b/docs/streaming.md new file mode 100644 index 0000000..ec5c4ee --- /dev/null +++ b/docs/streaming.md @@ -0,0 +1,172 @@ +# Streaming sites + +How Inputly counts Netflix, Crunchyroll, Prime Video and Disney+ without the immersion profile (task 2.7 of the +[plan](plan.md)): what each player says, where it was read, what was checked and what is only inferred. Read +this before changing `extension/src/streaming.js` (the readers), `extension/src/streaming-bridge.js` (the page +script), `extension/src/streaming-content.js` (the glue) or `extension/src/sites.js` (the list of sites). + +## How it works + +- **Off until the person turns a site on.** The dashboard settings have "Count streaming sites", one switch per + site. Turning one on asks the browser, from that click, for `scripting` and that site's own pages + (`sitePermissions` in `sites.js`). Both are inside what the manifest already declares as optional + (`scripting` and ``, used by the immersion profile), so an update shows no new warning at install, + and nothing about these sites is granted until the person asks for it. +- **Two scripts per site, registered by the background script** while the site is on and its access granted + (`scheduleStreaming` in `background.js`): `streaming-bridge.js` in the page itself (world `MAIN`), because + the players' state is not visible from a content script's isolated world, and `streaming-content.js`, which + counts. Both start at `document_start`. +- **The bridge copies a few plain values** when asked (`inputly:streaming-request`, once a second): ids, the + title, the playing audio and subtitle tracks, whether an ad plays. It never calls a player method that + changes anything, never writes to the page and makes no request. Nothing is intercepted: no `fetch` or + `JSON.parse` hook, no network manifest. +- **The readers** (`readNetflix`, `readCrunchyroll`, `readPrimeVideo`, `readDisneyPlus` in `streaming.js`) turn + that copy into `{ key, title, audioLanguage, subtitleLanguages, ad }`. They are pure and tested + (`tests/streaming.test.js`). +- **The audio track decides**, as on YouTube: `audioLanguage` matched against the target language + (`streamingVerdict`). Subtitles never decide (they are often translations); they are read for the record + only. While the player has not said which audio plays, the time waits, as on YouTube, and is dropped if it + never says. During an ad the verdict stays the title's (the player's tracks may be the ad's) and nothing + counts (`Watcher.setAd`). +- **The time goes to the episode or film**, as a web item (`web:` of `key`, an address such as + `https://www.netflix.com/watch/82028220`), with its title, in the day's list and in the popup. The popup's + "Not Japanese?" button works as on YouTube, remembered per item. +- **In the immersion profile** every title of a site turned on counts, as every YouTube video does. The + immersion profile's own script (`generic.js`) leaves a page alone when `streaming-content.js` runs there + (`globalThis.inputlyStreaming`, set before anything waits), so a title is not counted under two names. +- **Frames:** Crunchyroll's player (Vilos) is an iframe on `static.crunchyroll.com`. There the script only tells + the page, by `postMessage`, whether its video plays; the page checks the message's origin against the site's + `frames` and counts. + +## Per site + +| Site | Shipped | Audio language from | Checked | +| ----------- | -------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------- | +| Netflix | Yes | The player API, `getAudioTrack().bcp47` | Shape from two published probes; no Netflix account here | +| Crunchyroll | Yes | The web app's store, `content.media.byId[watch.id].audioLocale` | The store read on the real site, logged out; counting through a fixture | +| Prime Video | Yes, marked "experimental" | The player's React context, `audioStream` active stream | Shape from one open-source tool; no account here | +| Disney+ | Yes, marked "experimental" | `mediaPlayer.audio.selectedTrack.language` on the player element | Shape from one open-source extension; no account here | + +Every site fails closed: when the bridge reads nothing (the player changed, a property moved), `audioLanguage` is +`null` and nothing counts; the popup says "Detecting the language…". A wrong reader can make Inputly count +nothing on a site, but not count the wrong language. + +### Netflix + +- **Player:** `netflix.appContext.state.playerApp.getAPI().videoPlayer`; `getAllPlayerSessionIds()` (the one + that starts with `watch`), then `getVideoPlayerBySessionId(id)`. +- **Audio:** `getAudioTrack()` → `{ trackId, bcp47, displayName, isNative, … }`, e.g. `{ bcp47: "en", +displayName: "English [Original]", isNative: true }`. A dub has its own `bcp47`. +- **Subtitles:** `getTimedTextTrack()` → `{ bcp47, isNoneTrack, isForcedNarrative, rawTrackType, … }`. +- **Id:** `getMovieId()`, the episode or film (`/watch/` in the address; the query changes, the path not). +- **Title:** `playerApp.getState().videoPlayer.videoMetadata[movieId]._metadataObject.video` → the show's + `title`, `type` (`show` or `movie`), and its `seasons[].episodes[]` (`id`, `seq`, `title`). Fallback: the + player's title line `[data-uia="video-title"]` (`h4` show, `span` episode number, `span` episode title). + `document.title` is just "Netflix". +- **Ads** (plans with ads): the lead-in before a title is a separate segment; LingoFlix saw `getSegmentTime()` + stay at 0 while `getCurrentTime()` ran through a 7007 ms lead-in, so `segmentTime === 0 && currentTime > 0` is + read as an ad. During any ad the player shows its "Ad" label; jp343 looks for `[data-uia="ads-info-container"]` + and `[data-uia="ads-info-text"]`, read here as `[data-uia*="ads-info"]`. Inferred: neither was seen here. +- **Navigation:** a single page app; the bridge is asked every second, a new `movieId` is a new item, and no + player session (back to browsing) ends the item. +- **Sources:** [LingoFlix's Netflix internals](https://github.com/jaycho1214/lingoflix/blob/main/docs/netflix-internals.md) + (verified probe output, Chrome 154, 2026-10-10, with an ad plan; the test data comes from it); + [Read Frog's Netflix player bridge](https://github.com/mengxi-ream/read-frog/blob/main/src/entrypoints/netflix-interceptor.content/player.ts) + (the same API path and `getAudioTrack()?.bcp47`); jp343's Netflix content script for the ad selectors. + +### Crunchyroll + +- **Checked on the real site** on 2026-11-23, logged out, in Argentina, in a browser pane: the watch page of One + Piece episode 1 (`/watch/GR3VWXP96`, Japanese) and its Latin American dub (`/watch/GE00010122ES419`). The + stream itself was blocked ("Emisión restringida"): every episode seen was `availabilityStatus: "premium_only"`, + so nothing played. +- **Store:** the web app is React with a Redux store, reached through the props of its root (`store.getState()`); + `watch.id` is the episode of the page, and `content.media.byId[id]` holds `audioLocale` (`"ja-JP"`, + `"es-419"`), `title`, `parentTitle`, `episode`, `type`, `subtitleLanguages`, `audioLanguages` and `dubVersions` + (`{ guid, audioLocale, original }` for each dub). A dub is a separate episode with its own id, so the episode + of the page is the audio that plays. `watch.premiumDubSelectedVersion` (null here) is read as a dub picked + inside the player; inferred from its name. +- **Title:** `parentTitle`, `episode` and `title` ("One Piece E1 - …"); `document.title` and the page's JSON-LD + (`TVEpisode`) also name it. +- **Player:** `__APP_CONFIG__.vilosConfig.vilosPlayerUrl` is `https://static.crunchyroll.com/vilos-v2/web/vilos/player.html`, + and jp343 runs in all frames of `*.crunchyroll.com` with code for the player's iframe, so the video is taken to + play in that frame (asked for as `https://static.crunchyroll.com/*`). Inferred: no stream played here. The + script also counts a `