Skip to content

Commit 952188e

Browse files
fix: qualityMenu button to left of playToggle (#118)
* fix: qualityMenu button to left of playToggle * use indexof instead of findIndex Co-authored-by: hswaminathan <[email protected]>
1 parent b548b3b commit 952188e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/plugin.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,9 @@ const plugin = function(options) {
336336
}
337337

338338
if (referenceChild) {
339-
const controlBarChild = this.controlBar.addChild('overlay', mergeOptions);
339+
const referenceChildIndex = this.controlBar.children().indexOf(referenceChild);
340+
const controlBarChild = this.controlBar.addChild('overlay', mergeOptions, referenceChildIndex);
340341

341-
this.controlBar.el().insertBefore(
342-
controlBarChild.el(),
343-
referenceChild.el()
344-
);
345342
return controlBarChild;
346343
}
347344
}

0 commit comments

Comments
 (0)