Skip to content

Commit

Permalink
Release v2.13.0
Browse files Browse the repository at this point in the history
* Deprecate old custom beacon implementation and add new beaconCollectionDomain parameter that does not append the key to the url.

Authored-by: Stephanie Zúñiga <[email protected]>
  • Loading branch information
StephanieZuniga authored Apr 21, 2022
1 parent 8b59165 commit 7a32e14
Show file tree
Hide file tree
Showing 28 changed files with 338 additions and 63 deletions.
3 changes: 2 additions & 1 deletion MUXSDKStats.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"2.11.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.11.0/MUXSDKStats.xcframework.zip",
"2.12.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.12.0/MUXSDKStats.xcframework.zip",
"2.12.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.12.1/MUXSDKStats.xcframework.zip"
"2.12.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.12.1/MUXSDKStats.xcframework.zip",
"2.13.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.0/MUXSDKStats.xcframework.zip"
}
8 changes: 4 additions & 4 deletions MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@
INFOPLIST_FILE = MUXSDKStatsTv/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.12.1;
MARKETING_VERSION = 2.13.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
Expand All @@ -581,7 +581,7 @@
INFOPLIST_FILE = MUXSDKStatsTv/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.12.1;
MARKETING_VERSION = 2.13.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
PRODUCT_NAME = MUXSDKStats;
Expand Down Expand Up @@ -758,7 +758,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.12.1;
MARKETING_VERSION = 2.13.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -783,7 +783,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.12.1;
MARKETING_VERSION = 2.13.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// SDK constants.
NSString *const MUXSDKPluginName = @"apple-mux";
NSString *const MUXSDKPluginVersion = @"2.12.1";
NSString *const MUXSDKPluginVersion = @"2.13.0";
NSString *const MUXSessionDataPrefix = @"io.litix.data.";

// Min number of seconds between timeupdate events. (100ms)
Expand Down
40 changes: 38 additions & 2 deletions MUXSDKStats/MUXSDKStats/MUXSDKStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@ FOUNDATION_EXPORT
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking;

