Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

[#890556] Fix videoHTMLContainer so it does not break player unit tests #402

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/player/popcorn.player.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
videoHTML += '<source src="' + src[ i ] + '">';
}
videoHTML += "</video>";
videoHTMLContainer.innerHTML = videoHTML;
videoHTMLContainer.outerHTML = videoHTML;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an ideal solution for changing the tests. What we basically did here was change the functionality to put the generated video element inside a wrapper and have that wrapping element appending to the target element given.

The tests fail because the video element isn't a direct child of the target element anymore. The correct solution to this is to simply update the tests to correct that expectation.


if ( options && options.events && options.events.error ) {
node.addEventListener( "error", options.events.error, false );
Expand Down