yanwsh / videojs-panorama

a plugin for videojs run a full 360 degree panorama video.
http://yanwsh.github.io/videojs-panorama/
Other
492 stars 160 forks source link

Player x is already initialised. Options will not be applied. problem #51

Open whitmanlui opened 7 years ago

whitmanlui commented 7 years ago

Hello, I want to change the src of video, but the log shows "VIDEOJS: WARN: Player x is already initialised. Options will not be applied." How can I remove or dispose the video? I had tried to use .dispose() but not work.

In addition, I'm using angularjs route. If the view is first time entry, then the player will create. When the view is second time entry, the log will shows the play is already initialised. Is there any way to check the player is created or not?

yanwsh commented 7 years ago

Oh, did you try to initial videojs player agian when it's already initialized?

If you want to change the video source, you can do the code below

player.src({src: "url", type: "video/mp4"});