You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need some help with fetching new dynamic video source URLs and setting the sources object for the playlist item when the user clicks on a playlist item. Here is the situation I'm facing:
When the user clicks on a playlist item, I want the player to fetch the new video sources from an API, set the player to a loading/waiting state while fetching, and then play the video from the new sources once they are fetched. However, the player currently plays the existing video URL from the previously set sources first, does not maintain the vjs-waiting class in the player (removes it too quickly), and then plays the video from the new sources after they are fetched and set.
The player does not stay paused and in the loading state until the new sources are fetched. Instead, it starts playing the existing video URL from the previously set sources.
Questions:
How can I ensure the player stays in the loading state (with vjs-waiting class) until the new sources are fetched and set?
Is there another event hook or method that I should use to accomplish this?
Am I missing something else in my approach to fetch and set the new video sources dynamically?
Any help or guidance would be greatly appreciated.
Thank you!
The text was updated successfully, but these errors were encountered:
Hello,
I need some help with fetching new dynamic video source URLs and setting the sources object for the playlist item when the user clicks on a playlist item. Here is the situation I'm facing:
When the user clicks on a playlist item, I want the player to fetch the new video sources from an API, set the player to a loading/waiting state while fetching, and then play the video from the new sources once they are fetched. However, the player currently plays the existing video URL from the previously set sources first, does not maintain the vjs-waiting class in the player (removes it too quickly), and then plays the video from the new sources after they are fetched and set.
Here's my current code:
The player does not stay paused and in the loading state until the new sources are fetched. Instead, it starts playing the existing video URL from the previously set sources.
Questions:
Any help or guidance would be greatly appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: