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:
parent
38c394fc90
commit
f3ab261d5b
@ -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))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user