number HLS streams without resolution.height

This commit is contained in:
Daniel Hoffend 2016-11-23 11:14:39 +01:00 committed by GitHub
parent e22c3aa043
commit 89cc2f46ca

View file

@ -357,13 +357,14 @@
player.one('loadedmetadata', function(){
var representations = hls.representations();
var _sources = [{ src: 'auto', type: 'application/x-mpegURL', label: 'auto', res: 0}];
var i = 1;
representations.map(function(representation){
_sources.push({
src: representation,
type: 'application/x-mpegURL',
label: representation.height,
res: representation.height
label: typeof representation.height != 'undefined' ? representation.height : '#'+(i++),
res: typeof representation.height != 'undefined' ? representation.height : 0
});
});