Skip to content

Commit

Permalink
Merge branch 'release/2.7.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed Sep 30, 2019
2 parents 8e5f5d1 + f54b632 commit ddc30db
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ - (BOOL)prepareToPlayMediaComposition:(SRGMediaComposition *)mediaComposition
}

NSDictionary<SRGResourceLoaderOption, id> *options = userInfo[SRGAnalyticsDataProviderUserInfoResourceLoaderOptionsKey];
NSAssert([options isKindOfClass:NSDictionary.class], @"Resource loader options must be provided as a dictionary");
NSAssert(! options || [options isKindOfClass:NSDictionary.class], @"Resource loader options must be provided as a dictionary");

AVURLAsset *URLAsset = nil;

Expand Down
12 changes: 9 additions & 3 deletions Framework_MediaPlayer/Sources/SRGMediaPlayerTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,15 @@ - (NSString *)screenType
- (BOOL)subtitlesEnabled
{
AVPlayerItem *playerItem = self.mediaPlayerController.player.currentItem;
AVMediaSelectionGroup *legibleGroup = [playerItem.asset mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicLegible];
AVMediaSelectionOption *currentLegibleOption = [playerItem selectedMediaOptionInMediaSelectionGroup:legibleGroup];
return currentLegibleOption != nil;
AVAsset *asset = playerItem.asset;
if ([asset statusOfValueForKey:@keypath(asset.availableMediaCharacteristicsWithMediaSelectionOptions) error:NULL] == AVKeyValueStatusLoaded) {
AVMediaSelectionGroup *legibleGroup = [playerItem.asset mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicLegible];
AVMediaSelectionOption *currentLegibleOption = [playerItem selectedMediaOptionInMediaSelectionGroup:legibleGroup];
return currentLegibleOption != nil;
}
else {
return NO;
}
}

#pragma mark Notifications
Expand Down
8 changes: 4 additions & 4 deletions SRGAnalytics.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.7.5;
MARKETING_VERSION = 3.7.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -1994,7 +1994,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.7.5;
MARKETING_VERSION = 3.7.6;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand Down Expand Up @@ -2336,7 +2336,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.7.5;
MARKETING_VERSION = 3.7.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -2389,7 +2389,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.7.5;
MARKETING_VERSION = 3.7.6;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand Down

0 comments on commit ddc30db

Please sign in to comment.