Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 688650a

Browse files
Merge pull request #1 from valtech-sd/bugfix/fix-tvOS-audio-menu
Fix for tvOS native audio menu language selector
2 parents f79782b + a42240d commit 688650a

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

ios/Video/RCTVideo.m

+13-5
Original file line numberDiff line numberDiff line change
@@ -1134,12 +1134,20 @@ - (void)setMediaSelectionTrackForCharacteristic:(AVMediaCharacteristic)character
11341134
}
11351135
}
11361136
} else { // default. invalid type or "system"
1137-
[_player.currentItem selectMediaOptionAutomaticallyInMediaSelectionGroup:group];
1138-
return;
1137+
#if TARGET_OS_TV
1138+
// Do noting. Fix for tvOS native audio menu language selector
1139+
#else
1140+
[_player.currentItem selectMediaOptionAutomaticallyInMediaSelectionGroup:group];
1141+
return;
1142+
#endif
11391143
}
1140-
1141-
// If a match isn't found, option will be nil and text tracks will be disabled
1142-
[_player.currentItem selectMediaOption:mediaOption inMediaSelectionGroup:group];
1144+
1145+
#if TARGET_OS_TV
1146+
// Do noting. Fix for tvOS native audio menu language selector
1147+
#else
1148+
// If a match isn't found, option will be nil and text tracks will be disabled
1149+
[_player.currentItem selectMediaOption:mediaOption inMediaSelectionGroup:group];
1150+
#endif
11431151
}
11441152

11451153
- (void)setSelectedAudioTrack:(NSDictionary *)selectedAudioTrack {

0 commit comments

Comments
 (0)