Skip to content

Commit

Permalink
Merge pull request #331 from ooyala/pbw-7473
Browse files Browse the repository at this point in the history
[pbw-7473] Fixing IE11 bug that keeps replay screen up after you clic…
  • Loading branch information
jpfranco authored Aug 17, 2018
2 parents f394d3f + 990c5a5 commit 3ecf2ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/js/main_html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,15 @@ require("../../../html5-common/js/utils/environment.js");
// makes the video play for a fraction of a second and then stop again at the end.
// In this case we allow setting the initial time back to 0 as a workaround for this
var queuedSeekRequired = OO.isSafari && videoEnded && time === 0;

initialTime.value = time;
initialTime.reached = false;

// [PBW-3866] Some Android devices (mostly Nexus) cannot be seeked too early or the seeked event is
// never raised, even if the seekable property returns an endtime greater than the seek time.
// To avoid this, save seeking information for use later.
// [PBW-5539] Same issue with desktop Safari when setting initialTime after video ends
if (OO.isAndroid || (queuedSeekRequired && !OO.isIos)) {
// [PBW-7473] Same issue with IE11.
if (OO.isAndroid || OO.isIE11Plus || (queuedSeekRequired && !OO.isIos)) {
queueSeek(initialTime.value);
} else {
this.seek(initialTime.value);
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/main_html5/wrapper-api-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,15 @@ describe('main_html5 wrapper tests', function () {
expect(spy.callCount).to.be(1);
});

it('should delay initialTime on IE11 until timeupdate is called', function(){
OO.isIE11Plus = true;
var spy = sinon.spy(wrapper, "seek");
wrapper.setInitialTime(10);
expect(spy.callCount).to.be(0);
$(element).triggerHandler("timeupdate");
expect(spy.callCount).to.be(1);
});

it('should play if not seeking', function(){
var spy = sinon.spy(element, "play");
wrapper.play();
Expand Down

0 comments on commit 3ecf2ae

Please sign in to comment.