Skip to content

Commit

Permalink
Merge pull request learnyst#1 from valtech-sd/bugfix/fix-tvOS-audio-menu
Browse files Browse the repository at this point in the history
Fix for tvOS native audio menu language selector
  • Loading branch information
ShaneMckenna23 authored Aug 26, 2021
2 parents f79782b + a42240d commit 688650a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions ios/Video/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -1134,12 +1134,20 @@ - (void)setMediaSelectionTrackForCharacteristic:(AVMediaCharacteristic)character
}
}
} else { // default. invalid type or "system"
[_player.currentItem selectMediaOptionAutomaticallyInMediaSelectionGroup:group];
return;
#if TARGET_OS_TV
// Do noting. Fix for tvOS native audio menu language selector
#else
[_player.currentItem selectMediaOptionAutomaticallyInMediaSelectionGroup:group];
return;
#endif
}

// If a match isn't found, option will be nil and text tracks will be disabled
[_player.currentItem selectMediaOption:mediaOption inMediaSelectionGroup:group];

#if TARGET_OS_TV
// Do noting. Fix for tvOS native audio menu language selector
#else
// If a match isn't found, option will be nil and text tracks will be disabled
[_player.currentItem selectMediaOption:mediaOption inMediaSelectionGroup:group];
#endif
}

- (void)setSelectedAudioTrack:(NSDictionary *)selectedAudioTrack {
Expand Down

0 comments on commit 688650a

Please sign in to comment.