Skip to content

Commit

Permalink
[PBI-1666]
Browse files Browse the repository at this point in the history
-fixed an issue where we do not provide the correct shared video element on iOS to the IMA SDK when the original video element is destroyed and recreated
  • Loading branch information
aeng7 committed Apr 12, 2016
1 parent 96afb3e commit cb17bbb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/google_ima.js
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,7 @@ require("../html5-common/js/utils/utils.js");
*/
this.destroy = function()
{
_ima.sharedVideoElement = null;
};

/**
Expand Down
11 changes: 11 additions & 0 deletions test/unit-tests/ima_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,4 +1307,15 @@ describe('ad_manager_ima', function()
initialize(false);
expect(ima.sharedVideoElement).to.not.be(null);
});

it('SingleElement: Shared video element should be null after video wrapper calls destroy function', function()
{
ima.sharedVideoElement = null;
amc.ui.useSingleVideoElement = true;
amc.ui.ooyalaVideoElement = [{ className: "video"}];
initAndPlay(false, vci);
expect(ima.sharedVideoElement).to.not.be(null);
videoWrapper.destroy();
expect(ima.sharedVideoElement).to.be(null);
});
});

0 comments on commit cb17bbb

Please sign in to comment.