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 did a promise for my videojs to play mp4 video and Youtube video.
But when you load anc change a video from mp4 then another one from Youtube in the same player. the promise may trigger to fast before the Youtube video is loaded that the spinner keep running without the video never being played.
I did it with a 'loadedmetadata' but it work only once.
I do not want to destroy the player and recreate a new one.
Because i found out the if you play multiple youtube videos one after the others they load faster. it slower if you recreate each time a new player. If i load a mp4 video in between, the first Youtube video after a mp4 will be slower because i guess that video js create a new iframe. but the problem is that my promise will trigger to fast and the video will never start.
I searched and wander if i can only destroy the events listener when i change the video provider (standard video like mp4 to a Youtube one)
I.E. destroy the loadedmetadata event and reload it when a new video provider change and the loadedmetadata will be destroyed. Player.on('loadedmetadata', function () {...
I found a Youtube api player who check and create a canplay event state.
To resume. The same video player will play mp4 and Youtube video, i made a promise to load video one page change like the Youtube website to make video like a autoplay, but on Youtube is only a ajax page loading. player the video thumbnail create a promise to autoplay the video in a ajax page.
The text was updated successfully, but these errors were encountered:
I did a promise for my videojs to play mp4 video and Youtube video.
But when you load anc change a video from mp4 then another one from Youtube in the same player. the promise may trigger to fast before the Youtube video is loaded that the spinner keep running without the video never being played.
I did it with a 'loadedmetadata' but it work only once.
I do not want to destroy the player and recreate a new one.
Because i found out the if you play multiple youtube videos one after the others they load faster. it slower if you recreate each time a new player. If i load a mp4 video in between, the first Youtube video after a mp4 will be slower because i guess that video js create a new iframe. but the problem is that my promise will trigger to fast and the video will never start.
I searched and wander if i can only destroy the events listener when i change the video provider (standard video like mp4 to a Youtube one)
I.E. destroy the loadedmetadata event and reload it when a new video provider change and the loadedmetadata will be destroyed.
Player.on('loadedmetadata', function () {...
I found a Youtube api player who check and create a canplay event state.
this.readyHandler = function() { this.canplay = true; this.previousTime = this.player.getCurrentTime(); this.trigger('videoStatus', this.player.getCurrentTime(), this.player.getDuration(), 'canplay'); }.bind(this);
To resume. The same video player will play mp4 and Youtube video, i made a promise to load video one page change like the Youtube website to make video like a autoplay, but on Youtube is only a ajax page loading. player the video thumbnail create a promise to autoplay the video in a ajax page.
The text was updated successfully, but these errors were encountered: