jshint problems

This commit is contained in:
Kasper Moskwiak 2016-03-13 21:22:25 +01:00
parent 85fb021388
commit 4f751b593d

View file

@ -86,7 +86,7 @@
// Probably because of https://github.com/videojs/video-js-swf/issues/124 // Probably because of https://github.com/videojs/video-js-swf/issues/124
// If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle (timeupdate doesn't work properly with flash) // If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle (timeupdate doesn't work properly with flash)
var handleSeekEvent = 'loadeddata'; var handleSeekEvent = 'loadeddata';
if(this.player_.techName_ != 'Youtube' && this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') { if(this.player_.techName_ !== 'Youtube' && this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') {
handleSeekEvent = 'timeupdate'; handleSeekEvent = 'timeupdate';
} }
setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function() { setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function() {
@ -297,15 +297,15 @@
var qualities = player.tech_.ytPlayer.getAvailableQualityLevels(); var qualities = player.tech_.ytPlayer.getAvailableQualityLevels();
// Map youtube qualities names // Map youtube qualities names
var _yts = { var _yts = {
"highres": {res: 1080, label: '1080', yt: 'highres'}, highres: {res: 1080, label: '1080', yt: 'highres'},
"hd1080": {res: 1080, label: '1080', yt: 'hd1080'}, hd1080: {res: 1080, label: '1080', yt: 'hd1080'},
"hd720": {res: 720, label: '720', yt: 'hd720'}, hd720: {res: 720, label: '720', yt: 'hd720'},
"large": {res: 480, label: '480', yt: 'large'}, large: {res: 480, label: '480', yt: 'large'},
"medium": {res: 360, label: '360', yt: 'medium'}, medium: {res: 360, label: '360', yt: 'medium'},
"small": {res: 240, label: '240', yt: 'small'}, small: {res: 240, label: '240', yt: 'small'},
"tiny": {res: 144, label: '144', yt: 'tiny'}, tiny: {res: 144, label: '144', yt: 'tiny'},
"auto": {res: 0, label: 'auto', yt: 'default'} auto: {res: 0, label: 'auto', yt: 'default'}
} };
var _sources = []; var _sources = [];
@ -316,7 +316,7 @@
label: _yts[q].label, label: _yts[q].label,
res: _yts[q].res, res: _yts[q].res,
_yt: _yts[q].yt _yt: _yts[q].yt
}) });
}); });
groupedSrc = bucketSources(_sources); groupedSrc = bucketSources(_sources);
@ -325,9 +325,9 @@
var _customSourcePicker = function(_player, _sources, _label){ var _customSourcePicker = function(_player, _sources, _label){
player.tech_.ytPlayer.setPlaybackQuality(_sources[0]._yt); player.tech_.ytPlayer.setPlaybackQuality(_sources[0]._yt);
return player; return player;
} };
var choosen = {label: 'auto', res: 0, sources: groupedSrc.label['auto']}; var choosen = {label: 'auto', res: 0, sources: groupedSrc.label.auto};
var menuButton = new ResolutionMenuButton(player, { var menuButton = new ResolutionMenuButton(player, {
sources: groupedSrc, sources: groupedSrc,
initialySelectedLabel: choosen.label, initialySelectedLabel: choosen.label,