Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[#968874] Do not change time if time is already changed because we do…

…n't want to fire seeked events when we don't actually seek.
  • Loading branch information...
commit 6d16ad47c4d82d16ea69fa50b43ef27c69814895 1 parent 5487451
@ScottDowne ScottDowne authored
View
3  wrappers/null/popcorn.HTMLNullVideoElement.js
@@ -201,6 +201,9 @@
}
function changeCurrentTime( aTime ) {
+ if ( aTime === getCurrentTime() ) {
+ return;
+ }
if( !playerReady ) {
addPlayerReadyCallback( function() { changeCurrentTime( aTime ); } );
return;
View
9 wrappers/youtube/popcorn.HTMLYouTubeVideoElement.js
@@ -458,11 +458,10 @@
}
}
- function getCurrentTime() {
- return impl.currentTime;
- }
-
function changeCurrentTime( aTime ) {
+ if ( aTime === impl.currentTime ) {
+ return;
+ }
impl.currentTime = aTime;
if( !mediaReady ) {
addMediaReadyCallback( function() {
@@ -635,7 +634,7 @@
currentTime: {
get: function() {
- return getCurrentTime();
+ return impl.currentTime;
},
set: function( aValue ) {
changeCurrentTime( aValue );
Please sign in to comment.
Something went wrong with that request. Please try again.