Skip to content

Commit

Permalink
fix audio track selection
Browse files Browse the repository at this point in the history
  • Loading branch information
OothecaPickle committed Dec 1, 2024
1 parent f0311c2 commit 86be099
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,9 @@ export default defineComponent({

chosenVariant = findMostSimilarAudioBandwidth(matches, audioBandwidth)
} else {
chosenVariant = matches[0]
chosenVariant = matches.reduce((prev, current) => {
return (current.audioBandwidth > prev.audioBandwidth) ? current : prev
}, matches[0])
}

player.selectVariantTrack(chosenVariant)
Expand Down

0 comments on commit 86be099

Please sign in to comment.