1
0
mirror of https://github.com/videojs/video.js.git synced 2025-04-11 11:42:08 +02:00

fix: make sure audio track hides with one item (#4202)

This commit is contained in:
Gary Katsevman 2017-03-15 11:27:52 -04:00 committed by GitHub
parent d79b8a7013
commit 0fd7aad850

View File

@ -51,6 +51,9 @@ class AudioTrackButton extends TrackButton {
* An array of menu items
*/
createItems(items = []) {
// if there's only one audio track, there no point in showing it
this.hideThreshold_ = 1;
const tracks = this.player_.audioTracks();
for (let i = 0; i < tracks.length; i++) {