video: fix initial quality switch
parent
d9e3d3e0c1
commit
103cce1a35
|
@ -215,6 +215,12 @@ class VideoContentSetup {
|
||||||
this.initPlyr(content);
|
this.initPlyr(content);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
content.videojs.qualityLevels()?.on("addqualitylevel", (e) => {
|
||||||
|
window.setTimeout(() => {
|
||||||
|
this.initPlyr(content);
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
|
||||||
// Get correct orientation
|
// Get correct orientation
|
||||||
axios
|
axios
|
||||||
.get<any>(
|
.get<any>(
|
||||||
|
@ -251,6 +257,9 @@ class VideoContentSetup {
|
||||||
initPlyr(content: any) {
|
initPlyr(content: any) {
|
||||||
if (content.plyr) return;
|
if (content.plyr) return;
|
||||||
|
|
||||||
|
content.videoElement = content.videojs?.el()?.querySelector("video");
|
||||||
|
if (!content.videoElement) return;
|
||||||
|
|
||||||
// Retain original parent for video element
|
// Retain original parent for video element
|
||||||
const origParent = content.videoElement.parentElement;
|
const origParent = content.videoElement.parentElement;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue