This commit is contained in:
Timothy Z. 2026-07-21 21:58:48 +03:00 committed by GitHub
commit 4f0cce6e05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -197,8 +197,9 @@ const useSubtitles = ({
}
if (extraTrack?.id) {
if (video.state.selectedExtraSubtitlesTrackId !== extraTrack.id ||
video.state.selectedSubtitlesTrackId !== null) {
// Keep the first external match while waiting for an embedded track.
// Add-on subtitle results can arrive in stages and reorder `extraTrack`.
if (video.state.selectedExtraSubtitlesTrackId === null) {
video.setExtraSubtitlesTrack(extraTrack.id);
}