/*!
@method monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:
@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
@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
@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
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconCollectionDomain:(nullable NSString *)collectionDomain;

/*!
@method monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:
@abstract Starts to monitor a given AVPlayerViewController.
Expand All @@ -89,7 +106,8 @@ FOUNDATION_EXPORT
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconDomain:(nullable NSString *)domain;
beaconDomain:(nullable NSString *)domain
__attribute__((deprecated("Please migrate to monitorAVPlayerViewController:withPlayerName:customerData:automaticErrorTracking:beaconCollectionDomain:")));

/*!
@method monitorAVPlayerViewController:withPlayerName:playerData:videoData:
Expand Down Expand Up @@ -179,6 +197,23 @@ FOUNDATION_EXPORT
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking;

/*!
@method monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:
@abstract Starts to monitor a given AVPlayerLayer.
@param player An AVPlayerLayer to monitor
@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
@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
@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
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconCollectionDomain:(nullable NSString *)collectionDomain;
/*!
@method monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:
@abstract Starts to monitor a given AVPlayerLayer.
Expand All @@ -194,7 +229,8 @@ FOUNDATION_EXPORT
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconDomain:(nullable NSString *)domain;
beaconDomain:(nullable NSString *)domain
__attribute__((deprecated("Please migrate to monitorAVPlayerLayer:withPlayerName:customerData:automaticErrorTracking:beaconCollectionDomain:")));


/*!
Expand Down
72 changes: 65 additions & 7 deletions MUXSDKStats/MUXSDKStats/MUXSDKStats.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,39 @@ + (MUXSDKViewerData *)buildViewerData {

#pragma mark Monitor AVPlayerViewController

+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconCollectionDomain:(nullable NSString *)collectionDomain {
return [self monitorAVPlayerViewController:player
withPlayerName:name
customerData:customerData
automaticErrorTracking:automaticErrorTracking
beaconCollectionDomain:collectionDomain
beaconDomain:nil];
}

// Legacy deprecated implementation
+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconDomain:(nullable NSString *)domain {
return [self monitorAVPlayerViewController:player
withPlayerName:name
customerData:customerData
automaticErrorTracking:automaticErrorTracking
beaconCollectionDomain:nil
beaconDomain:domain];
}

+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconCollectionDomain:(nullable NSString *)collectionDomain
beaconDomain:(nullable NSString *)domain {
MUXSDKCustomerViewerData *viewerData = [customerData customerViewerData];
if (viewerData != nil) {
_customerViewerData = viewerData;
Expand All @@ -174,7 +201,10 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlaye
MUXSDKAVPlayerViewControllerBinding *newBinding = [[MUXSDKAVPlayerViewControllerBinding alloc] initWithName:name software:MuxPlayerSoftwareAVPlayerViewController andView:player];
[newBinding setAutomaticErrorTracking:automaticErrorTracking];
newBinding.playDispatchDelegate = _playerBindingManager;
if (domain != nil && domain.length > 0) {

if (collectionDomain != nil && collectionDomain.length > 0) {
[MUXSDKCore setBeaconCollectionDomain:collectionDomain forPlayer:name];
} else if (domain != nil && domain.length > 0) {
[MUXSDKCore setBeaconDomain:domain forPlayer:name];
}

Expand All @@ -200,8 +230,6 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlaye
}
}



+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
Expand All @@ -210,7 +238,7 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlaye
withPlayerName:name
customerData:customerData
automaticErrorTracking:automaticErrorTracking
beaconDomain:nil];
beaconCollectionDomain:nil];

}

Expand All @@ -221,7 +249,7 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlaye
withPlayerName:name
customerData:customerData
automaticErrorTracking:true
beaconDomain:nil];
beaconCollectionDomain:nil];
}

+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlayerViewController *)player
Expand Down Expand Up @@ -299,11 +327,39 @@ + (void)updateAVPlayerViewController:(nonnull AVPlayerViewController *)player wi

#pragma mark Monitor AVPlayerLayer

+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconCollectionDomain:(nullable NSString *)collectionDomain {
return [self monitorAVPlayerLayer:player
withPlayerName:name
customerData:customerData
automaticErrorTracking:automaticErrorTracking
beaconCollectionDomain:collectionDomain
beaconDomain:nil];
}

// Deprecated: Legacy beacon domain implementation
+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconDomain:(nullable NSString *)domain {
return [self monitorAVPlayerLayer:player
withPlayerName:name
customerData:customerData
automaticErrorTracking:automaticErrorTracking
beaconCollectionDomain:nil
beaconDomain:domain];
}

+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player
withPlayerName:(nonnull NSString *)name
customerData:(nonnull MUXSDKCustomerData *)customerData
automaticErrorTracking:(BOOL)automaticErrorTracking
beaconCollectionDomain:(nullable NSString *)collectionDomain
beaconDomain:(nullable NSString *)domain {
MUXSDKCustomerViewerData *viewerData = [customerData customerViewerData];
if (viewerData != nil) {
_customerViewerData = viewerData;
Expand All @@ -324,7 +380,9 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)
MUXSDKAVPlayerLayerBinding *newBinding = [[MUXSDKAVPlayerLayerBinding alloc] initWithName:name software:MuxPlayerSoftwareAVPlayerLayer andView:player];
newBinding.playDispatchDelegate = _playerBindingManager;
[newBinding setAutomaticErrorTracking:automaticErrorTracking];
if (domain != nil && domain.length > 0) {
if (collectionDomain != nil && collectionDomain.length > 0) {
[MUXSDKCore setBeaconCollectionDomain:collectionDomain forPlayer:name];
} else if (domain != nil && domain.length > 0) {
[MUXSDKCore setBeaconDomain:domain forPlayer:name];
}

Expand Down Expand Up @@ -359,7 +417,7 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)
withPlayerName:name
customerData:customerData
automaticErrorTracking:automaticErrorTracking
beaconDomain:nil];
beaconCollectionDomain:nil];
}

+ (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)player
Expand Down
6 changes: 3 additions & 3 deletions MUXSDKStats/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ target 'MUXSDKStats' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MUXSDKStats
pod 'Mux-Stats-Core', '~>3.10.0'
pod 'Mux-Stats-Core', '~>3.12.0'

target 'MUXSDKStatsTests' do
inherit! :search_paths
# Pods for testing
pod 'Mux-Stats-Core', '~>3.10.0'
pod 'Mux-Stats-Core', '~>3.12.0'
end

end
Expand All @@ -20,5 +20,5 @@ target 'MUXSDKStatsTv' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MUXSDKStatsTv
pod 'Mux-Stats-Core', '~>3.10.0'
pod 'Mux-Stats-Core', '~>3.12.0'
end
10 changes: 5 additions & 5 deletions MUXSDKStats/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
PODS:
- Mux-Stats-Core (3.10.0)
- Mux-Stats-Core (3.12.0)

DEPENDENCIES:
- Mux-Stats-Core (~> 3.10.0)
- Mux-Stats-Core (~> 3.12.0)

SPEC REPOS:
trunk:
- Mux-Stats-Core

SPEC CHECKSUMS:
Mux-Stats-Core: 2cd8ff20a06caff6a3df84b43c1785337f92f6d1
Mux-Stats-Core: 47e36730a0b7e094b68c73737c0ce6cfefc3c3a6

PODFILE CHECKSUM: 3028f91c0c7010fc9776e9460d95512cdd3827ba
PODFILE CHECKSUM: 7f87a560dee889ca6971574d5edc8193221a3860

COCOAPODS: 1.11.2
COCOAPODS: 1.11.3
4 changes: 2 additions & 2 deletions Mux-Stats-AVPlayer.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Mux-Stats-AVPlayer'

s.version = '2.12.1'
s.version = '2.13.0'
s.source = { :git => 'https://github.com/muxinc/mux-stats-sdk-avplayer.git',
:tag => "v#{s.version}" }

Expand All @@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.license = 'Apache 2.0'
s.author = { 'Mux' => '[email protected]' }

s.dependency 'Mux-Stats-Core', '~>3.10.0'
s.dependency 'Mux-Stats-Core', '~>3.12.0'

s.ios.deployment_target = '9.0'
s.ios.vendored_frameworks = 'XCFramework/MUXSDKStats.xcframework'
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
.package(
name: "MuxCore",
url: "https://github.com/muxinc/stats-sdk-objc.git",
from: "3.10.0"
from: "3.12.0"
)
],
targets: [
Expand Down
Loading

0 comments on commit 7a32e14

Please sign in to comment.