videojs-panorama icon indicating copy to clipboard operation
videojs-panorama copied to clipboard

Dynamically changing video source

Open mikewgd opened this issue 8 years ago • 4 comments

I have one video player on the page and I have various links that swap out the video source. How do I accomplish this? I currently have this:

... player.src('url'); player.load();

I know the source is updating but the CANVAS will not update. Unless I click on it again. Any ideas on how I can have dynamic videos work with this plugin? Thanks!

mikewgd avatar Dec 02 '16 21:12 mikewgd

Hey, when you swap the video, did you play the video automatically? the canvas only refresh when video is playing. If video is not playing, it won't update to perform better performance.

yanwsh avatar Dec 12 '16 04:12 yanwsh

@yanwsh I am playing it automatically. However even if I dont. I still see the last video until I click play. Since I am pausing the video before swapping out the source. I still see the paused video.

mikewgd avatar Dec 13 '16 00:12 mikewgd

I will test it, do you use any other videojs plugins?

yanwsh avatar Dec 19 '16 04:12 yanwsh

No. Only yours.

mikewgd avatar Dec 20 '16 00:12 mikewgd