Skip to content

Commit

Permalink
Merge pull request #1694 from bbc/createAll-AJAX
Browse files Browse the repository at this point in the history
Fix #1680: Prevent MediaPlayerFactory creating elements if dashjs hasn't loaded
  • Loading branch information
Dan Sparacio committed Dec 8, 2016
2 parents 3a6b942 + d4b220b commit b268107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/MediaPlayerFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function loadHandler() {

let avoidAutoCreate = typeof window !== 'undefined' && window && window.dashjs && window.dashjs.skipAutoCreate;

if (!avoidAutoCreate && typeof window !== 'undefined' && window && window.addEventListener) {
if (!avoidAutoCreate && typeof window !== 'undefined' && window && window.dashjs && window.addEventListener) {
if (window.document.readyState === 'complete') {
instance.createAll();
} else {
Expand Down

0 comments on commit b268107

Please sign in to comment.