On quality change, it is not reflected immediately.
The quality should change and it should continue to play in that quality immediately
This is how Im changing the quality
let firstLoad = true;
const dash = Dash.MediaPlayer().create();
dash.on("manifestLoaded", (e) => {
const _qualityLevels = (e.data as any).Period.AdaptationSet[0]
.Representation;
const qualityLevels = _qualityLevels.map((l: any) => l.height) as any[];
options.quality = {
default: qualityLevels[0],
options: qualityLevels,
forced: true,
onChange: function (quality: number) {
if (!firstLoad) {
const t = qualityLevels.findIndex((q) => q === quality);
console.log(t);
dash.setQualityFor("video", t);
}
firstLoad = false;
},
};
plyr = new Plyr(element!, options);
});
dash.initialize(element!, decodedUrl, true);
Try enabling fastSwitch:
player.updateSettings({streaming: {fastSwitchEnabled: true}})
Ok now im seeing that the quality doesnt set to what i set, it automatically bumps it
Try to disable ABR if you dont want to automatically adjust the quality after a change:
const cfg = {streaming: {abr: {autoSwitchBitrate: {video: false}}}}
self.player.updateSettings(cfg);
self.player.setQualityFor('video', item.index - 1);
Yes that is definitely what I was missing. Thanks!