Skip to content

Commit

Permalink
Default incompatibility msg w/ other global options fixes videojs#636
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn committed Aug 5, 2013
1 parent 918ee04 commit ff9165b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 7 additions & 1 deletion src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ vjs.options = {
'loadingSpinner': {},
'bigPlayButton': {},
'controlBar': {}
}
},

// Default message to show when a video cannot be played.
incompatibleVideoMessage: 'Sorry, no compatible source and playback ' +
'technology were found for this video. Try using another browser ' +
'like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the ' +
'latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'
};

// Set CDN Version of swf
Expand Down
12 changes: 1 addition & 11 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,18 +739,8 @@ vjs.Player.prototype.src = function(source){
this.loadTech(techName, source);
}
} else {
var incompatibleMessage;
if (videojs.options['incompatibleVideoMessage']) {
incompatibleMessage = vjs.options['incompatibleVideoMessage'];
} else {
incompatibleMessage = 'Sorry, no compatible source and playback ' +
'technology were found for this video. Try using another browser ' +
'like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the ' +
'latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.';
}

this.el_.appendChild(vjs.createEl('p', {
innerHTML: incompatibleMessage
innerHTML: this.options()['incompatibleVideoMessage']
}));
}

Expand Down

0 comments on commit ff9165b

Please sign in to comment.