Fixed wrong array typing
This commit is contained in:
parent
340522a471
commit
062ea29ad2
1 changed files with 4 additions and 1 deletions
|
@ -640,10 +640,13 @@ function tryRemoveElement(elem) {
|
|||
|
||||
// https://msdn.microsoft.com/en-us/library/hh772507(v=vs.85).aspx
|
||||
|
||||
/**
|
||||
* @type {HTMLOptionsCollection|any[]}
|
||||
*/
|
||||
const elemAudioTracks = elem.audioTracks || [];
|
||||
console.debug(`found ${elemAudioTracks.length} audio tracks`);
|
||||
|
||||
for (const [i, audioTrack] of elemAudioTracks.entries()) {
|
||||
for (const [i, audioTrack] of Array.from(elemAudioTracks).entries()) {
|
||||
if (audioIndex === i) {
|
||||
console.debug(`setting audio track ${i} to enabled`);
|
||||
audioTrack.enabled = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue