videojs-hls-quality-selector
videojs-hls-quality-selector copied to clipboard
When `Representation.height` is undefined, menu shows `undefinedp` and this plugin will not work.
As in the README of videojs-contrib-quality-levels says, All properties are required except width and height. Ref: https://github.com/videojs/videojs-contrib-quality-levels#populating-the-list
So when Representation.height
is undefined, selector menu shows only one undefinedp
item. (which should be multiple items like 1080p / 720p / etc)
Representation {
id: string,
width: number, // may be undefined
height: number, // may be undefined
bitrate: number,
enabled: function
}
Suggestion: when height is undefined, maybe use bitrate as key?
Ran into the same problem.
Half-baked fix at https://github.com/FEichinger/videojs-hls-quality-selector/tree/add-bitrate-detection (based on @phoban01 adding support for options). Possibly finishing that up in the next couple of days.
I am running into the same issue . Seeing the two qualities : auto and undefined p ? I have no idea how i ran into this. Can anybody help me?
@hemantachhami19 it happens if your m3u8 playlist file does not have the resolution defined in the #EXT-X-STREAM-INF
lines. You need to change your encoding settings to add the resolution to those lines in the playlist.
A bitrate key could also be nice if you want multiple bitrates at same resolution
@hemantachhami19 it happens if your m3u8 playlist file does not have the resolution defined in the
#EXT-X-STREAM-INF
lines. You need to change your encoding settings to add the resolution to those lines in the playlist.
I had this line but also not working
in my case the undefinedp comes from the source stream which is of unknown size and bandwidth, i wish to replace undefinedp with 'source' somehow.
Reading the documentation on this, I was able to remove the audio only version of my m3u8 stream via:
let qualityLevels = player.qualityLevels();
qualityLevels.on('addqualitylevel', function (event) {
let qualityLevel = event.qualityLevel;
if (qualityLevel.height) {
qualityLevel.enabled = true;
} else {
qualityLevels.removeQualityLevel(qualityLevel);
qualityLevel.enabled = false;
}
});
Reading the documentation on this, I was able to remove the audio only version of my m3u8 stream via:
let qualityLevels = player.qualityLevels(); qualityLevels.on('addqualitylevel', function (event) { let qualityLevel = event.qualityLevel; if (qualityLevel.height) { qualityLevel.enabled = true; } else { qualityLevels.removeQualityLevel(qualityLevel); qualityLevel.enabled = false; } });
I passed through the same and it's solution completely saved me. THANK YOU! 💕💕