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

Slow network connections cause unexpected behaviour with static media #373

Open
razethion opened this issue Sep 6, 2023 · 1 comment
Open
Assignees

Comments

@razethion
Copy link

razethion commented Sep 6, 2023

When using ovenplayer with static media (mp4) on a slow network connection, sometimes the user will try and hit play before the media is ready. If this is done after player.on('ready') but before the file is downloaded enough, the player does recognize the play button has been pressed, but visually nothing happens. This can be confusing to the user who might try pressing play again, and think it's not functioning properly.

This can be easily reproduced by using the browser's built-in network throttling feature.

Workaround
If we wait for player.on('metaChanged') to return the duration of the video, we can tell that the media has loaded enough for the player to actually do something. The way I have fixed this is by hiding the player and displaying a loading div in place of the player until the duration has been returned. Then the loading div is hidden and player is shown.

Suggested fix
the "ready" state is misleading. The player will be "ready" but may not yet have downloaded the content from the server for the play button to actually be functional (and thus, is not "ready"). The player should return a "loading" state until the meta has been successfully pulled and the player will actually attempt to visually play the video.

@SangwonOh SangwonOh self-assigned this Sep 11, 2023
@SangwonOh
Copy link
Member

Let me check it. It may take some time due to its low priority.

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

No branches or pull requests

2 participants