Merge pull request #1 from valtech-sd/bugfix/fix-tvOS-audio-menu

Fix for tvOS native audio menu language selector
This commit is contained in:
Shane Mckenna 2021-08-26 15:33:10 -07:00 committed by GitHub
commit 688650a9db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1134,12 +1134,20 @@ static int const RCTVideoUnset = -1;
}
}
} 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 {