Skip to content

Autoplay next: start the next episode's player by itself (JW, Video.js, big play buttons), and an autoplay switch in the player - #431

Merged
Nawid3333 merged 2 commits into
mainfrom
feat/autoplay-next-start-player
Oct 11, 2026
Merged

Nawid3333 merged 2 commits into
mainfrom
feat/autoplay-next-start-player

Conversation

@Nawid3333

@Nawid3333 Nawid3333 commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Your report: with "Autoplay next video" on, FastStream went on to the next episode, but you had to click before it played (serienstream.to, e.g. Hellbound S1).

Why: the next episode's page loads its hoster (VOE, a JW Player) in an iframe, and that player sits idle until clicked: no stream is requested, so FastStream had nothing to take. Measured on the live page: JW state idle, the <video> empty, no FastStream player within 60 s without a click.

What changes: after FastStream itself went to the next episode (the tab has a pending autoplay continuation), the background asks the frame with the tab's largest video, every 2 s for up to 20 s, to start its page's player (content.js startPagePlayer):

  • an idle JW Player: its own play() (through Firefox's Xray view of the page; a click there can land on an ad layer);
  • otherwise a paused video with a source: play();
  • a Video.js player that has not started: its own play();
  • otherwise an empty video (or none yet): a known player's big play button (Video.js, Plyr, JW, Flowplayer, MediaElement, Clappr, ArtPlayer, DPlayer, Shaka), or another play button lying over the video, else a click on the video.

The stream then comes, FastStream takes it, and its own player plays it: checked under Firefox's real autoplay rules (sound blocked until a click) that FastStream's player, an extension page, may play with sound without a click, while the same video in a plain page is refused (NotAllowedError).

Limits (from deepseek's review, all applied): once per page; only the frame with the largest video (a video ad elsewhere is not started); one fixed 20 s window per autoplay next; no muting of the page's video; stops on Off, in MPV mode, when the tab closes or once the stream came. Nothing happens unless "Autoplay next video" took the step.

Autoplay switch in the player: a small on/off switch beside the next button (shown whenever the next button is), with the tooltip "Autoplay next video when current video ends" (an existing string: no new translations). It does what the next button's right click did for the tab, which nobody found; the Options setting stays where a new tab starts. Keyboard: Enter/Space; role=switch with aria-checked.

Test: ext-specs/autoplay-next-episode.e2e.mjs plays episode 1 into its end, goes on through four waiting players: an idle JW Player (ep 2), one that loads on a click (ep 3), a Video.js one (ep 4) and one behind a big play button (ep 5), and checks each plays by itself. Without the change it stops at ep 2; with the first, JW-only version at ep 4. player-controls has a case for the switch (hidden without a next video, click on, Space off). content-cleanup (28), vitest (2238), lint, tsc pass.

Please try on serienstream.to after the release: start an episode, turn on Autoplay next video, skip near the end. (My automated browser was no longer served the hoster after ~15 visits, so the live site needs your check.)

🤖 Generated with Claude Code

Nawid3333 and others added 2 commits October 11, 2026 15:27
… a click

After FastStream went on to the next episode by itself, a hoster's JW Player sat idle on the
new page (serienstream.to's VOE), nothing loaded, and the user had to click. Now the background
asks the frame with the tab's largest video, every 2 s for 20 s, to start it: an idle JW
Player's play(), else play() on a paused video with a source, else a click on an empty one.
Once per page; ends when the stream came, on Off, in MPV, or after the 20 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…beside the next button

startPagePlayer also starts a Video.js player that has not started (its API), and clicks a
known player's big play button (Video.js, Plyr, JW, Flowplayer, MediaElement, Clappr,
ArtPlayer, DPlayer, Shaka), or another play button lying over the video, before a click on
the video itself. The e2e goes through five episodes: JW, a click, Video.js, a big button.

The player gets a visible switch for autoplay next, beside the next button (shown with it):
what the next button's right click did for the tab, which nobody found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Nawid3333 Nawid3333 changed the title Autoplay next: start the next episode's player when it waits for a click (serienstream.to) Autoplay next: start the next episode's player by itself (JW, Video.js, big play buttons), and an autoplay switch in the player Oct 11, 2026
@Nawid3333
Nawid3333 merged commit 6c8fb74 into main Oct 11, 2026
24 of 25 checks passed
@Nawid3333
Nawid3333 deleted the feat/autoplay-next-start-player branch October 11, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant