Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/handle playing after ended #349

Merged
merged 6 commits into from
Jul 8, 2024
Merged

Conversation

martinstark
Copy link
Collaborator

@martinstark martinstark commented Jul 3, 2024

Tested

  • firefox
  • chrome
  • safari

How to Test

Start playing, seek or play to the end. After ended has triggered, press or trigger play, or seek to anywhere in the video.

The filter should reset its internal state, causing loaded -> playing to trigger when playback starts again.

Firefox and Chrome both behave somewhat differently, in Chrome the entire action seems to be treated as a seek, while in Firefox only part of the action is treated as a seek. Regardless, media event filter will treat it as a new load and only emit loaded.

If .play() or a seek is initiated after ended,
treat it as a new session and emit loaded.

Browsers handle this slightly differently, pressing
play when at end of stream is at least partially
treated as a seek, but the filter will now treat it
as a new playback session and trigger LOADED when video
is ready to start playing again.
Copy link
Collaborator

@bwallberg bwallberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Tested safari

@martinstark martinstark merged commit 26a6956 into main Jul 8, 2024
2 checks passed
@martinstark martinstark deleted the feat/handle-playing-after-ended branch July 8, 2024 08:15
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.

2 participants