Fix default sideload text track for system caption setting

This commit is contained in:
Hampton Maxwell 2018-07-09 21:08:40 -07:00 committed by GitHub
parent 0d32a31b85
commit fe26f54bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -783,7 +783,7 @@ static NSString *const timedMetadata = @"timedMetadata";
NSArray *captionSettings = (__bridge NSArray*)captioningMediaCharacteristics;
if ([captionSettings containsObject: AVMediaCharacteristicTranscribesSpokenDialogForAccessibility]) {
// iterate through the textTracks to find a matching option, or default to the first object.
selectedTrackIndex = firstTextIndex;
selectedTrackIndex = 0;
NSString * systemLanguage = [[NSLocale preferredLanguages] firstObject];
for (int i = 0; i < textTracks.count; ++i) {