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: mp4 mode handling #409

Merged
merged 1 commit into from
Sep 30, 2024
Merged

feat: mp4 mode handling #409

merged 1 commit into from
Sep 30, 2024

Conversation

bwallberg
Copy link
Collaborator

Treat canplay as canplaythrough if mp4mode is enabled.

@bwallberg bwallberg marked this pull request as draft September 27, 2024 09:02
@@ -27,6 +27,9 @@ type TFilteredMediaEventCallback = (event: FilteredMediaEvent) => void;
type TMediaEventFilterOptions = {
mediaElement: HTMLMediaElement;
callback: TFilteredMediaEventCallback;
// Should be set to `true` when playing MP4 files directly on the video element
// as the video element CAN stop buffering when readyState is 3 rather than 4.
mp4Mode: boolean
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

don't particularly like the name but it's informative 😅

@bwallberg bwallberg marked this pull request as ready for review September 27, 2024 09:21
src/demo/player.tsx Outdated Show resolved Hide resolved
src/media-event-filter.ts Outdated Show resolved Hide resolved
@bwallberg bwallberg merged commit 4d65757 into main Sep 30, 2024
2 checks passed
@bwallberg bwallberg deleted the feat/mp4mode branch September 30, 2024 06: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