Skip to content

Commit

Permalink
Merge pull request #26 from muxinc/dj/update-customer-data
Browse files Browse the repository at this point in the history
add MUXSDKStats updateCustomerData  method
  • Loading branch information
dylanjha authored Oct 18, 2019
2 parents 714685a + 6ef1764 commit 8a1ada4
Show file tree
Hide file tree
Showing 40 changed files with 142 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.
10 changes: 10 additions & 0 deletions Frameworks/iOS/fat/MUXSDKStats.framework/Headers/MUXSDKStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ FOUNDATION_EXPORT
*/
+ (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData;

/*!
@method updateCustomerData:forPlayer:withPlayerData:withVideoData
@abstract allows videoData to be set or updated for the player
@param name The name of the player to update
@param playerData A MUXSDKCustomerPlayerData object with video metadata
@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;

@end
Binary file modified Frameworks/iOS/fat/MUXSDKStats.framework/Info.plist
Binary file not shown.
Binary file modified Frameworks/iOS/fat/MUXSDKStats.framework/MUXSDKStats
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.
10 changes: 10 additions & 0 deletions Frameworks/iOS/release/MUXSDKStats.framework/Headers/MUXSDKStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ FOUNDATION_EXPORT
*/
+ (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData;

/*!
@method updateCustomerData:forPlayer:withPlayerData:withVideoData
@abstract allows videoData to be set or updated for the player
@param name The name of the player to update
@param playerData A MUXSDKCustomerPlayerData object with video metadata
@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;

@end
Binary file modified Frameworks/iOS/release/MUXSDKStats.framework/Info.plist
Binary file not shown.
Binary file modified Frameworks/iOS/release/MUXSDKStats.framework/MUXSDKStats
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ FOUNDATION_EXPORT
*/
+ (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData;

/*!
@method updateCustomerData:forPlayer:withPlayerData:withVideoData
@abstract allows videoData to be set or updated for the player
@param name The name of the player to update
@param playerData A MUXSDKCustomerPlayerData object with video metadata
@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;

@end
Binary file modified Frameworks/iOS/simulator/MUXSDKStats.framework/Info.plist
Binary file not shown.
Binary file modified Frameworks/iOS/simulator/MUXSDKStats.framework/MUXSDKStats
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
</data>
<key>Headers/MUXSDKStats.h</key>
<data>
hpJjIlmQKaJSLEx2OMwYcNHASH0=
S9PdZ/OgsJQlp2nQojF9ilpmfE8=
</data>
<key>Info.plist</key>
<data>
3M48mEVBCS4jouEeXq9pQH2A6MU=
aPVgu4yEAQPxaMHib+Rw1wWjReY=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand All @@ -38,11 +38,11 @@
<dict>
<key>hash</key>
<data>
hpJjIlmQKaJSLEx2OMwYcNHASH0=
S9PdZ/OgsJQlp2nQojF9ilpmfE8=
</data>
<key>hash2</key>
<data>
k6dEI0sz2Ym7t2Jif4GQKZy5NiX1aNWXeWiiwhC/6Eg=
9/mUO+ra23XJQhg/Zhf400L8md068bldwV9bqouyVEo=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>0.0.6</string>
</dict>
Expand Down
Binary file not shown.
10 changes: 10 additions & 0 deletions Frameworks/tvOS/fat/MUXSDKStatsTv.framework/Headers/MUXSDKStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ FOUNDATION_EXPORT
*/
+ (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData;

/*!
@method updateCustomerData:forPlayer:withPlayerData:withVideoData
@abstract allows videoData to be set or updated for the player
@param name The name of the player to update
@param playerData A MUXSDKCustomerPlayerData object with video metadata
@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;

@end
Binary file modified Frameworks/tvOS/fat/MUXSDKStatsTv.framework/Info.plist
Binary file not shown.
Binary file modified Frameworks/tvOS/fat/MUXSDKStatsTv.framework/MUXSDKStatsTv
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>0.0.6</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ FOUNDATION_EXPORT
*/
+ (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData;

/*!
@method updateCustomerData:forPlayer:withPlayerData:withVideoData
@abstract allows videoData to be set or updated for the player
@param name The name of the player to update
@param playerData A MUXSDKCustomerPlayerData object with video metadata
@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;

@end
Binary file modified Frameworks/tvOS/release/MUXSDKStatsTv.framework/Info.plist
Binary file not shown.
Binary file modified Frameworks/tvOS/release/MUXSDKStatsTv.framework/MUXSDKStatsTv
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>0.0.6</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ FOUNDATION_EXPORT
*/
+ (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData;

/*!
@method updateCustomerData:forPlayer:withPlayerData:withVideoData
@abstract allows videoData to be set or updated for the player
@param name The name of the player to update
@param playerData A MUXSDKCustomerPlayerData object with video metadata
@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;

@end
Binary file modified Frameworks/tvOS/simulator/MUXSDKStatsTv.framework/Info.plist
Binary file not shown.
Binary file modified Frameworks/tvOS/simulator/MUXSDKStatsTv.framework/MUXSDKStatsTv
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
</data>
<key>Headers/MUXSDKStats.h</key>
<data>
hpJjIlmQKaJSLEx2OMwYcNHASH0=
S9PdZ/OgsJQlp2nQojF9ilpmfE8=
</data>
<key>Headers/MUXSDKStatsTv.h</key>
<data>
9jQFHCiHb0gNzWtO9VWZNNkPt8w=
</data>
<key>Info.plist</key>
<data>
1bYNYxHlNZ1GXQiUCj+ZYJJB54A=
ofrnb6Nnti6YRlhl/JuAUL4OHRQ=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand All @@ -42,11 +42,11 @@
<dict>
<key>hash</key>
<data>
hpJjIlmQKaJSLEx2OMwYcNHASH0=
S9PdZ/OgsJQlp2nQojF9ilpmfE8=
</data>
<key>hash2</key>
<data>
k6dEI0sz2Ym7t2Jif4GQKZy5NiX1aNWXeWiiwhC/6Eg=
9/mUO+ra23XJQhg/Zhf400L8md068bldwV9bqouyVEo=
</data>
</dict>
<key>Headers/MUXSDKStatsTv.h</key>
Expand Down
8 changes: 7 additions & 1 deletion MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,12 @@
};
F4DCACFC1DCA892E0094D94C = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = CX6AHWLHM6;
ProvisioningStyle = Automatic;
};
F4DCAD051DCA892E0094D94C = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = CX6AHWLHM6;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -597,8 +599,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 2299324CA6DB1DBCB21FE15C /* Pods-MUXSDKStats.debug.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = CX6AHWLHM6;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand Down Expand Up @@ -626,6 +629,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = CX6AHWLHM6;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -647,6 +651,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7FEF662BE45E805333B7371A /* Pods-MUXSDKStatsTests.debug.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = CX6AHWLHM6;
INFOPLIST_FILE = MUXSDKStatsTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStatsTests;
Expand All @@ -658,6 +663,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D55847390AE2D6C375E7535C /* Pods-MUXSDKStatsTests.release.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = CX6AHWLHM6;
INFOPLIST_FILE = MUXSDKStatsTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStatsTests;
Expand Down
2 changes: 1 addition & 1 deletion MUXSDKStats/MUXSDKStats/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
10 changes: 10 additions & 0 deletions MUXSDKStats/MUXSDKStats/MUXSDKStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ FOUNDATION_EXPORT
*/
+ (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable MUXSDKCustomerVideoData *)videoData;

/*!
@method updateCustomerData:forPlayer:withPlayerData:withVideoData
@abstract allows videoData to be set or updated for the player
@param name The name of the player to update
@param playerData A MUXSDKCustomerPlayerData object with video metadata
@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;

@end
14 changes: 14 additions & 0 deletions MUXSDKStats/MUXSDKStats/MUXSDKStats.m
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,18 @@ + (void)programChangeForPlayer:(nonnull NSString *)name withVideoData:(nullable
}
}

+ (void)updateCustomerDataForPlayer:(nonnull NSString *)name withPlayerData:(nullable MUXSDKCustomerPlayerData *)playerData withVideoData:(nullable MUXSDKCustomerVideoData *)videoData {
MUXSDKPlayerBinding *player = [_viewControllers valueForKey:name];
if (!player) return;
if (!playerData && !videoData) return;
MUXSDKDataEvent *dataEvent = [MUXSDKDataEvent new];
if (playerData) {
[dataEvent setCustomerPlayerData:playerData];
}
if (videoData) {
[dataEvent setCustomerVideoData:videoData];
}
[MUXSDKCore dispatchEvent:dataEvent forPlayer:name];
}

@end
32 changes: 32 additions & 0 deletions MUXSDKStats/MUXSDKStatsTests/MUXSDKStatsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,36 @@ - (void)testVideoChangeForAVPlayerLayer{
[MUXSDKStats destroyPlayer:playName];
}

- (void)testupdateCustomerDataWithNulls{
MuxMockAVPlayerLayer *controller = [[MuxMockAVPlayerLayer alloc] init];
MUXSDKCustomerPlayerData *customerPlayerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"YOUR_COMPANY_NAME"];
MUXSDKCustomerVideoData *customerVideoData = [[MUXSDKCustomerVideoData alloc] init];
NSString *playName = @"Player";
[MUXSDKStats monitorAVPlayerLayer:controller withPlayerName:playName playerData:customerPlayerData videoData:customerVideoData];
[MUXSDKStats updateCustomerDataForPlayer:playName withPlayerData:NULL withVideoData:NULL];
[MUXSDKStats destroyPlayer:playName];
}

- (void)testupdateCustomerDataWithPlayerDataAndNullVideoData{
MuxMockAVPlayerLayer *controller = [[MuxMockAVPlayerLayer alloc] init];
MUXSDKCustomerPlayerData *customerPlayerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"YOUR_COMPANY_NAME"];
MUXSDKCustomerVideoData *customerVideoData = [[MUXSDKCustomerVideoData alloc] init];
NSString *playName = @"Player";
[MUXSDKStats monitorAVPlayerLayer:controller withPlayerName:playName playerData:customerPlayerData videoData:customerVideoData];
[customerPlayerData setPlayerVersion:@"playerVersionV1"];
[MUXSDKStats updateCustomerDataForPlayer:playName withPlayerData:customerPlayerData withVideoData:NULL];
[MUXSDKStats destroyPlayer:playName];
}

- (void)testupdateCustomerDataWithNullPlayerDataAndVideoData{
MuxMockAVPlayerLayer *controller = [[MuxMockAVPlayerLayer alloc] init];
MUXSDKCustomerPlayerData *customerPlayerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"YOUR_COMPANY_NAME"];
MUXSDKCustomerVideoData *customerVideoData = [[MUXSDKCustomerVideoData alloc] init];
NSString *playName = @"Player";
[MUXSDKStats monitorAVPlayerLayer:controller withPlayerName:playName playerData:customerPlayerData videoData:customerVideoData];
[customerVideoData setVideoTitle:@"Updated VideoTitle"];
[MUXSDKStats updateCustomerDataForPlayer:playName withPlayerData:NULL withVideoData:customerVideoData];
[MUXSDKStats destroyPlayer:playName];
}

@end
2 changes: 1 addition & 1 deletion MUXSDKStats/MUXSDKStatsTv/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 2 additions & 2 deletions MUXSDKStats/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Mux-Stats-Core (2.0.6)
- Mux-Stats-Core (2.0.12)

DEPENDENCIES:
- Mux-Stats-Core (~> 2.0.0)
Expand All @@ -9,7 +9,7 @@ SPEC REPOS:
- Mux-Stats-Core

SPEC CHECKSUMS:
Mux-Stats-Core: 34ff82aec4176ee6439a7767b6722af32f108539
Mux-Stats-Core: 73e692799571459722526ff4a721b6872da5c776

PODFILE CHECKSUM: 8f9d5792473d294fd42ad557d0a9a96e170846b9

Expand Down
2 changes: 1 addition & 1 deletion 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 = '1.0.2'
s.version = '1.1.0'
s.source = { :git => 'https://github.com/muxinc/mux-stats-sdk-avplayer.git',
:tag => "v#{s.version}" }

Expand Down

0 comments on commit 8a1ada4

Please sign in to comment.