From 89cc2f46cab68be6b992b8030d897c899b1c90e5 Mon Sep 17 00:00:00 2001 From: Daniel Hoffend Date: Wed, 23 Nov 2016 11:14:39 +0100 Subject: [PATCH] number HLS streams without resolution.height --- lib/videojs-resolution-switcher.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/videojs-resolution-switcher.js b/lib/videojs-resolution-switcher.js index 85db9f7..6daf03e 100644 --- a/lib/videojs-resolution-switcher.js +++ b/lib/videojs-resolution-switcher.js @@ -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 }); });