Skip to content

Commit

Permalink
Releases/v3.5.0 (#225)
Browse files Browse the repository at this point in the history
* Update: Add API to report error_context with customer errors (#224)

---------

Co-authored-by: Emily Dixon <[email protected]>
  • Loading branch information
andrewjl-mux and daytime-em authored Jan 19, 2024
1 parent 0502d92 commit 667d755
Show file tree
Hide file tree
Showing 27 changed files with 86 additions and 32 deletions.
3 changes: 2 additions & 1 deletion MUXSDKStats.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"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",
"3.4.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.4.1/MUXSDKStats.xcframework.zip",
"3.4.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.4.2/MUXSDKStats.xcframework.zip"
"3.4.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.4.2/MUXSDKStats.xcframework.zip",
"3.5.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.5.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 @@ -575,7 +575,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.5.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
Expand Down Expand Up @@ -604,7 +604,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.5.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
PRODUCT_NAME = MUXSDKStats;
Expand Down Expand Up @@ -786,7 +786,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.5.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -814,7 +814,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.5.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
1 change: 1 addition & 0 deletions MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
- (BOOL)setAutomaticErrorTracking:(BOOL)automaticErrorTracking;
- (BOOL)setAutomaticVideoChange:(BOOL)automaticVideoChange;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message withErrorContext:(NSString *)errorContext;
- (void)didTriggerManualVideoChange;

#pragma clang diagnostic pop
Expand Down
11 changes: 10 additions & 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 = @"3.4.2";
NSString *const MUXSDKPluginVersion = @"3.5.0";
NSString *const MUXSessionDataPrefix = @"io.litix.data.";

// Min number of seconds between timeupdate events. (100ms)
Expand Down Expand Up @@ -887,13 +887,22 @@ - (void)dispatchError {
}

- (void) dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)message {
[self dispatchError:code withMessage:message withErrorContext:nil];
}

- (void) dispatchError:(nonnull NSString *)code
withMessage:(nonnull NSString *)message
withErrorContext:(NSString *)errorContext {
if (![self isPlayerOK]) {
return;
}
[self checkVideoData];
MUXSDKPlayerData *playerData = [self getPlayerData];
[playerData setPlayerErrorCode:code];
[playerData setPlayerErrorMessage:message];
if (errorContext) {
[playerData setPlayerErrorContext:errorContext];
}
MUXSDKErrorEvent *event = [[MUXSDKErrorEvent alloc] init];
[event setPlayerData:playerData];
[MUXSDKCore dispatchEvent:event forPlayer:_name];
Expand Down
28 changes: 28 additions & 0 deletions MUXSDKStats/MUXSDKStatsTests/MUXSDKPlayerBindingTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,34 @@ - (void)testAVPlayerViewControllerBindingAutomaticErrorTrackingEnabled {
);
}

- (void)testAVPlayerViewControllerBindingErrorMetadata {
NSString *name = @"awesome-player";
MUXSDKAVPlayerViewControllerBinding *binding = [self setupViewControllerPlayerBinding:name
softwareName:@"TestSoftware"
softwareVersion:@"0.1.0"];

[binding dispatchError:@"1" withMessage:@"message" withErrorContext:@"context"];

XCTAssertEqual(5, [MUXSDKCore eventsCountForPlayer:name]);
id<MUXSDKEventTyping> event = [MUXSDKCore eventAtIndex:4 forPlayer:name];
XCTAssertEqual([event getType], MUXSDKPlaybackEventErrorEventType);

MUXSDKPlaybackEvent *playbackEvent = (MUXSDKPlaybackEvent *)event;
XCTAssertEqual(
playbackEvent.playerData.playerErrorCode,
@"1"
);
XCTAssertEqual(
playbackEvent.playerData.playerErrorMessage,
@"message"
);
XCTAssertEqual(
playbackEvent.playerData.playerErrorContext,
@"context"
);
}


- (void)testAVPlayerViewControllerBindingAutomaticErrorTrackingDisabled {
NSString *name = @"awesome-player";
MUXSDKAVPlayerViewControllerBinding *binding = [self setupViewControllerPlayerBinding:name
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 = '3.4.2'
s.version = '3.5.0'
s.source = { :git => 'https://github.com/muxinc/mux-stats-sdk-avplayer.git',
:tag => "v#{s.version}" }

Expand Down
24 changes: 17 additions & 7 deletions XCFramework/MUXSDKStats.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<key>LibraryPath</key>
Expand All @@ -17,6 +19,8 @@
<string>tvos</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
Expand All @@ -32,23 +36,24 @@
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>MUXSDKStats.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>MUXSDKStats.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -59,19 +64,24 @@
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/Versions/A/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>MUXSDKStats.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
- (BOOL)setAutomaticErrorTracking:(BOOL)automaticErrorTracking;
- (BOOL)setAutomaticVideoChange:(BOOL)automaticVideoChange;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message withErrorContext:(NSString *)errorContext;
- (void)didTriggerManualVideoChange;

#pragma clang diagnostic pop
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework module MUXSDKStats {
umbrella header "MUXSDKStats.h"

export *

module * { export * }
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
- (BOOL)setAutomaticErrorTracking:(BOOL)automaticErrorTracking;
- (BOOL)setAutomaticVideoChange:(BOOL)automaticVideoChange;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message withErrorContext:(NSString *)errorContext;
- (void)didTriggerManualVideoChange;

#pragma clang diagnostic pop
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework module MUXSDKStats {
umbrella header "MUXSDKStats.h"

export *

module * { export * }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23A344</string>
<string>23B81</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.4.2</string>
<string>3.5.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -31,15 +31,15 @@
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>13.3</string>
<string>14.2</string>
<key>DTSDKBuild</key>
<string>22E245</string>
<string>23C53</string>
<key>DTSDKName</key>
<string>macosx13.3</string>
<string>macosx14.2</string>
<key>DTXcode</key>
<string>1431</string>
<string>1520</string>
<key>DTXcodeBuild</key>
<string>14E300c</string>
<string>15C500b</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>UIDeviceFamily</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
- (BOOL)setAutomaticErrorTracking:(BOOL)automaticErrorTracking;
- (BOOL)setAutomaticVideoChange:(BOOL)automaticVideoChange;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message withErrorContext:(NSString *)errorContext;
- (void)didTriggerManualVideoChange;

#pragma clang diagnostic pop
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework module MUXSDKStats {
umbrella header "MUXSDKStats.h"

export *

module * { export * }
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
<dict>
<key>Headers/MUXSDKPlayerBinding.h</key>
<data>
OmOK2slz3DIpJEbcmwaw2hPEK74=
H7tLzTwhkhj4OWrPFmHFcEOpHNY=
</data>
<key>Headers/MUXSDKStats.h</key>
<data>
66PnMoG/84rMndU6e6SADoenSdo=
</data>
<key>Info.plist</key>
<data>
wQbWBDeBYo9CNSEvOu7N7qXM5Xs=
eaI6HtJ0vC/tWiD4+X99vSwvE6Q=
</data>
<key>Modules/module.modulemap</key>
<data>
IESP2GX3Ai9sY2p3OzZ3x0ol/QE=
xKFfZzWK/9l8YCOvjL3LzeqB9+c=
</data>
</dict>
<key>files2</key>
Expand All @@ -27,7 +27,7 @@
<dict>
<key>hash2</key>
<data>
OhmbqPLfTiqAp43q1hz0eGmVO2DDq1iR5vX8k6kEMFY=
AxdgIWtDtJzd9urZqAKxMawThs1/zvjqKYmDLb93HXo=
</data>
</dict>
<key>Headers/MUXSDKStats.h</key>
Expand All @@ -41,7 +41,7 @@
<dict>
<key>hash2</key>
<data>
+xzGA88a1wfApPKwkvEme72T8sTUASCcwPTFvm+PIUg=
P43Gl1ATXjxG7fAXQrcBr2O0rBfbOTi20FAKoobSm+s=
</data>
</dict>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
- (BOOL)setAutomaticErrorTracking:(BOOL)automaticErrorTracking;
- (BOOL)setAutomaticVideoChange:(BOOL)automaticVideoChange;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message withErrorContext:(NSString *)errorContext;
- (void)didTriggerManualVideoChange;

#pragma clang diagnostic pop
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
- (BOOL)setAutomaticErrorTracking:(BOOL)automaticErrorTracking;
- (BOOL)setAutomaticVideoChange:(BOOL)automaticVideoChange;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message;
- (void)dispatchError:(NSString *)code withMessage:(NSString *)message withErrorContext:(NSString *)errorContext;
- (void)didTriggerManualVideoChange;

#pragma clang diagnostic pop
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Headers/MUXSDKPlayerBinding.h</key>
<data>
OmOK2slz3DIpJEbcmwaw2hPEK74=
H7tLzTwhkhj4OWrPFmHFcEOpHNY=
</data>
<key>Headers/MUXSDKStats.h</key>
<data>
Expand All @@ -18,7 +18,7 @@
</data>
<key>Info.plist</key>
<data>
wjTgD0W4BnjosYfczMqGvxGs7qU=
m9h3t6m+Mxv4w+nMKByCLjR7Lx0=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand All @@ -31,7 +31,7 @@
<dict>
<key>hash2</key>
<data>
OhmbqPLfTiqAp43q1hz0eGmVO2DDq1iR5vX8k6kEMFY=
AxdgIWtDtJzd9urZqAKxMawThs1/zvjqKYmDLb93HXo=
</data>
</dict>
<key>Headers/MUXSDKStats.h</key>
Expand Down

0 comments on commit 667d755

Please sign in to comment.