mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-03 01:39:19 +02:00
jshint problems
This commit is contained in:
parent
85fb021388
commit
4f751b593d
1 changed files with 13 additions and 13 deletions
|
@ -86,7 +86,7 @@
|
|||
// 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)
|
||||
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';
|
||||
}
|
||||
setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function() {
|
||||
|
@ -297,15 +297,15 @@
|
|||
var qualities = player.tech_.ytPlayer.getAvailableQualityLevels();
|
||||
// Map youtube qualities names
|
||||
var _yts = {
|
||||
"highres": {res: 1080, label: '1080', yt: 'highres'},
|
||||
"hd1080": {res: 1080, label: '1080', yt: 'hd1080'},
|
||||
"hd720": {res: 720, label: '720', yt: 'hd720'},
|
||||
"large": {res: 480, label: '480', yt: 'large'},
|
||||
"medium": {res: 360, label: '360', yt: 'medium'},
|
||||
"small": {res: 240, label: '240', yt: 'small'},
|
||||
"tiny": {res: 144, label: '144', yt: 'tiny'},
|
||||
"auto": {res: 0, label: 'auto', yt: 'default'}
|
||||
}
|
||||
highres: {res: 1080, label: '1080', yt: 'highres'},
|
||||
hd1080: {res: 1080, label: '1080', yt: 'hd1080'},
|
||||
hd720: {res: 720, label: '720', yt: 'hd720'},
|
||||
large: {res: 480, label: '480', yt: 'large'},
|
||||
medium: {res: 360, label: '360', yt: 'medium'},
|
||||
small: {res: 240, label: '240', yt: 'small'},
|
||||
tiny: {res: 144, label: '144', yt: 'tiny'},
|
||||
auto: {res: 0, label: 'auto', yt: 'default'}
|
||||
};
|
||||
|
||||
var _sources = [];
|
||||
|
||||
|
@ -316,7 +316,7 @@
|
|||
label: _yts[q].label,
|
||||
res: _yts[q].res,
|
||||
_yt: _yts[q].yt
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
groupedSrc = bucketSources(_sources);
|
||||
|
@ -325,9 +325,9 @@
|
|||
var _customSourcePicker = function(_player, _sources, _label){
|
||||
player.tech_.ytPlayer.setPlaybackQuality(_sources[0]._yt);
|
||||
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, {
|
||||
sources: groupedSrc,
|
||||
initialySelectedLabel: choosen.label,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue