Skip to content
Advertisement

Video.js changing source, but does not show new source

Sorry for my lack of knowledge on this topic

I have a script that changes the source of the video player. And it does just that. The only problem is that the Video.js player plays the first source assigned to it.

JavaScript

So if there were two buttons, and you clicked Button 1 it would change the source of the player and show the correct video. Then lets say you clicked Button 2 it would change the source of the player, but it would still show the same video it showed for Button 1

It is proven that it changes the source, I checked the Chrome Dev tools and surely enough it changed the source

How do I fix this?

Advertisement

Answer

You can try as below,

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement