mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-03 17:59:42 +02:00
Merge 89cc2f46ca
into e22c3aa043
This commit is contained in:
commit
d0c7a7c064
1 changed files with 3 additions and 2 deletions
|
@ -357,13 +357,14 @@
|
||||||
player.one('loadedmetadata', function(){
|
player.one('loadedmetadata', function(){
|
||||||
var representations = hls.representations();
|
var representations = hls.representations();
|
||||||
var _sources = [{ src: 'auto', type: 'application/x-mpegURL', label: 'auto', res: 0}];
|
var _sources = [{ src: 'auto', type: 'application/x-mpegURL', label: 'auto', res: 0}];
|
||||||
|
var i = 1;
|
||||||
|
|
||||||
representations.map(function(representation){
|
representations.map(function(representation){
|
||||||
_sources.push({
|
_sources.push({
|
||||||
src: representation,
|
src: representation,
|
||||||
type: 'application/x-mpegURL',
|
type: 'application/x-mpegURL',
|
||||||
label: representation.height,
|
label: typeof representation.height != 'undefined' ? representation.height : '#'+(i++),
|
||||||
res: representation.height
|
res: typeof representation.height != 'undefined' ? representation.height : 0
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue