I am using Video.js and videojs-contrib-dash plugin to play a video from an MPD file with DRM. The MPD file has two resolutions: 480p and 720p. ABR (Adaptive Bitrate) is working well according to the network bandwidth. However, I want to manually set the resolution. I tried using videojs-contrib-quality-levels, but it's not working.
It's just giving an empty array.
const qualityLevelsPlugin = player.qualityLevels();
Versions:
"video.js": "^7.20.3",
"videojs-contrib-dash": "^5.1.1",
"videojs-contrib-quality-levels": "^2.2.1",
Also tried adding quality levels manually to qualityLevels using addQualityLevel method.
Using this for trigger:
qualityLevelsPlugin.selectedIndex_ = 1;
qualityLevelsPlugin.trigger({ type: 'change', selectedIndex: 1 });
But not working!!
These are the things you should check during the integration of video.js with quality controllers. Here i have attach the code for Vue.js as well.
Resolution display in video js