mirror of
https://github.com/videojs/video.js.git
synced 2026-06-19 22:15:04 +02:00
fix: make sure audio track hides with one item (#4202)
This commit is contained in:
@@ -51,6 +51,9 @@ class AudioTrackButton extends TrackButton {
|
|||||||
* An array of menu items
|
* An array of menu items
|
||||||
*/
|
*/
|
||||||
createItems(items = []) {
|
createItems(items = []) {
|
||||||
|
// if there's only one audio track, there no point in showing it
|
||||||
|
this.hideThreshold_ = 1;
|
||||||
|
|
||||||
const tracks = this.player_.audioTracks();
|
const tracks = this.player_.audioTracks();
|
||||||
|
|
||||||
for (let i = 0; i < tracks.length; i++) {
|
for (let i = 0; i < tracks.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user