mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-03 17:59:42 +02:00
Hide loading spinner (flash issue)
This commit is contained in:
parent
5858c346b8
commit
0033246639
1 changed files with 5 additions and 2 deletions
|
@ -43,17 +43,20 @@
|
|||
},
|
||||
onClick: function(){
|
||||
this.onClickListener(this);
|
||||
// Hide bigPlayButton
|
||||
this.player_.bigPlayButton.hide();
|
||||
// Remember player state
|
||||
var currentTime = this.player_.currentTime();
|
||||
var isPaused = this.player_.paused();
|
||||
this.showAsLabel();
|
||||
// Hide bigPlayButton
|
||||
if(!isPaused){
|
||||
this.player_.bigPlayButton.hide();
|
||||
}
|
||||
// Change player source and wait for loadeddata event, then play video
|
||||
// loadedmetadata doesn't work right now for flash.
|
||||
// Probably because of https://github.com/videojs/video-js-swf/issues/124
|
||||
setSourcesSanitized(this.player_, this.src).one('loadeddata', function() {
|
||||
this.player_.currentTime(currentTime);
|
||||
this.player_.handleTechSeeked_();
|
||||
if(!isPaused){
|
||||
// Start playing and hide loadingSpinner (flash issue ?)
|
||||
this.player_.play().handleTechSeeked_();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue