diff --git a/MUXSDKStats.json b/MUXSDKStats.json index 23c79c62..dbafcc0e 100644 --- a/MUXSDKStats.json +++ b/MUXSDKStats.json @@ -12,5 +12,6 @@ "3.3.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.0/MUXSDKStats.xcframework.zip", "3.3.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.1/MUXSDKStats.xcframework.zip", "3.3.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.2/MUXSDKStats.xcframework.zip", - "3.3.3": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.3/MUXSDKStats.xcframework.zip" + "3.3.3": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.3/MUXSDKStats.xcframework.zip", + "3.4.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.4.0/MUXSDKStats.xcframework.zip" } diff --git a/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj b/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj index 4eef6d76..76a2b19a 100644 --- a/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj +++ b/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj @@ -569,7 +569,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.3.3; + MARKETING_VERSION = 3.4.0; MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap"; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv; @@ -598,7 +598,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.3.3; + MARKETING_VERSION = 3.4.0; MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv; PRODUCT_NAME = MUXSDKStats; @@ -780,7 +780,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.3.3; + MARKETING_VERSION = 3.4.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -808,7 +808,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.3.3; + MARKETING_VERSION = 3.4.0; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.h b/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.h index afe6c976..3fb7c326 100644 --- a/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.h +++ b/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.h @@ -35,15 +35,24 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { MUXSDKViewOrientationLandscape }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @protocol MUXSDKPlayDispatchDelegate - (void) playbackStartedForPlayer:(NSString *) name; - (void) videoChangedForPlayer:(NSString *) name; @end +#pragma clang diagnostic pop + @interface MUXSDKPlayerBinding : NSObject { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @private NSString *_name; - NSString *_software; + NSString *_softwareName; AVPlayer *_player; AVPlayerItem *_playerItem; id _timeObserver; @@ -76,11 +85,14 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { BOOL _playbackIsLivestream; NSInteger _totalFrameDrops; BOOL _totalFrameDropsHasChanged; + NSString *_softwareVersion; } @property (nonatomic, weak) id playDispatchDelegate; -- (id)initWithName:(NSString *)name andSoftware:(NSString *)software; +- (id)initWithName:(NSString *)name + andSoftware:(NSString *)software; + - (void)attachAVPlayer:(AVPlayer *)player; - (void)detachAVPlayer; - (void)programChangedForPlayer; @@ -104,24 +116,129 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { - (void)dispatchError:(NSString *)code withMessage:(NSString *)message; - (void)didTriggerManualVideoChange; -@end +#pragma clang diagnostic pop +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName; + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion; + +@end @interface MUXSDKAVPlayerViewControllerBinding : MUXSDKPlayerBinding { @private AVPlayerViewController *_viewController; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerViewController *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerViewController to monitor using this binding +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerViewController *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerViewController:"))); + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerViewController:(nonnull AVPlayerViewController *)playerViewController; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerViewController:(nonnull AVPlayerViewController *)playerViewController; @end - @interface MUXSDKAVPlayerLayerBinding : MUXSDKPlayerBinding { @private AVPlayerLayer *_view; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerLayer *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerLayer to monitor +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerLayer *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerLayer:")));; + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + +@end + +@interface MUXSDKAVPlayerBinding : MUXSDKPlayerBinding { +@private + CGSize _fixedPlayerSize; +} + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + fixedPlayerSize:(CGSize)fixedPlayerSize; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize; @end diff --git a/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m b/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m index 829cd227..86d6fc8f 100644 --- a/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m +++ b/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m @@ -12,7 +12,7 @@ // SDK constants. NSString *const MUXSDKPluginName = @"apple-mux"; -NSString *const MUXSDKPluginVersion = @"3.3.3"; +NSString *const MUXSDKPluginVersion = @"3.4.0"; NSString *const MUXSessionDataPrefix = @"io.litix.data."; // Min number of seconds between timeupdate events. (100ms) @@ -42,11 +42,28 @@ @implementation MUXSDKPlayerBinding -- (id)initWithName:(NSString *)name andSoftware:(NSString *)software { +- (id)initWithName:(NSString *)name + andSoftware:(NSString *)software { + return [self initWithPlayerName:name + softwareName:software + softwareVersion:nil]; +} + +- (id)initWithPlayerName:(NSString *)playerName + softwareName:(NSString *)softwareName { + return [self initWithPlayerName:playerName + softwareName:softwareName + softwareVersion:nil]; +} + +- (id)initWithPlayerName:(NSString *)playerName + softwareName:(NSString *)softwareName + softwareVersion:(NSString *)softwareVersion { self = [super init]; if (self) { - _name = name; - _software = software; + _name = playerName; + _softwareName = softwareName; + _softwareVersion = softwareVersion; _automaticErrorTracking = true; _automaticVideoChange = true; _didTriggerManualVideoChange = false; @@ -590,7 +607,8 @@ - (MUXSDKPlayerData *)getPlayerData { // Mostly static values. [playerData setPlayerMuxPluginName:MUXSDKPluginName]; [playerData setPlayerMuxPluginVersion:MUXSDKPluginVersion]; - [playerData setPlayerSoftwareName:_software]; + [playerData setPlayerSoftwareName:_softwareName]; + [playerData setPlayerSoftwareVersion:_softwareVersion]; NSString *language = [[NSLocale preferredLanguages] firstObject]; if (language) { @@ -1103,11 +1121,10 @@ - (void)didTriggerManualVideoChange { @implementation MUXSDKAVPlayerViewControllerBinding - (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerViewController *)view { - self = [super initWithName:name andSoftware:software]; - if (self) { - _viewController = view; - } - return (self); + return [self initWithPlayerName:name + softwareName:software + softwareVersion:nil + playerViewController:view]; } - (CGRect)getVideoBounds { @@ -1122,17 +1139,62 @@ - (CGRect)getViewBounds { return [[_viewController view] bounds]; } +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerViewController:(nonnull AVPlayerViewController *)playerViewController { + return [self initWithPlayerName:playerName + softwareName:softwareName + softwareVersion:nil + playerViewController:playerViewController]; +} + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerViewController:(nonnull AVPlayerViewController *)playerViewController { + self = [super initWithPlayerName:playerName + softwareName:softwareName + softwareVersion:softwareVersion]; + if (self) { + _viewController = playerViewController; + } + return self; +} + @end @implementation MUXSDKAVPlayerLayerBinding -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerLayer *)view { - self = [super initWithName:name andSoftware:software]; +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerLayer *)view { + return [self initWithPlayerName:name + softwareName:software + softwareVersion:nil + playerLayer:view]; +} + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerLayer:(nonnull AVPlayerLayer *)playerLayer { + return [self initWithPlayerName:playerName + softwareName:softwareName + softwareVersion:nil + playerLayer:playerLayer]; +} + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerLayer:(nonnull AVPlayerLayer *)playerLayer { + self = [super initWithPlayerName:playerName + softwareName:softwareName + softwareVersion:softwareVersion]; if (self) { - _view = view; + _view = playerLayer; } - return (self); + return self; } - (CGRect)getVideoBounds { @@ -1144,3 +1206,48 @@ - (CGRect)getViewBounds { } @end + +@implementation MUXSDKAVPlayerBinding + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + fixedPlayerSize:(CGSize)fixedPlayerSize { + return [self initWithPlayerName:playerName + softwareName:softwareName + softwareVersion:nil + fixedPlayerSize:fixedPlayerSize]; +} + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize { + + self = [super initWithPlayerName:playerName + softwareName:softwareName + softwareVersion:softwareVersion]; + if (self) { + _fixedPlayerSize = fixedPlayerSize; + } + return self; +} + +- (CGRect)getVideoBounds { + return CGRectMake( + 0.0, + 0.0, + 0.0, + 0.0 + ); +} + +- (CGRect)getViewBounds { + return CGRectMake( + 0.0, + 0.0, + _fixedPlayerSize.width, + _fixedPlayerSize.height + ); +} + +@end diff --git a/MUXSDKStats/MUXSDKStats/MUXSDKStats.h b/MUXSDKStats/MUXSDKStats/MUXSDKStats.h index 3c1ff2e5..55cbdb32 100644 --- a/MUXSDKStats/MUXSDKStats/MUXSDKStats.h +++ b/MUXSDKStats/MUXSDKStats/MUXSDKStats.h @@ -46,13 +46,15 @@ FOUNDATION_EXPORT - (_Null_unspecified instancetype)init NS_UNAVAILABLE; + (_Null_unspecified instancetype)new NS_UNAVAILABLE; +#pragma mark - AVPlayerViewController Monitoring + /*! @method monitorAVPlayerViewController:withPlayerName:customerData: @abstract Starts to monitor a given AVPlayerViewController. @param player An AVPlayerViewController to monitor @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -66,7 +68,7 @@ FOUNDATION_EXPORT @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -82,7 +84,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -99,7 +101,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param domain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -116,10 +118,13 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name A name for this instance of the player @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData: @@ -129,10 +134,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:automaticErrorTracking: @@ -142,10 +151,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @abstract Starts to monitor a given AVPlayerViewController. @@ -155,10 +168,15 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method updateAVPlayerViewController:withPlayerName @@ -167,8 +185,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name The name of the player instance to update @discussion Use this method to change which AVPlayerViewController a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerViewController call. */ -+ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name; +#pragma mark - AVPlayerLayer Monitoring /*! @method monitorAVPlayerLayer:withPlayerName:customerData: @@ -243,7 +263,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -257,7 +280,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -271,7 +298,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerLayer:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @@ -285,7 +316,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @@ -295,7 +331,72 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player instance to update @discussion Use this method to change which AVPlayerLayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerLayer call. */ -+ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name; + +#pragma mark - AVPlayer Monitoring + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking + beaconCollectionDomain:(nullable NSString *)collectionDomain; + +/*! + @method updateAVPlayer:withPlayerName:fixedPlayerSize: + @abstract Updates the monitor for a player to a new AVPlayer. + @param player The new AVPlayer to monitor + @param name The name of the player instance to update + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @discussion Use this method to change which AVPlayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayer call. + */ ++ (void)updateAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize; + +#pragma mark - Teardown Monitoring /*! @method destroyPlayer: @@ -305,6 +406,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName */ + (void)destroyPlayer:(nonnull NSString *)name; +#pragma mark - Automatic Video Change + /*! @method setAutomaticVideoChange:forPlayer:enabled @abstract Allows default videochange functionality to be disabled. @@ -312,7 +415,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @discussion Use this method to disable built in videochange calls when using AVQueuePlayer. The player name provided must been passed as the name in a monitorPlayer:withPlayerName:andConfig: call. The config provided should match the specifications in the Mux docs at https://docs.mux.com and should set the enabled value to false. The default setting is true. */ -+ (void)setAutomaticVideoChange:(nonnull NSString *)name enabled:(Boolean)enabled; ++ (void)setAutomaticVideoChange:(nonnull NSString *)name + enabled:(Boolean)enabled; + +#pragma mark - Manual Video Change /*! @method videoChangeForPlayer:withCustomerData: @@ -364,6 +470,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData:(nullable MUXSDKCustomerViewData *)viewData __attribute__((deprecated("Please migrate to videoChangeForPlayer:withCustomerData:"))); +#pragma mark - Program Change + /*! @method programChangeForPlayer:withCustomerData: @abstract Signals that a player is now playing a different video of a playlist; or a different program of a live stream @@ -384,6 +492,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName + (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to programChangeForPlayer:withCustomerData:"))); +#pragma mark - Custom Data + /*! @method setCustomerData:forPlayer: @abstract allows customerData to be set or updated for the player @@ -391,7 +501,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param customerData A MUXSDKCustomerData object with player, video, and view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. */ -+ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData forPlayer:(nonnull NSString *)name; ++ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData + forPlayer:(nonnull NSString *)name; /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData @@ -401,7 +512,9 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param videoData A MUXSDKCustomerVideoData object with video metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData or playerData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData:viewData: @@ -412,8 +525,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param viewData A MUXSDKCustomerViewData object with view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData, playerData, or viewData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); +#pragma mark - Orientation Change /*! @method orientationChangeForPlayer:withOrientation: @@ -421,7 +538,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player to update @param orientation A MUXSDKViewOrientation enum value representing if the view has changed to portrait or landscape */ -+ (void) orientationChangeForPlayer:(nonnull NSString *) name withOrientation:(MUXSDKViewOrientation) orientation; ++ (void) orientationChangeForPlayer:(nonnull NSString *) name + withOrientation:(MUXSDKViewOrientation) orientation; + +#pragma mark - Error Dispatch /*! @method dispatchError:withMessage:forPlayer @@ -430,6 +550,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param message The error message in string format @param name The name of the player */ -+ (void)dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)message forPlayer:(nonnull NSString *)name; ++ (void)dispatchError:(nonnull NSString *)code + withMessage:(nonnull NSString *)message + forPlayer:(nonnull NSString *)name; @end diff --git a/MUXSDKStats/MUXSDKStats/MUXSDKStats.m b/MUXSDKStats/MUXSDKStats/MUXSDKStats.m index 78038b24..cf235ec4 100644 --- a/MUXSDKStats/MUXSDKStats/MUXSDKStats.m +++ b/MUXSDKStats/MUXSDKStats/MUXSDKStats.m @@ -20,6 +20,7 @@ // Software constants. NSString *const MuxPlayerSoftwareAVPlayerViewController = @"AVPlayerViewController"; NSString *const MuxPlayerSoftwareAVPlayerLayer = @"AVPlayerLayer"; +NSString *const MuxPlayerSoftwareAVPlayer = @"AVPlayer"; NSString *const MuxDeviceIDUserDefaultsKey = @"MUX_DEVICE_ID"; @@ -28,7 +29,7 @@ @implementation MUXSDKStats static MUXSDKDispatcher *_dispatcher; // Name => MuxPlayerSoftware value. static NSMutableDictionary *_bindings; -// Name => AVPlayerViewController or AVPlayerLayer +// Name => AVPlayerViewController or AVPlayerLayer or AVPlayer static NSMutableDictionary *_viewControllers; static MUXSDKPlayerBindingManager *_playerBindingManager; @@ -213,7 +214,9 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlaye MUXSDKCustomerViewData *viewData = customerData.customerViewData; MUXSDKCustomData *customData = customerData.customData; - MUXSDKAVPlayerViewControllerBinding *newBinding = [[MUXSDKAVPlayerViewControllerBinding alloc] initWithName:name software:MuxPlayerSoftwareAVPlayerViewController andView:player]; + MUXSDKAVPlayerViewControllerBinding *newBinding = [[MUXSDKAVPlayerViewControllerBinding alloc] initWithPlayerName:name + softwareName:MuxPlayerSoftwareAVPlayerViewController + playerViewController:player]; [newBinding setAutomaticErrorTracking:automaticErrorTracking]; newBinding.playDispatchDelegate = _playerBindingManager; @@ -521,6 +524,104 @@ + (void)updateAVPlayerLayer:(AVPlayerLayer *)player withPlayerName:(NSString *)n } } +#pragma mark Monitor AVPlayer + ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData { + return [self monitorAVPlayer:player + withPlayerName:name + fixedPlayerSize:fixedPlayerSize + customerData:customerData + automaticErrorTracking:true + beaconCollectionDomain:nil]; +} + ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking { + return [self monitorAVPlayer:player + withPlayerName:name + fixedPlayerSize:fixedPlayerSize + customerData:customerData + automaticErrorTracking:automaticErrorTracking + beaconCollectionDomain:nil]; +} + ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking + beaconCollectionDomain:(nullable NSString *)collectionDomain { + MUXSDKCustomerViewerData *viewerData = [customerData customerViewerData]; + if (viewerData != nil) { + _customerViewerData = viewerData; + } + + [self initSDK]; + + NSString *binding = [_bindings valueForKey:name]; + if (binding) { + // Destroy any previously existing player with this name. + [self destroyPlayer:name]; + } + + MUXSDKCustomerPlayerData *playerData = customerData.customerPlayerData; + MUXSDKCustomerVideoData *videoData = customerData.customerVideoData; + MUXSDKCustomerViewData *viewData = customerData.customerViewData; + MUXSDKCustomData *customData = customerData.customData; + + MUXSDKAVPlayerBinding *newBinding = [[MUXSDKAVPlayerBinding alloc] initWithPlayerName:name + softwareName:MuxPlayerSoftwareAVPlayer + fixedPlayerSize:fixedPlayerSize]; + [newBinding setAutomaticErrorTracking:automaticErrorTracking]; + newBinding.playDispatchDelegate = _playerBindingManager; + + if (collectionDomain != nil && collectionDomain.length > 0) { + [MUXSDKCore setBeaconCollectionDomain:collectionDomain forPlayer:name]; + } + [MUXSDKCore setDeviceId:[MUXSDKStats getUUIDString] forPlayer:name]; + + [_customerPlayerDataStore setPlayerData:playerData forPlayerName:name]; + if (videoData) { + [_customerVideoDataStore setVideoData:videoData forPlayerName:name]; + } + if (viewData) { + [_customerViewDataStore setViewData:viewData forPlayerName:name]; + } + if (customData) { + [_customerCustomDataStore setCustomData:customData forPlayerName:name]; + } + [_viewControllers setValue:newBinding forKey:name]; + [_bindings setValue:MuxPlayerSoftwareAVPlayer forKey:name]; + + [newBinding attachAVPlayer:player]; + [_playerBindingManager newViewForPlayer:name]; + return newBinding; +} + ++ (void)updateAVPlayer:(AVPlayer *)player + withPlayerName:(NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize { + [self initSDK]; + NSString *binding = [_bindings valueForKey:name]; + if (binding) { + if (binding == MuxPlayerSoftwareAVPlayer) { + MUXSDKAVPlayerBinding *playerBinding = [_viewControllers valueForKey:name]; + [playerBinding detachAVPlayer]; + [playerBinding attachAVPlayer:player]; + } else { + NSLog(@"MUXSDK-ERROR - Mux failed to update the monitor because the previous player with name %@ was not set up via monitorAVPlayer", name); + } + } else { + NSLog(@"MUXSDK-ERROR - Mux failed to update the monitor because no player exists with the player name: %@", name); + } +} + #pragma mark UUID + (NSString *)getUUIDString { diff --git a/MUXSDKStats/MUXSDKStatsTests/MUXSDKPlayerBindingTests.m b/MUXSDKStats/MUXSDKStatsTests/MUXSDKPlayerBindingTests.m index 89ff9fb4..71d0a0ad 100644 --- a/MUXSDKStats/MUXSDKStatsTests/MUXSDKPlayerBindingTests.m +++ b/MUXSDKStats/MUXSDKStatsTests/MUXSDKPlayerBindingTests.m @@ -28,7 +28,9 @@ - (void) tearDown { [MUXSDKCore resetCapturedEvents]; } -- (MUXSDKAVPlayerViewControllerBinding *) setupViewControllerPlayerBinding:(NSString *)name { +- (MUXSDKAVPlayerViewControllerBinding *) setupViewControllerPlayerBinding:(NSString *)name + softwareName:(NSString *)softwareName + softwareVersion:(NSString *)softwareVersion { MUXSDKPlayerBindingManager *sut = [[MUXSDKPlayerBindingManager alloc] init]; MUXSDKCustomerPlayerDataStore *playerDataStore = [[MUXSDKCustomerPlayerDataStore alloc] init]; MUXSDKCustomerVideoDataStore *videoDataStore = [[MUXSDKCustomerVideoDataStore alloc] init]; @@ -37,9 +39,7 @@ - (MUXSDKAVPlayerViewControllerBinding *) setupViewControllerPlayerBinding:(NSSt sut.customerPlayerDataStore = playerDataStore; sut.customerVideoDataStore = videoDataStore; sut.viewControllers = vcs; - - // Set up player - NSString *software = @"Software"; + NSURL *url = [[NSURL alloc] initWithString:@"https://foo.mp4"]; AVPlayer *player = [AVPlayer playerWithURL:url]; AVPlayerViewController *controller = [[AVPlayerViewController alloc] init]; @@ -53,9 +53,49 @@ - (MUXSDKAVPlayerViewControllerBinding *) setupViewControllerPlayerBinding:(NSSt [videoDataStore setVideoData:customerVideoData forPlayerName:name]; // Create Player Binding - MUXSDKAVPlayerViewControllerBinding *binding = [[MUXSDKAVPlayerViewControllerBinding alloc] initWithName:name software:software andView:controller]; + MUXSDKAVPlayerViewControllerBinding *binding = [[MUXSDKAVPlayerViewControllerBinding alloc] initWithPlayerName:name + softwareName:softwareName + softwareVersion:softwareVersion + playerViewController:controller]; + [vcs setObject:binding forKey:name]; - + + [binding attachAVPlayer:player]; + [sut newViewForPlayer:name]; + return binding; +} + +- (MUXSDKAVPlayerBinding *) setupAVPlayerBinding:(NSString *)name + softwareName:(NSString *)softwareName + softwareVersion:(NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize { + MUXSDKPlayerBindingManager *sut = [[MUXSDKPlayerBindingManager alloc] init]; + MUXSDKCustomerPlayerDataStore *playerDataStore = [[MUXSDKCustomerPlayerDataStore alloc] init]; + MUXSDKCustomerVideoDataStore *videoDataStore = [[MUXSDKCustomerVideoDataStore alloc] init]; + NSMutableDictionary *vcs = [[NSMutableDictionary alloc] init]; + + sut.customerPlayerDataStore = playerDataStore; + sut.customerVideoDataStore = videoDataStore; + sut.viewControllers = vcs; + + // Set up player + NSURL *url = [[NSURL alloc] initWithString:@"https://foo.mp4"]; + AVPlayer *player = [AVPlayer playerWithURL:url]; + + // Set up customer metadata + MUXSDKCustomerPlayerData *customerPlayerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"A KEY"]; + MUXSDKCustomerVideoData *customerVideoData = [[MUXSDKCustomerVideoData alloc] init]; + [customerVideoData setVideoTitle:@"01234"]; + [playerDataStore setPlayerData:customerPlayerData forPlayerName:name]; + [videoDataStore setVideoData:customerVideoData forPlayerName:name]; + + // Create Player Binding + MUXSDKAVPlayerBinding *binding = [[MUXSDKAVPlayerBinding alloc] initWithPlayerName:name + softwareName:softwareName + softwareVersion:softwareVersion + fixedPlayerSize:fixedPlayerSize]; + [vcs setObject:binding forKey:name]; + [binding attachAVPlayer:player]; [sut newViewForPlayer:name]; return binding; @@ -63,8 +103,10 @@ - (MUXSDKAVPlayerViewControllerBinding *) setupViewControllerPlayerBinding:(NSSt - (void)testPlayerBindingManagerStartsNewViews { NSString *name = @"Test"; - [self setupViewControllerPlayerBinding:name]; - + [self setupViewControllerPlayerBinding:name + softwareName:@"TestSoftware" + softwareVersion:@"0.1.0"]; + XCTAssertEqual(3, [MUXSDKCore eventsCountForPlayer:name]); id event0 = [MUXSDKCore eventAtIndex:0 forPlayer:name]; id event1 = [MUXSDKCore eventAtIndex:1 forPlayer:name]; @@ -75,28 +117,151 @@ - (void)testPlayerBindingManagerStartsNewViews { XCTAssertEqual([event2 getType], MUXSDKPlaybackEventPlayerReadyEventType); } -- (void)testPlayerBindingAutomaticErrorTrackingEnabled { +- (void)testAVPlayerViewControllerBindingAutomaticErrorTrackingEnabled { NSString *name = @"awesome-player"; - MUXSDKAVPlayerViewControllerBinding *binding = [self setupViewControllerPlayerBinding:name]; + MUXSDKAVPlayerViewControllerBinding *binding = [self setupViewControllerPlayerBinding:name + softwareName:@"TestSoftware" + softwareVersion:@"0.1.0"]; [binding dispatchError]; XCTAssertEqual(5, [MUXSDKCore eventsCountForPlayer:name]); id event = [MUXSDKCore eventAtIndex:4 forPlayer:name]; XCTAssertEqual([event getType], MUXSDKPlaybackEventErrorEventType); + MUXSDKPlaybackEvent *playbackEvent = (MUXSDKPlaybackEvent *)event; + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareName, + @"TestSoftware" + ); + + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareVersion, + @"0.1.0" + ); } -- (void)testPlayerBindingAutomaticErrorTrackingDisabled { +- (void)testAVPlayerViewControllerBindingAutomaticErrorTrackingDisabled { NSString *name = @"awesome-player"; - MUXSDKAVPlayerViewControllerBinding *binding = [self setupViewControllerPlayerBinding:name]; + MUXSDKAVPlayerViewControllerBinding *binding = [self setupViewControllerPlayerBinding:name + softwareName:@"TestSoftware" + softwareVersion:@"0.1.0"]; [binding setAutomaticErrorTracking:false]; [binding dispatchError]; XCTAssertEqual(3, [MUXSDKCore eventsCountForPlayer:name]); id event = [MUXSDKCore eventAtIndex:2 forPlayer:name]; XCTAssertEqual([event getType], MUXSDKPlaybackEventPlayerReadyEventType); + + MUXSDKPlaybackEvent *playbackEvent = (MUXSDKPlaybackEvent *)event; + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareName, + @"TestSoftware" + ); + + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareVersion, + @"0.1.0" + ); +} + +- (void)testAVPlayerBindingAutomaticErrorTrackingEnabled { + NSString *name = @"awesome-player"; + MUXSDKAVPlayerBinding *binding = [self setupAVPlayerBinding:name + softwareName:@"TestSoftware" + softwareVersion:@"0.1.0" + fixedPlayerSize:CGSizeMake(100.0, 100.0)]; + + [binding dispatchViewInit]; + [binding dispatchPlayerReady]; + [binding dispatchPlay]; + [binding dispatchPlaying]; + + NSUInteger count = [MUXSDKCore eventsCountForPlayer:name]; + + for (NSInteger index = 0; index < count; index++) { + id event = [MUXSDKCore eventAtIndex:index + forPlayer:name]; + if (event.isPlayback) { + MUXSDKPlaybackEvent *playbackEvent = (MUXSDKPlaybackEvent *)event; + + XCTAssertEqualWithAccuracy( + playbackEvent.playerData.playerHeight.floatValue, + 100.0, + 0.01 + ); + XCTAssertEqualWithAccuracy( + playbackEvent.playerData.playerWidth.floatValue, + 100.0, + 0.01 + ); + + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareName, + @"TestSoftware" + ); + + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareVersion, + @"0.1.0" + ); + } + + } + + id event = [MUXSDKCore eventAtIndex:2 forPlayer:name]; + XCTAssertEqual([event getType], MUXSDKPlaybackEventPlayerReadyEventType); + } +- (void)testAVPlayerBindingAutomaticErrorTrackingDisabled { + NSString *name = @"awesome-player"; + MUXSDKAVPlayerBinding *binding = [self setupAVPlayerBinding:name + softwareName:@"TestSoftware" + softwareVersion:@"0.1.0" + fixedPlayerSize:CGSizeMake(100.0, 100.0)]; + [binding setAutomaticErrorTracking:false]; + + [binding dispatchViewInit]; + [binding dispatchPlayerReady]; + [binding dispatchPlay]; + [binding dispatchPlaying]; + + NSUInteger count = [MUXSDKCore eventsCountForPlayer:name]; + for (NSInteger index = 0; index < count; index++) { + id event = [MUXSDKCore eventAtIndex:index + forPlayer:name]; + if (event.isPlayback) { + MUXSDKPlaybackEvent *playbackEvent = (MUXSDKPlaybackEvent *)event; + + XCTAssertEqualWithAccuracy( + playbackEvent.playerData.playerHeight.floatValue, + 100.0, + 0.01 + ); + XCTAssertEqualWithAccuracy( + playbackEvent.playerData.playerWidth.floatValue, + 100.0, + 0.01 + ); + + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareName, + @"TestSoftware" + ); + + XCTAssertEqual( + playbackEvent.playerData.playerSoftwareVersion, + @"0.1.0" + ); + + } + + } + + id event = [MUXSDKCore eventAtIndex:2 + forPlayer:name]; + XCTAssertEqual([event getType], MUXSDKPlaybackEventPlayerReadyEventType); +} @end diff --git a/Mux-Stats-AVPlayer.podspec b/Mux-Stats-AVPlayer.podspec index d6b6a1f4..ddcdfd3f 100644 --- a/Mux-Stats-AVPlayer.podspec +++ b/Mux-Stats-AVPlayer.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Mux-Stats-AVPlayer' - s.version = '3.3.3' + s.version = '3.4.0' s.source = { :git => 'https://github.com/muxinc/mux-stats-sdk-avplayer.git', :tag => "v#{s.version}" } diff --git a/XCFramework/MUXSDKStats.xcframework/Info.plist b/XCFramework/MUXSDKStats.xcframework/Info.plist index a4bfa08c..2cab5fe1 100644 --- a/XCFramework/MUXSDKStats.xcframework/Info.plist +++ b/XCFramework/MUXSDKStats.xcframework/Info.plist @@ -6,7 +6,7 @@ LibraryIdentifier - ios-arm64_x86_64-simulator + tvos-arm64_x86_64-simulator LibraryPath MUXSDKStats.framework SupportedArchitectures @@ -15,13 +15,13 @@ x86_64 SupportedPlatform - ios + tvos SupportedPlatformVariant simulator LibraryIdentifier - tvos-arm64 + ios-arm64 LibraryPath MUXSDKStats.framework SupportedArchitectures @@ -29,11 +29,11 @@ arm64 SupportedPlatform - tvos + ios LibraryIdentifier - tvos-arm64_x86_64-simulator + ios-arm64_x86_64-simulator LibraryPath MUXSDKStats.framework SupportedArchitectures @@ -42,36 +42,36 @@ x86_64 SupportedPlatform - tvos + ios SupportedPlatformVariant simulator LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-maccatalyst LibraryPath MUXSDKStats.framework SupportedArchitectures arm64 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + maccatalyst LibraryIdentifier - ios-arm64_x86_64-maccatalyst + tvos-arm64 LibraryPath MUXSDKStats.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform - ios - SupportedPlatformVariant - maccatalyst + tvos CFBundlePackageType diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h index afe6c976..3fb7c326 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h @@ -35,15 +35,24 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { MUXSDKViewOrientationLandscape }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @protocol MUXSDKPlayDispatchDelegate - (void) playbackStartedForPlayer:(NSString *) name; - (void) videoChangedForPlayer:(NSString *) name; @end +#pragma clang diagnostic pop + @interface MUXSDKPlayerBinding : NSObject { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @private NSString *_name; - NSString *_software; + NSString *_softwareName; AVPlayer *_player; AVPlayerItem *_playerItem; id _timeObserver; @@ -76,11 +85,14 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { BOOL _playbackIsLivestream; NSInteger _totalFrameDrops; BOOL _totalFrameDropsHasChanged; + NSString *_softwareVersion; } @property (nonatomic, weak) id playDispatchDelegate; -- (id)initWithName:(NSString *)name andSoftware:(NSString *)software; +- (id)initWithName:(NSString *)name + andSoftware:(NSString *)software; + - (void)attachAVPlayer:(AVPlayer *)player; - (void)detachAVPlayer; - (void)programChangedForPlayer; @@ -104,24 +116,129 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { - (void)dispatchError:(NSString *)code withMessage:(NSString *)message; - (void)didTriggerManualVideoChange; -@end +#pragma clang diagnostic pop +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName; + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion; + +@end @interface MUXSDKAVPlayerViewControllerBinding : MUXSDKPlayerBinding { @private AVPlayerViewController *_viewController; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerViewController *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerViewController to monitor using this binding +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerViewController *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerViewController:"))); + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerViewController:(nonnull AVPlayerViewController *)playerViewController; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerViewController:(nonnull AVPlayerViewController *)playerViewController; @end - @interface MUXSDKAVPlayerLayerBinding : MUXSDKPlayerBinding { @private AVPlayerLayer *_view; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerLayer *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerLayer to monitor +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerLayer *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerLayer:")));; + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + +@end + +@interface MUXSDKAVPlayerBinding : MUXSDKPlayerBinding { +@private + CGSize _fixedPlayerSize; +} + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + fixedPlayerSize:(CGSize)fixedPlayerSize; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize; @end diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h index 3c1ff2e5..55cbdb32 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h @@ -46,13 +46,15 @@ FOUNDATION_EXPORT - (_Null_unspecified instancetype)init NS_UNAVAILABLE; + (_Null_unspecified instancetype)new NS_UNAVAILABLE; +#pragma mark - AVPlayerViewController Monitoring + /*! @method monitorAVPlayerViewController:withPlayerName:customerData: @abstract Starts to monitor a given AVPlayerViewController. @param player An AVPlayerViewController to monitor @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -66,7 +68,7 @@ FOUNDATION_EXPORT @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -82,7 +84,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -99,7 +101,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param domain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -116,10 +118,13 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name A name for this instance of the player @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData: @@ -129,10 +134,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:automaticErrorTracking: @@ -142,10 +151,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @abstract Starts to monitor a given AVPlayerViewController. @@ -155,10 +168,15 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method updateAVPlayerViewController:withPlayerName @@ -167,8 +185,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name The name of the player instance to update @discussion Use this method to change which AVPlayerViewController a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerViewController call. */ -+ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name; +#pragma mark - AVPlayerLayer Monitoring /*! @method monitorAVPlayerLayer:withPlayerName:customerData: @@ -243,7 +263,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -257,7 +280,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -271,7 +298,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerLayer:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @@ -285,7 +316,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @@ -295,7 +331,72 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player instance to update @discussion Use this method to change which AVPlayerLayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerLayer call. */ -+ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name; + +#pragma mark - AVPlayer Monitoring + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking + beaconCollectionDomain:(nullable NSString *)collectionDomain; + +/*! + @method updateAVPlayer:withPlayerName:fixedPlayerSize: + @abstract Updates the monitor for a player to a new AVPlayer. + @param player The new AVPlayer to monitor + @param name The name of the player instance to update + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @discussion Use this method to change which AVPlayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayer call. + */ ++ (void)updateAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize; + +#pragma mark - Teardown Monitoring /*! @method destroyPlayer: @@ -305,6 +406,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName */ + (void)destroyPlayer:(nonnull NSString *)name; +#pragma mark - Automatic Video Change + /*! @method setAutomaticVideoChange:forPlayer:enabled @abstract Allows default videochange functionality to be disabled. @@ -312,7 +415,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @discussion Use this method to disable built in videochange calls when using AVQueuePlayer. The player name provided must been passed as the name in a monitorPlayer:withPlayerName:andConfig: call. The config provided should match the specifications in the Mux docs at https://docs.mux.com and should set the enabled value to false. The default setting is true. */ -+ (void)setAutomaticVideoChange:(nonnull NSString *)name enabled:(Boolean)enabled; ++ (void)setAutomaticVideoChange:(nonnull NSString *)name + enabled:(Boolean)enabled; + +#pragma mark - Manual Video Change /*! @method videoChangeForPlayer:withCustomerData: @@ -364,6 +470,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData:(nullable MUXSDKCustomerViewData *)viewData __attribute__((deprecated("Please migrate to videoChangeForPlayer:withCustomerData:"))); +#pragma mark - Program Change + /*! @method programChangeForPlayer:withCustomerData: @abstract Signals that a player is now playing a different video of a playlist; or a different program of a live stream @@ -384,6 +492,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName + (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to programChangeForPlayer:withCustomerData:"))); +#pragma mark - Custom Data + /*! @method setCustomerData:forPlayer: @abstract allows customerData to be set or updated for the player @@ -391,7 +501,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param customerData A MUXSDKCustomerData object with player, video, and view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. */ -+ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData forPlayer:(nonnull NSString *)name; ++ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData + forPlayer:(nonnull NSString *)name; /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData @@ -401,7 +512,9 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param videoData A MUXSDKCustomerVideoData object with video metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData or playerData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData:viewData: @@ -412,8 +525,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param viewData A MUXSDKCustomerViewData object with view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData, playerData, or viewData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); +#pragma mark - Orientation Change /*! @method orientationChangeForPlayer:withOrientation: @@ -421,7 +538,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player to update @param orientation A MUXSDKViewOrientation enum value representing if the view has changed to portrait or landscape */ -+ (void) orientationChangeForPlayer:(nonnull NSString *) name withOrientation:(MUXSDKViewOrientation) orientation; ++ (void) orientationChangeForPlayer:(nonnull NSString *) name + withOrientation:(MUXSDKViewOrientation) orientation; + +#pragma mark - Error Dispatch /*! @method dispatchError:withMessage:forPlayer @@ -430,6 +550,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param message The error message in string format @param name The name of the player */ -+ (void)dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)message forPlayer:(nonnull NSString *)name; ++ (void)dispatchError:(nonnull NSString *)code + withMessage:(nonnull NSString *)message + forPlayer:(nonnull NSString *)name; @end diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Info.plist index 52c1b0b6..87c2e3de 100644 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Info.plist and b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/MUXSDKStats index c4d9d34b..4189fceb 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKPlayerBinding.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKPlayerBinding.h index afe6c976..3fb7c326 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKPlayerBinding.h +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKPlayerBinding.h @@ -35,15 +35,24 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { MUXSDKViewOrientationLandscape }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @protocol MUXSDKPlayDispatchDelegate - (void) playbackStartedForPlayer:(NSString *) name; - (void) videoChangedForPlayer:(NSString *) name; @end +#pragma clang diagnostic pop + @interface MUXSDKPlayerBinding : NSObject { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @private NSString *_name; - NSString *_software; + NSString *_softwareName; AVPlayer *_player; AVPlayerItem *_playerItem; id _timeObserver; @@ -76,11 +85,14 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { BOOL _playbackIsLivestream; NSInteger _totalFrameDrops; BOOL _totalFrameDropsHasChanged; + NSString *_softwareVersion; } @property (nonatomic, weak) id playDispatchDelegate; -- (id)initWithName:(NSString *)name andSoftware:(NSString *)software; +- (id)initWithName:(NSString *)name + andSoftware:(NSString *)software; + - (void)attachAVPlayer:(AVPlayer *)player; - (void)detachAVPlayer; - (void)programChangedForPlayer; @@ -104,24 +116,129 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { - (void)dispatchError:(NSString *)code withMessage:(NSString *)message; - (void)didTriggerManualVideoChange; -@end +#pragma clang diagnostic pop +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName; + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion; + +@end @interface MUXSDKAVPlayerViewControllerBinding : MUXSDKPlayerBinding { @private AVPlayerViewController *_viewController; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerViewController *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerViewController to monitor using this binding +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerViewController *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerViewController:"))); + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerViewController:(nonnull AVPlayerViewController *)playerViewController; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerViewController:(nonnull AVPlayerViewController *)playerViewController; @end - @interface MUXSDKAVPlayerLayerBinding : MUXSDKPlayerBinding { @private AVPlayerLayer *_view; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerLayer *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerLayer to monitor +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerLayer *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerLayer:")));; + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + +@end + +@interface MUXSDKAVPlayerBinding : MUXSDKPlayerBinding { +@private + CGSize _fixedPlayerSize; +} + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + fixedPlayerSize:(CGSize)fixedPlayerSize; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize; @end diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKStats.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKStats.h index 3c1ff2e5..55cbdb32 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKStats.h +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Headers/MUXSDKStats.h @@ -46,13 +46,15 @@ FOUNDATION_EXPORT - (_Null_unspecified instancetype)init NS_UNAVAILABLE; + (_Null_unspecified instancetype)new NS_UNAVAILABLE; +#pragma mark - AVPlayerViewController Monitoring + /*! @method monitorAVPlayerViewController:withPlayerName:customerData: @abstract Starts to monitor a given AVPlayerViewController. @param player An AVPlayerViewController to monitor @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -66,7 +68,7 @@ FOUNDATION_EXPORT @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -82,7 +84,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -99,7 +101,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param domain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -116,10 +118,13 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name A name for this instance of the player @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData: @@ -129,10 +134,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:automaticErrorTracking: @@ -142,10 +151,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @abstract Starts to monitor a given AVPlayerViewController. @@ -155,10 +168,15 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method updateAVPlayerViewController:withPlayerName @@ -167,8 +185,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name The name of the player instance to update @discussion Use this method to change which AVPlayerViewController a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerViewController call. */ -+ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name; +#pragma mark - AVPlayerLayer Monitoring /*! @method monitorAVPlayerLayer:withPlayerName:customerData: @@ -243,7 +263,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -257,7 +280,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -271,7 +298,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerLayer:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @@ -285,7 +316,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @@ -295,7 +331,72 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player instance to update @discussion Use this method to change which AVPlayerLayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerLayer call. */ -+ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name; + +#pragma mark - AVPlayer Monitoring + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking + beaconCollectionDomain:(nullable NSString *)collectionDomain; + +/*! + @method updateAVPlayer:withPlayerName:fixedPlayerSize: + @abstract Updates the monitor for a player to a new AVPlayer. + @param player The new AVPlayer to monitor + @param name The name of the player instance to update + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @discussion Use this method to change which AVPlayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayer call. + */ ++ (void)updateAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize; + +#pragma mark - Teardown Monitoring /*! @method destroyPlayer: @@ -305,6 +406,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName */ + (void)destroyPlayer:(nonnull NSString *)name; +#pragma mark - Automatic Video Change + /*! @method setAutomaticVideoChange:forPlayer:enabled @abstract Allows default videochange functionality to be disabled. @@ -312,7 +415,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @discussion Use this method to disable built in videochange calls when using AVQueuePlayer. The player name provided must been passed as the name in a monitorPlayer:withPlayerName:andConfig: call. The config provided should match the specifications in the Mux docs at https://docs.mux.com and should set the enabled value to false. The default setting is true. */ -+ (void)setAutomaticVideoChange:(nonnull NSString *)name enabled:(Boolean)enabled; ++ (void)setAutomaticVideoChange:(nonnull NSString *)name + enabled:(Boolean)enabled; + +#pragma mark - Manual Video Change /*! @method videoChangeForPlayer:withCustomerData: @@ -364,6 +470,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData:(nullable MUXSDKCustomerViewData *)viewData __attribute__((deprecated("Please migrate to videoChangeForPlayer:withCustomerData:"))); +#pragma mark - Program Change + /*! @method programChangeForPlayer:withCustomerData: @abstract Signals that a player is now playing a different video of a playlist; or a different program of a live stream @@ -384,6 +492,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName + (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to programChangeForPlayer:withCustomerData:"))); +#pragma mark - Custom Data + /*! @method setCustomerData:forPlayer: @abstract allows customerData to be set or updated for the player @@ -391,7 +501,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param customerData A MUXSDKCustomerData object with player, video, and view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. */ -+ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData forPlayer:(nonnull NSString *)name; ++ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData + forPlayer:(nonnull NSString *)name; /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData @@ -401,7 +512,9 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param videoData A MUXSDKCustomerVideoData object with video metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData or playerData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData:viewData: @@ -412,8 +525,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param viewData A MUXSDKCustomerViewData object with view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData, playerData, or viewData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); +#pragma mark - Orientation Change /*! @method orientationChangeForPlayer:withOrientation: @@ -421,7 +538,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player to update @param orientation A MUXSDKViewOrientation enum value representing if the view has changed to portrait or landscape */ -+ (void) orientationChangeForPlayer:(nonnull NSString *) name withOrientation:(MUXSDKViewOrientation) orientation; ++ (void) orientationChangeForPlayer:(nonnull NSString *) name + withOrientation:(MUXSDKViewOrientation) orientation; + +#pragma mark - Error Dispatch /*! @method dispatchError:withMessage:forPlayer @@ -430,6 +550,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param message The error message in string format @param name The name of the player */ -+ (void)dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)message forPlayer:(nonnull NSString *)name; ++ (void)dispatchError:(nonnull NSString *)code + withMessage:(nonnull NSString *)message + forPlayer:(nonnull NSString *)name; @end diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats index 2b692855..eb899adb 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist index 366899b6..3237bd1f 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 22G91 + 23A344 CFBundleDevelopmentRegion en CFBundleExecutable @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.3.2 + 3.4.0 CFBundleSupportedPlatforms MacOSX diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h index afe6c976..3fb7c326 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h @@ -35,15 +35,24 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { MUXSDKViewOrientationLandscape }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @protocol MUXSDKPlayDispatchDelegate - (void) playbackStartedForPlayer:(NSString *) name; - (void) videoChangedForPlayer:(NSString *) name; @end +#pragma clang diagnostic pop + @interface MUXSDKPlayerBinding : NSObject { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @private NSString *_name; - NSString *_software; + NSString *_softwareName; AVPlayer *_player; AVPlayerItem *_playerItem; id _timeObserver; @@ -76,11 +85,14 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { BOOL _playbackIsLivestream; NSInteger _totalFrameDrops; BOOL _totalFrameDropsHasChanged; + NSString *_softwareVersion; } @property (nonatomic, weak) id playDispatchDelegate; -- (id)initWithName:(NSString *)name andSoftware:(NSString *)software; +- (id)initWithName:(NSString *)name + andSoftware:(NSString *)software; + - (void)attachAVPlayer:(AVPlayer *)player; - (void)detachAVPlayer; - (void)programChangedForPlayer; @@ -104,24 +116,129 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { - (void)dispatchError:(NSString *)code withMessage:(NSString *)message; - (void)didTriggerManualVideoChange; -@end +#pragma clang diagnostic pop +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName; + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion; + +@end @interface MUXSDKAVPlayerViewControllerBinding : MUXSDKPlayerBinding { @private AVPlayerViewController *_viewController; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerViewController *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerViewController to monitor using this binding +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerViewController *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerViewController:"))); + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerViewController:(nonnull AVPlayerViewController *)playerViewController; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerViewController:(nonnull AVPlayerViewController *)playerViewController; @end - @interface MUXSDKAVPlayerLayerBinding : MUXSDKPlayerBinding { @private AVPlayerLayer *_view; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerLayer *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerLayer to monitor +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerLayer *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerLayer:")));; + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + +@end + +@interface MUXSDKAVPlayerBinding : MUXSDKPlayerBinding { +@private + CGSize _fixedPlayerSize; +} + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + fixedPlayerSize:(CGSize)fixedPlayerSize; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize; @end diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h index 3c1ff2e5..55cbdb32 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h @@ -46,13 +46,15 @@ FOUNDATION_EXPORT - (_Null_unspecified instancetype)init NS_UNAVAILABLE; + (_Null_unspecified instancetype)new NS_UNAVAILABLE; +#pragma mark - AVPlayerViewController Monitoring + /*! @method monitorAVPlayerViewController:withPlayerName:customerData: @abstract Starts to monitor a given AVPlayerViewController. @param player An AVPlayerViewController to monitor @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -66,7 +68,7 @@ FOUNDATION_EXPORT @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -82,7 +84,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -99,7 +101,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param domain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -116,10 +118,13 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name A name for this instance of the player @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData: @@ -129,10 +134,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:automaticErrorTracking: @@ -142,10 +151,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @abstract Starts to monitor a given AVPlayerViewController. @@ -155,10 +168,15 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method updateAVPlayerViewController:withPlayerName @@ -167,8 +185,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name The name of the player instance to update @discussion Use this method to change which AVPlayerViewController a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerViewController call. */ -+ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name; +#pragma mark - AVPlayerLayer Monitoring /*! @method monitorAVPlayerLayer:withPlayerName:customerData: @@ -243,7 +263,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -257,7 +280,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -271,7 +298,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerLayer:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @@ -285,7 +316,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @@ -295,7 +331,72 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player instance to update @discussion Use this method to change which AVPlayerLayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerLayer call. */ -+ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name; + +#pragma mark - AVPlayer Monitoring + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking + beaconCollectionDomain:(nullable NSString *)collectionDomain; + +/*! + @method updateAVPlayer:withPlayerName:fixedPlayerSize: + @abstract Updates the monitor for a player to a new AVPlayer. + @param player The new AVPlayer to monitor + @param name The name of the player instance to update + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @discussion Use this method to change which AVPlayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayer call. + */ ++ (void)updateAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize; + +#pragma mark - Teardown Monitoring /*! @method destroyPlayer: @@ -305,6 +406,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName */ + (void)destroyPlayer:(nonnull NSString *)name; +#pragma mark - Automatic Video Change + /*! @method setAutomaticVideoChange:forPlayer:enabled @abstract Allows default videochange functionality to be disabled. @@ -312,7 +415,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @discussion Use this method to disable built in videochange calls when using AVQueuePlayer. The player name provided must been passed as the name in a monitorPlayer:withPlayerName:andConfig: call. The config provided should match the specifications in the Mux docs at https://docs.mux.com and should set the enabled value to false. The default setting is true. */ -+ (void)setAutomaticVideoChange:(nonnull NSString *)name enabled:(Boolean)enabled; ++ (void)setAutomaticVideoChange:(nonnull NSString *)name + enabled:(Boolean)enabled; + +#pragma mark - Manual Video Change /*! @method videoChangeForPlayer:withCustomerData: @@ -364,6 +470,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData:(nullable MUXSDKCustomerViewData *)viewData __attribute__((deprecated("Please migrate to videoChangeForPlayer:withCustomerData:"))); +#pragma mark - Program Change + /*! @method programChangeForPlayer:withCustomerData: @abstract Signals that a player is now playing a different video of a playlist; or a different program of a live stream @@ -384,6 +492,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName + (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to programChangeForPlayer:withCustomerData:"))); +#pragma mark - Custom Data + /*! @method setCustomerData:forPlayer: @abstract allows customerData to be set or updated for the player @@ -391,7 +501,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param customerData A MUXSDKCustomerData object with player, video, and view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. */ -+ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData forPlayer:(nonnull NSString *)name; ++ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData + forPlayer:(nonnull NSString *)name; /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData @@ -401,7 +512,9 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param videoData A MUXSDKCustomerVideoData object with video metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData or playerData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData:viewData: @@ -412,8 +525,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param viewData A MUXSDKCustomerViewData object with view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData, playerData, or viewData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); +#pragma mark - Orientation Change /*! @method orientationChangeForPlayer:withOrientation: @@ -421,7 +538,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player to update @param orientation A MUXSDKViewOrientation enum value representing if the view has changed to portrait or landscape */ -+ (void) orientationChangeForPlayer:(nonnull NSString *) name withOrientation:(MUXSDKViewOrientation) orientation; ++ (void) orientationChangeForPlayer:(nonnull NSString *) name + withOrientation:(MUXSDKViewOrientation) orientation; + +#pragma mark - Error Dispatch /*! @method dispatchError:withMessage:forPlayer @@ -430,6 +550,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param message The error message in string format @param name The name of the player */ -+ (void)dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)message forPlayer:(nonnull NSString *)name; ++ (void)dispatchError:(nonnull NSString *)code + withMessage:(nonnull NSString *)message + forPlayer:(nonnull NSString *)name; @end diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist index b2ef2f30..147478e1 100644 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist and b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats index 1e71134a..30a60e80 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources index f9c3bfdd..b36bc5f3 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources @@ -6,15 +6,15 @@ Headers/MUXSDKPlayerBinding.h - M1nmxfgFpgAo4Skt045RSal7UVc= + OmOK2slz3DIpJEbcmwaw2hPEK74= Headers/MUXSDKStats.h - gL3TQD7YDBFt5IoFykpHpruUeTg= + 66PnMoG/84rMndU6e6SADoenSdo= Info.plist - nd9xgKxy/H3f/Qya+NqVsfjj7e4= + AjDNYcQmPCeJrPlaSIW+DuWzfXE= Modules/module.modulemap @@ -27,14 +27,14 @@ hash2 - v/d7IiNFkMA1dh3GkOetvEhA+Zp1/N/8Tl1i4n9IgmU= + OhmbqPLfTiqAp43q1hz0eGmVO2DDq1iR5vX8k6kEMFY= Headers/MUXSDKStats.h hash2 - WPI1/4ZxroUaGYRc8x7nKs1evl1NuiKQ0IVqexFL6Ps= + a3fuzXs5a1MYzZ2mzH9haKBGmC7fptGHzKCbBrYyvyQ= Modules/module.modulemap diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h index afe6c976..3fb7c326 100644 --- a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h +++ b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h @@ -35,15 +35,24 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { MUXSDKViewOrientationLandscape }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @protocol MUXSDKPlayDispatchDelegate - (void) playbackStartedForPlayer:(NSString *) name; - (void) videoChangedForPlayer:(NSString *) name; @end +#pragma clang diagnostic pop + @interface MUXSDKPlayerBinding : NSObject { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @private NSString *_name; - NSString *_software; + NSString *_softwareName; AVPlayer *_player; AVPlayerItem *_playerItem; id _timeObserver; @@ -76,11 +85,14 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { BOOL _playbackIsLivestream; NSInteger _totalFrameDrops; BOOL _totalFrameDropsHasChanged; + NSString *_softwareVersion; } @property (nonatomic, weak) id playDispatchDelegate; -- (id)initWithName:(NSString *)name andSoftware:(NSString *)software; +- (id)initWithName:(NSString *)name + andSoftware:(NSString *)software; + - (void)attachAVPlayer:(AVPlayer *)player; - (void)detachAVPlayer; - (void)programChangedForPlayer; @@ -104,24 +116,129 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { - (void)dispatchError:(NSString *)code withMessage:(NSString *)message; - (void)didTriggerManualVideoChange; -@end +#pragma clang diagnostic pop +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName; + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion; + +@end @interface MUXSDKAVPlayerViewControllerBinding : MUXSDKPlayerBinding { @private AVPlayerViewController *_viewController; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerViewController *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerViewController to monitor using this binding +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerViewController *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerViewController:"))); + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerViewController:(nonnull AVPlayerViewController *)playerViewController; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerViewController:(nonnull AVPlayerViewController *)playerViewController; @end - @interface MUXSDKAVPlayerLayerBinding : MUXSDKPlayerBinding { @private AVPlayerLayer *_view; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerLayer *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerLayer to monitor +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerLayer *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerLayer:")));; + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + +@end + +@interface MUXSDKAVPlayerBinding : MUXSDKPlayerBinding { +@private + CGSize _fixedPlayerSize; +} + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + fixedPlayerSize:(CGSize)fixedPlayerSize; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize; @end diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h index 3c1ff2e5..55cbdb32 100644 --- a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h +++ b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h @@ -46,13 +46,15 @@ FOUNDATION_EXPORT - (_Null_unspecified instancetype)init NS_UNAVAILABLE; + (_Null_unspecified instancetype)new NS_UNAVAILABLE; +#pragma mark - AVPlayerViewController Monitoring + /*! @method monitorAVPlayerViewController:withPlayerName:customerData: @abstract Starts to monitor a given AVPlayerViewController. @param player An AVPlayerViewController to monitor @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -66,7 +68,7 @@ FOUNDATION_EXPORT @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -82,7 +84,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -99,7 +101,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param domain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -116,10 +118,13 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name A name for this instance of the player @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData: @@ -129,10 +134,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:automaticErrorTracking: @@ -142,10 +151,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @abstract Starts to monitor a given AVPlayerViewController. @@ -155,10 +168,15 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method updateAVPlayerViewController:withPlayerName @@ -167,8 +185,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name The name of the player instance to update @discussion Use this method to change which AVPlayerViewController a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerViewController call. */ -+ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name; +#pragma mark - AVPlayerLayer Monitoring /*! @method monitorAVPlayerLayer:withPlayerName:customerData: @@ -243,7 +263,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -257,7 +280,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -271,7 +298,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerLayer:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @@ -285,7 +316,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @@ -295,7 +331,72 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player instance to update @discussion Use this method to change which AVPlayerLayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerLayer call. */ -+ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name; + +#pragma mark - AVPlayer Monitoring + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking + beaconCollectionDomain:(nullable NSString *)collectionDomain; + +/*! + @method updateAVPlayer:withPlayerName:fixedPlayerSize: + @abstract Updates the monitor for a player to a new AVPlayer. + @param player The new AVPlayer to monitor + @param name The name of the player instance to update + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @discussion Use this method to change which AVPlayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayer call. + */ ++ (void)updateAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize; + +#pragma mark - Teardown Monitoring /*! @method destroyPlayer: @@ -305,6 +406,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName */ + (void)destroyPlayer:(nonnull NSString *)name; +#pragma mark - Automatic Video Change + /*! @method setAutomaticVideoChange:forPlayer:enabled @abstract Allows default videochange functionality to be disabled. @@ -312,7 +415,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @discussion Use this method to disable built in videochange calls when using AVQueuePlayer. The player name provided must been passed as the name in a monitorPlayer:withPlayerName:andConfig: call. The config provided should match the specifications in the Mux docs at https://docs.mux.com and should set the enabled value to false. The default setting is true. */ -+ (void)setAutomaticVideoChange:(nonnull NSString *)name enabled:(Boolean)enabled; ++ (void)setAutomaticVideoChange:(nonnull NSString *)name + enabled:(Boolean)enabled; + +#pragma mark - Manual Video Change /*! @method videoChangeForPlayer:withCustomerData: @@ -364,6 +470,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData:(nullable MUXSDKCustomerViewData *)viewData __attribute__((deprecated("Please migrate to videoChangeForPlayer:withCustomerData:"))); +#pragma mark - Program Change + /*! @method programChangeForPlayer:withCustomerData: @abstract Signals that a player is now playing a different video of a playlist; or a different program of a live stream @@ -384,6 +492,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName + (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to programChangeForPlayer:withCustomerData:"))); +#pragma mark - Custom Data + /*! @method setCustomerData:forPlayer: @abstract allows customerData to be set or updated for the player @@ -391,7 +501,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param customerData A MUXSDKCustomerData object with player, video, and view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. */ -+ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData forPlayer:(nonnull NSString *)name; ++ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData + forPlayer:(nonnull NSString *)name; /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData @@ -401,7 +512,9 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param videoData A MUXSDKCustomerVideoData object with video metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData or playerData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData:viewData: @@ -412,8 +525,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param viewData A MUXSDKCustomerViewData object with view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData, playerData, or viewData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); +#pragma mark - Orientation Change /*! @method orientationChangeForPlayer:withOrientation: @@ -421,7 +538,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player to update @param orientation A MUXSDKViewOrientation enum value representing if the view has changed to portrait or landscape */ -+ (void) orientationChangeForPlayer:(nonnull NSString *) name withOrientation:(MUXSDKViewOrientation) orientation; ++ (void) orientationChangeForPlayer:(nonnull NSString *) name + withOrientation:(MUXSDKViewOrientation) orientation; + +#pragma mark - Error Dispatch /*! @method dispatchError:withMessage:forPlayer @@ -430,6 +550,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param message The error message in string format @param name The name of the player */ -+ (void)dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)message forPlayer:(nonnull NSString *)name; ++ (void)dispatchError:(nonnull NSString *)code + withMessage:(nonnull NSString *)message + forPlayer:(nonnull NSString *)name; @end diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist index 2dde3062..b2983fc6 100644 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats index cde2d5e0..60f6d955 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h index afe6c976..3fb7c326 100644 --- a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h +++ b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h @@ -35,15 +35,24 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { MUXSDKViewOrientationLandscape }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @protocol MUXSDKPlayDispatchDelegate - (void) playbackStartedForPlayer:(NSString *) name; - (void) videoChangedForPlayer:(NSString *) name; @end +#pragma clang diagnostic pop + @interface MUXSDKPlayerBinding : NSObject { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + @private NSString *_name; - NSString *_software; + NSString *_softwareName; AVPlayer *_player; AVPlayerItem *_playerItem; id _timeObserver; @@ -76,11 +85,14 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { BOOL _playbackIsLivestream; NSInteger _totalFrameDrops; BOOL _totalFrameDropsHasChanged; + NSString *_softwareVersion; } @property (nonatomic, weak) id playDispatchDelegate; -- (id)initWithName:(NSString *)name andSoftware:(NSString *)software; +- (id)initWithName:(NSString *)name + andSoftware:(NSString *)software; + - (void)attachAVPlayer:(AVPlayer *)player; - (void)detachAVPlayer; - (void)programChangedForPlayer; @@ -104,24 +116,129 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) { - (void)dispatchError:(NSString *)code withMessage:(NSString *)message; - (void)didTriggerManualVideoChange; -@end +#pragma clang diagnostic pop +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName; + +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion; + +@end @interface MUXSDKAVPlayerViewControllerBinding : MUXSDKPlayerBinding { @private AVPlayerViewController *_viewController; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerViewController *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerViewController to monitor using this binding +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerViewController *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerViewController:"))); + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerViewController:(nonnull AVPlayerViewController *)playerViewController; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerViewController: An AVPlayerViewController to monitor using this binding +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerViewController:(nonnull AVPlayerViewController *)playerViewController; @end - @interface MUXSDKAVPlayerLayerBinding : MUXSDKPlayerBinding { @private AVPlayerLayer *_view; } -- (id)initWithName:(NSString *)name software:(NSString *)software andView:(AVPlayerLayer *)view; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - name: A name for this instance of the player +/// - software: The name of the underlying player software +/// - view: An AVPlayerLayer to monitor +- (id)initWithName:(NSString *)name + software:(NSString *)software + andView:(AVPlayerLayer *)view __attribute__((deprecated("Please migrate to initWithPlayerName:softwareName:playerLayer:")));; + +#pragma clang diagnostic pop + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - playerLayer: An AVPlayerLayer to monitor +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + playerLayer:(nonnull AVPlayerLayer *)playerLayer; + +@end + +@interface MUXSDKAVPlayerBinding : MUXSDKPlayerBinding { +@private + CGSize _fixedPlayerSize; +} + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + fixedPlayerSize:(CGSize)fixedPlayerSize; + + +/// Initializes a binding that listens for and dispatches player events +/// - Parameters: +/// - playerName: A name for this instance of the player +/// - softwareName: The name of the underlying player software +/// - softwareVersion: The version of this player software +/// - fixedPlayerSize: A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) +- (nonnull id)initWithPlayerName:(nonnull NSString *)playerName + softwareName:(nullable NSString *)softwareName + softwareVersion:(nullable NSString *)softwareVersion + fixedPlayerSize:(CGSize)fixedPlayerSize; @end diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h index 3c1ff2e5..55cbdb32 100644 --- a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h +++ b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h @@ -46,13 +46,15 @@ FOUNDATION_EXPORT - (_Null_unspecified instancetype)init NS_UNAVAILABLE; + (_Null_unspecified instancetype)new NS_UNAVAILABLE; +#pragma mark - AVPlayerViewController Monitoring + /*! @method monitorAVPlayerViewController:withPlayerName:customerData: @abstract Starts to monitor a given AVPlayerViewController. @param player An AVPlayerViewController to monitor @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -66,7 +68,7 @@ FOUNDATION_EXPORT @param name A name for this instance of the player @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -82,7 +84,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -99,7 +101,7 @@ FOUNDATION_EXPORT @param customerData A MUXSDKCustomerData object with player, video, and view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors @param domain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player @@ -116,10 +118,13 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name A name for this instance of the player @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData: @@ -129,10 +134,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:automaticErrorTracking: @@ -142,10 +151,14 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param playerData A MUXSDKCustomerPlayerData object with player metadata @param videoData A MUXSDKCustomerVideoData object with video metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerViewController:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @abstract Starts to monitor a given AVPlayerViewController. @@ -155,10 +168,15 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param videoData A MUXSDKCustomerVideoData object with video metadata @param viewData A MUXSDKCustomerViewData object with view metadata @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors - @return an instance of MUXSDKAVPlayerLayerBinding or null + @return an instance of MUXSDKAVPlayerViewControllerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerViewController. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method updateAVPlayerViewController:withPlayerName @@ -167,8 +185,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withP @param name The name of the player instance to update @discussion Use this method to change which AVPlayerViewController a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerViewController call. */ -+ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player + withPlayerName:(nonnull NSString *)name; +#pragma mark - AVPlayerLayer Monitoring /*! @method monitorAVPlayerLayer:withPlayerName:customerData: @@ -243,7 +263,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -257,7 +280,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:"))); /*! @@ -271,7 +298,11 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @method monitorAVPlayerLayer:withPlayerName:playerData:videoData:viewData:automaticErrorTracking: @@ -285,7 +316,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @return an instance of MUXSDKAVPlayerLayerBinding or null @discussion Use this method to start a Mux player monitor on the given AVPlayerLayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com */ -+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name playerData:(nonnull MUXSDKCustomerPlayerData *)playerData videoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name + playerData:(nonnull MUXSDKCustomerPlayerData *)playerData + videoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData + automaticErrorTracking:(BOOL)automaticErrorTracking __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:"))); /*! @@ -295,7 +331,72 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player instance to update @discussion Use this method to change which AVPlayerLayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayerLayer call. */ -+ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player withPlayerName:(nonnull NSString *)name; ++ (void)updateAVPlayerLayer:(nonnull AVPlayerLayer *)player + withPlayerName:(nonnull NSString *)name; + +#pragma mark - AVPlayer Monitoring + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking; + +/* + @method monitorAVPlayer:withPlayerName:fixedPlayerSize:customerData: + @abstract Starts to monitor a given AVPlayer. + @param player An AVPlayer to monitor + @param name A name for this instance of the player + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @param customerData A MUXSDKCustomerData object with player, video, and view metadata + @param automaticErrorTracking boolean to indicate if the SDK should automatically track player errors + @param collectionDomain Domain to send tracking data to, if you want to use a custom beacon domain. Optional. + @discussion Use this method to start a Mux player monitor on the given AVPlayer. The player must have a name which is globally unique. The config provided should match the specifications in the Mux docs at https://docs.mux.com +*/ ++ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize + customerData:(nonnull MUXSDKCustomerData *)customerData + automaticErrorTracking:(BOOL)automaticErrorTracking + beaconCollectionDomain:(nullable NSString *)collectionDomain; + +/*! + @method updateAVPlayer:withPlayerName:fixedPlayerSize: + @abstract Updates the monitor for a player to a new AVPlayer. + @param player The new AVPlayer to monitor + @param name The name of the player instance to update + @param fixedPlayerSize A fixed size of your player that will not change, inclusive of any letter boxed or pillar boxed areas. If monitoring audio only media, pass in CGSizeMake(0.0, 0.0) + @discussion Use this method to change which AVPlayer a Mux player monitor is watching. The player monitor must previously have been created via a monitorAVPlayer call. + */ ++ (void)updateAVPlayer:(nonnull AVPlayer *)player + withPlayerName:(nonnull NSString *)name + fixedPlayerSize:(CGSize)fixedPlayerSize; + +#pragma mark - Teardown Monitoring /*! @method destroyPlayer: @@ -305,6 +406,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName */ + (void)destroyPlayer:(nonnull NSString *)name; +#pragma mark - Automatic Video Change + /*! @method setAutomaticVideoChange:forPlayer:enabled @abstract Allows default videochange functionality to be disabled. @@ -312,7 +415,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @discussion Use this method to disable built in videochange calls when using AVQueuePlayer. The player name provided must been passed as the name in a monitorPlayer:withPlayerName:andConfig: call. The config provided should match the specifications in the Mux docs at https://docs.mux.com and should set the enabled value to false. The default setting is true. */ -+ (void)setAutomaticVideoChange:(nonnull NSString *)name enabled:(Boolean)enabled; ++ (void)setAutomaticVideoChange:(nonnull NSString *)name + enabled:(Boolean)enabled; + +#pragma mark - Manual Video Change /*! @method videoChangeForPlayer:withCustomerData: @@ -364,6 +470,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData:(nullable MUXSDKCustomerViewData *)viewData __attribute__((deprecated("Please migrate to videoChangeForPlayer:withCustomerData:"))); +#pragma mark - Program Change + /*! @method programChangeForPlayer:withCustomerData: @abstract Signals that a player is now playing a different video of a playlist; or a different program of a live stream @@ -384,6 +492,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName + (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to programChangeForPlayer:withCustomerData:"))); +#pragma mark - Custom Data + /*! @method setCustomerData:forPlayer: @abstract allows customerData to be set or updated for the player @@ -391,7 +501,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param customerData A MUXSDKCustomerData object with player, video, and view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. */ -+ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData forPlayer:(nonnull NSString *)name; ++ (void)setCustomerData:(nullable MUXSDKCustomerData *)customerData + forPlayer:(nonnull NSString *)name; /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData @@ -401,7 +512,9 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param videoData A MUXSDKCustomerVideoData object with video metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData or playerData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); /*! @method updateCustomerData:forPlayer:withPlayerData:withVideoData:viewData: @@ -412,8 +525,12 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param viewData A MUXSDKCustomerViewData object with view metadata @discussion Use this method after you have already initialized the Mux SDK at any time before the player has been destroyed. Pass in either videoData, playerData, or viewData. */ -+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); ++ (void)updateCustomerDataForPlayer:(nonnull NSString *)name + withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData + withVideoData:(nullable MUXSDKCustomerVideoData *)videoData + viewData: (nullable MUXSDKCustomerViewData *) viewData __attribute__((deprecated("Please migrate to setCustomerData:forPlayer:"))); +#pragma mark - Orientation Change /*! @method orientationChangeForPlayer:withOrientation: @@ -421,7 +538,10 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param name The name of the player to update @param orientation A MUXSDKViewOrientation enum value representing if the view has changed to portrait or landscape */ -+ (void) orientationChangeForPlayer:(nonnull NSString *) name withOrientation:(MUXSDKViewOrientation) orientation; ++ (void) orientationChangeForPlayer:(nonnull NSString *) name + withOrientation:(MUXSDKViewOrientation) orientation; + +#pragma mark - Error Dispatch /*! @method dispatchError:withMessage:forPlayer @@ -430,6 +550,8 @@ __attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName @param message The error message in string format @param name The name of the player */ -+ (void)dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)message forPlayer:(nonnull NSString *)name; ++ (void)dispatchError:(nonnull NSString *)code + withMessage:(nonnull NSString *)message + forPlayer:(nonnull NSString *)name; @end diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist index 1f732c3c..2bb2be74 100644 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats index c7e86cda..d1b974c5 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources index 9137e4b8..efc3bf8a 100644 --- a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources +++ b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources @@ -6,11 +6,11 @@ Headers/MUXSDKPlayerBinding.h - M1nmxfgFpgAo4Skt045RSal7UVc= + OmOK2slz3DIpJEbcmwaw2hPEK74= Headers/MUXSDKStats.h - gL3TQD7YDBFt5IoFykpHpruUeTg= + 66PnMoG/84rMndU6e6SADoenSdo= Headers/MUXSDKStatsTv.h @@ -18,7 +18,7 @@ Info.plist - XTFEJZcPL7L1ZuxRbjQL8aIiPgE= + QnRCBvGkX0K49gqE1RrgdehvFxU= Modules/module.modulemap @@ -31,14 +31,14 @@ hash2 - v/d7IiNFkMA1dh3GkOetvEhA+Zp1/N/8Tl1i4n9IgmU= + OhmbqPLfTiqAp43q1hz0eGmVO2DDq1iR5vX8k6kEMFY= Headers/MUXSDKStats.h hash2 - WPI1/4ZxroUaGYRc8x7nKs1evl1NuiKQ0IVqexFL6Ps= + a3fuzXs5a1MYzZ2mzH9haKBGmC7fptGHzKCbBrYyvyQ= Headers/MUXSDKStatsTv.h diff --git a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM.xcodeproj/project.pbxproj b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM.xcodeproj/project.pbxproj index 36ea9823..186eb718 100644 --- a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM.xcodeproj/project.pbxproj +++ b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 195762142AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 195762132AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift */; }; 19C386A82AD12344009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19C386A72AD12343009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift */; }; 19C386AA2AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19C386A92AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift */; }; 19CB35D02ABD2B5C002DF48C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CB35CF2ABD2B5C002DF48C /* AppDelegate.swift */; }; @@ -42,6 +43,7 @@ /* Begin PBXFileReference section */ 194C6D432ABD518A003F965E /* mux-stats-sdk-avplayer */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "mux-stats-sdk-avplayer"; path = ../..; sourceTree = ""; }; + 195762132AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioOnlyPlaybackExampleViewController.swift; sourceTree = ""; }; 19C386A72AD12343009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiplePlayerItemPlaybackExampleViewController.swift; sourceTree = ""; }; 19C386A92AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerLayerScalingExampleViewController.swift; sourceTree = ""; }; 19CB35CC2ABD2B5C002DF48C /* MUXSDKStatsExampleSPM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MUXSDKStatsExampleSPM.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -125,6 +127,7 @@ 19CB36022ABD2D39002DF48C /* PlayerLayerExampleViewController.swift */, 19C386A72AD12343009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift */, 19C386A92AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift */, + 195762132AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift */, 19CB36042ABD2D63002DF48C /* ProcessInfo+Mux.swift */, 19CB35D52ABD2B5C002DF48C /* Main.storyboard */, 19CB35D82ABD2B5D002DF48C /* Assets.xcassets */, @@ -292,6 +295,7 @@ 19C386A82AD12344009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift in Sources */, 19CB35D42ABD2B5C002DF48C /* BasicPlaybackExampleViewController.swift in Sources */, 19CB35D02ABD2B5C002DF48C /* AppDelegate.swift in Sources */, + 195762142AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift in Sources */, 19CB36032ABD2D39002DF48C /* PlayerLayerExampleViewController.swift in Sources */, 19CB35D22ABD2B5C002DF48C /* SceneDelegate.swift in Sources */, ); @@ -403,7 +407,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 3.3.3; + MARKETING_VERSION = 3.4.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -461,7 +465,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 3.3.3; + MARKETING_VERSION = 3.4.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; diff --git a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM/AudioOnlyPlaybackExampleViewController.swift b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM/AudioOnlyPlaybackExampleViewController.swift new file mode 100644 index 00000000..bad55966 --- /dev/null +++ b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM/AudioOnlyPlaybackExampleViewController.swift @@ -0,0 +1,57 @@ +// +// AudioOnlyPlaybackExampleViewController.swift +// MUXSDKStatsExampleSPM +// + +import AVFoundation +import UIKit + +import MuxCore +import MUXSDKStats + +class AudioOnlyPlaybackExampleViewController: UIViewController { + var playbackURL: URL { + let playbackID = ProcessInfo.processInfo.playbackID ?? "27BKMLqT01tOznamh45ntvWXg00eZBRq3IFLTHX2T1rbY" + + return URL( + string: "https://stream.mux.com/\(playbackID).m3u8" + )! + } + let playerName = "AudioOnlyPlaybackExample" + lazy var player = AVPlayer(url: playbackURL) + + override func viewDidLoad() { + super.viewDidLoad() + + let playerData = MUXSDKCustomerPlayerData() + playerData.environmentKey = ProcessInfo.processInfo.environmentKey + + let videoData = MUXSDKCustomerVideoData() + videoData.videoId = "FieldRecordingARainySummerNight" + videoData.videoTitle = "Field Recording: A Rainy Summer Night" + + let customerData = MUXSDKCustomerData( + customerPlayerData: playerData, + videoData: videoData, + viewData: nil + )! + + MUXSDKStats.monitorAVPlayer( + player, + withPlayerName: playerName, + fixedPlayerSize: .zero, + customerData: customerData + ) + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + player.play() + } + + override func viewWillDisappear(_ animated: Bool) { + MUXSDKStats.destroyPlayer(playerName) + player.pause() + super.viewWillDisappear(animated) + } +} diff --git a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM/Base.lproj/Main.storyboard b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM/Base.lproj/Main.storyboard index ecb7157f..2b3618ab 100644 --- a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM/Base.lproj/Main.storyboard +++ b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM/Base.lproj/Main.storyboard @@ -59,6 +59,23 @@ + + + + + + + + + + + + + + + + + @@ -74,7 +91,7 @@ - + @@ -230,6 +247,34 @@ + + + + + + + + + + + + + + + + diff --git a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMTests/MUXSDKStatsExampleSPMTests.swift b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMTests/MUXSDKStatsExampleSPMTests.swift index 739ab2f2..48426cf6 100644 --- a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMTests/MUXSDKStatsExampleSPMTests.swift +++ b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMTests/MUXSDKStatsExampleSPMTests.swift @@ -15,20 +15,4 @@ final class MUXSDKStatsExampleSPMTests: XCTestCase { override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - // Any test you write for XCTest can be annotated as throws and async. - // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. - // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - } diff --git a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMUITests/MUXSDKStatsExampleSPMUITests.swift b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMUITests/MUXSDKStatsExampleSPMUITests.swift index 734c7762..0a33fa37 100644 --- a/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMUITests/MUXSDKStatsExampleSPMUITests.swift +++ b/apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPMUITests/MUXSDKStatsExampleSPMUITests.swift @@ -148,13 +148,4 @@ final class MUXSDKStatsExampleSPMUITests: XCTestCase { return } } - - func testLaunchPerformance() throws { - if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } - } }