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

Read duration from either options or player property in progressbar #578

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

Dananji
Copy link
Collaborator

@Dananji Dananji commented Jul 18, 2024

I was still seeing the shortened progressbar on initial load in the Ramp demo site (#567) in Firefox. It seems on the initial load of the page it's safer to read the duration from options passed into the VideoJSProgress component rather than relying on canvasDuration property of the player instance.

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

👍

@Dananji
Copy link
Collaborator Author

Dananji commented Jul 19, 2024

This was still being buggy, so I removed the duration prop to progress bar component since that prop stays the same in subsequent player refreshes. Now the progress bar component relies on the player.canvasDuration property which gets updated on canvas change.

@Dananji Dananji requested a review from cjcolvar July 19, 2024 18:13
Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

Looks good!

@Dananji Dananji merged commit c6c1511 into main Jul 19, 2024
2 checks passed
@Dananji Dananji deleted the set-duration branch July 19, 2024 18:21
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