diff --git a/src/js/tracks/text-track-select.js b/src/js/tracks/text-track-select.js index e196247d8e..288bc55b7a 100644 --- a/src/js/tracks/text-track-select.js +++ b/src/js/tracks/text-track-select.js @@ -1,5 +1,6 @@ import Component from '../component'; import * as Dom from '../utils/dom'; +import { newGUID } from '../utils/guid'; /** @import Player from './player' */ /** @import { ContentDescriptor } from '../utils/dom' */ @@ -29,11 +30,10 @@ class TextTrackSelect extends Component { * @param {string} [options.id] * A text with part of an string to create atribute of aria-labelledby. * - * @param {array} [options.SelectOptions] + * @param {Array} [options.SelectOptions] * Array that contains the value & textContent of for each of the * options elements. */ - constructor(player, options = {}) { super(player, options); @@ -57,7 +57,11 @@ class TextTrackSelect extends Component { }, {}, this.options_.SelectOptions.map((optionText) => { - const optionId = this.options_.labelId + '-' + optionText[1].replace(/\W+/g, ''); + // Constructs an id for the