Skip to content

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

Merged
Dananji merged 2 commits into
mainfrom
set-duration
Jul 19, 2024
Merged

Read duration from either options or player property in progressbar#578
Dananji merged 2 commits into
mainfrom
set-duration

Conversation

@Dananji

@Dananji Dananji commented Jul 18, 2024

Copy link
Copy Markdown
Collaborator

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.

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@Dananji

Dananji commented Jul 19, 2024

Copy link
Copy Markdown
Collaborator Author

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

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

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
@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