1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-17 10:46:00 +02:00

Added a clearer error message when a tech is undefined. closes #1210

This commit is contained in:
Dominic 2014-05-19 12:45:00 -07:00 committed by Steve Heffernan
parent 38c394fc90
commit f3ab261d5b
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,7 @@ CHANGELOG
* Modernized the fullscreen API and added support for IE11 [[view](https://github.com/videojs/video.js/pull/1205)]
* Added cross-browser testing with SauceLabs, and added Karma as the default test runner ([view](https://github.com/videojs/video.js/pull/1187))
* Fixed saucelabs integration to run on commits in TravisCI ([view](https://github.com/videojs/video.js/pull/1214))
* Added a clearer error message when a tech is undefined ([view](https://github.com/videojs/video.js/pull/1210))
--------------------

View File

@ -1026,6 +1026,12 @@ vjs.Player.prototype.selectSource = function(sources){
var techName = vjs.capitalize(j[i]),
tech = window['videojs'][techName];
// Check if the current tech is defined before continuing
if (!tech) {
vjs.log.error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.');
continue;
}
// Check if the browser supports this technology
if (tech.isSupported()) {
// Loop through each source object