зеркало из https://github.com/mozilla/popcorn-js.git
[#1023] removed some console.logs I left from last commit. Removed the youtube seeking hack. No longer update via youtube player seeks, only via butter seeks.
This commit is contained in:
Родитель
3af0f4bcac
Коммит
e0a6977bb5
|
@ -41,9 +41,9 @@
|
|||
paused = true;
|
||||
|
||||
playerQueue.add(function() {
|
||||
console.log( "in paused queue" );
|
||||
|
||||
if ( !realPaused ) {
|
||||
console.log( widget );
|
||||
|
||||
widget && widget.pause();
|
||||
} else {
|
||||
playerQueue.next();
|
||||
|
|
|
@ -18,9 +18,7 @@ Popcorn.player( "youtube", {
|
|||
container = document.createElement( "div" ),
|
||||
currentTime = 0,
|
||||
paused = true,
|
||||
seekTime = 0,
|
||||
firstGo = true,
|
||||
seeking = false,
|
||||
|
||||
// state code for volume changed polling
|
||||
lastMuted = false,
|
||||
|
@ -54,18 +52,6 @@ Popcorn.player( "youtube", {
|
|||
// this is the only way to get seeking events
|
||||
if ( state === 2 ) {
|
||||
|
||||
// silly logic forced on me by the youtube API
|
||||
// calling youtube.seekTo triggers multiple events
|
||||
// with the second events getCurrentTime being the old time
|
||||
if ( seeking && seekTime === currentTime && seekTime !== options.youtubeObject.getCurrentTime() ) {
|
||||
|
||||
seeking = false;
|
||||
options.youtubeObject.seekTo( currentTime );
|
||||
return;
|
||||
}
|
||||
|
||||
currentTime = options.youtubeObject.getCurrentTime();
|
||||
media.dispatchEvent( "timeupdate" );
|
||||
paused = true;
|
||||
media.dispatchEvent( "pause" );
|
||||
playerQueue.next();
|
||||
|
@ -221,8 +207,7 @@ Popcorn.player( "youtube", {
|
|||
set: function( val ) {
|
||||
|
||||
// make sure val is a number
|
||||
currentTime = seekTime = +val;
|
||||
seeking = true;
|
||||
currentTime = +val;
|
||||
|
||||
if ( options.destroyed ) {
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче