From a42240d5543cbc9f7c11a0692c05d625d345457a Mon Sep 17 00:00:00 2001 From: Shane Mckenna Date: Mon, 23 Aug 2021 11:59:53 -0700 Subject: [PATCH] Fix for tvOS native audio menu language selector --- ios/Video/RCTVideo.m | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index a4702ceee9..5021f95eae 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -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 {