Skip to content

Commit

Permalink
Release 3.1.0 (#173)
Browse files Browse the repository at this point in the history
## Updates

* Add Frame Drop Metrics (#172)
* Add 5 more Custom Dimensions (6 through 10) to `MUXSDKCustomData`
  • Loading branch information
daytime-em authored Dec 12, 2022
1 parent 066edf7 commit 6a06965
Show file tree
Hide file tree
Showing 30 changed files with 112 additions and 74 deletions.
3 changes: 2 additions & 1 deletion MUXSDKStats.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"2.13.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.0/MUXSDKStats.xcframework.zip",
"2.13.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.1/MUXSDKStats.xcframework.zip",
"2.13.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.2/MUXSDKStats.xcframework.zip",
"3.0.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.0.0/MUXSDKStats.xcframework.zip"
"3.0.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.0.0/MUXSDKStats.xcframework.zip",
"3.1.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.1.0/MUXSDKStats.xcframework.zip"
}
12 changes: 6 additions & 6 deletions MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
F4DCAD021DCA892E0094D94C /* Sources */,
F4DCAD031DCA892E0094D94C /* Frameworks */,
F4DCAD041DCA892E0094D94C /* Resources */,
3AA3507C3DDFD40977FB6B6C /* [CP] Embed Pods Frameworks */,
6022FAC435CC187BFF7989AA /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -421,7 +421,7 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3AA3507C3DDFD40977FB6B6C /* [CP] Embed Pods Frameworks */ = {
6022FAC435CC187BFF7989AA /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -556,7 +556,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 = 3.0.0;
MARKETING_VERSION = 3.1.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
Expand All @@ -583,7 +583,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 = 3.0.0;
MARKETING_VERSION = 3.1.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
PRODUCT_NAME = MUXSDKStats;
Expand Down Expand Up @@ -760,7 +760,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -785,7 +785,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 2 additions & 0 deletions MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
BOOL _automaticVideoChange;
BOOL _didTriggerManualVideoChange;
BOOL _playbackIsLivestream;
NSInteger _totalFrameDrops;
BOOL _totalFrameDropsHasChanged;
}

@property (nonatomic, weak) id<MUXSDKPlayDispatchDelegate> playDispatchDelegate;
Expand Down
22 changes: 21 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.0.0";
NSString *const MUXSDKPluginVersion = @"3.1.0";
NSString *const MUXSessionDataPrefix = @"io.litix.data.";

// Min number of seconds between timeupdate events. (100ms)
Expand Down Expand Up @@ -177,10 +177,20 @@ - (void)handleAVPlayerAccess:(NSNotification *)notif {
[self handleRenditionChangeInAccessLog:accessLog];
[self calculateBandwidthMetricFromAccessLog:accessLog];
[self updateViewingLivestream:accessLog];
[self updateFrameDropsFromAccessLog:accessLog];
}
});
}

- (void)updateFrameDropsFromAccessLog:(AVPlayerItemAccessLog *)accessLog {
AVPlayerItemAccessLogEvent *event = accessLog.events.lastObject;
NSInteger loggedFrameDrops = event.numberOfDroppedVideoFrames;
if(loggedFrameDrops != _totalFrameDrops) {
_totalFrameDrops = loggedFrameDrops;
_totalFrameDropsHasChanged = YES;
}
}

- (void) handleRenditionChange:(NSNotification *) notif {
NSDictionary *renditionChangeInfo = (NSDictionary *) notif.object;
NSNumber *advertisedBitrate = renditionChangeInfo[RenditionChangeNotificationInfoAdvertisedBitrate];
Expand Down Expand Up @@ -533,6 +543,12 @@ - (void)checkVideoData {
}
}
}
NSNumber *checkedFrameDrops = nil;
if(_totalFrameDropsHasChanged && _totalFrameDrops > 0) {
_totalFrameDropsHasChanged = NO;
videoDataUpdated = YES;
checkedFrameDrops = [NSNumber numberWithLong:_totalFrameDrops];
}

if (videoDataUpdated) {
MUXSDKVideoData *videoData = [[MUXSDKVideoData alloc] init];
Expand All @@ -557,6 +573,10 @@ - (void)checkVideoData {
if (_lastAdvertisedBitrate > 0 && _started) {
[videoData setVideoSourceAdvertisedBitrate:@(_lastAdvertisedBitrate)];
}
if(checkedFrameDrops) {
[videoData setVideoSourceFrameDrops:checkedFrameDrops];
}

MUXSDKDataEvent *dataEvent = [[MUXSDKDataEvent alloc] init];
[dataEvent setVideoData:videoData];
[MUXSDKCore dispatchEvent:dataEvent forPlayer:_name];
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', '~>4.0'
pod 'Mux-Stats-Core', '~>4.2'

target 'MUXSDKStatsTests' do
inherit! :search_paths
# Pods for testing
pod 'Mux-Stats-Core', '~>4.0'
pod 'Mux-Stats-Core', '~>4.2'
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', '~>4.0'
pod 'Mux-Stats-Core', '~>4.2'
end
8 changes: 4 additions & 4 deletions MUXSDKStats/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
PODS:
- Mux-Stats-Core (4.0.0)
- Mux-Stats-Core (4.2.0)

DEPENDENCIES:
- Mux-Stats-Core (~> 4.0)
- Mux-Stats-Core (~> 4.2)

SPEC REPOS:
trunk:
- Mux-Stats-Core

SPEC CHECKSUMS:
Mux-Stats-Core: 619b7da5505ef3420560577ec8bb4cab258ba30d
Mux-Stats-Core: 7ea0bed4685c18d7a77119be68b8adc776840d25

PODFILE CHECKSUM: 9b0f698a352fb490aa50c00f65e736593f04ae49
PODFILE CHECKSUM: 7a318fb6cfd323bc00ca72b3da13d0f1981c77b3

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 = '3.0.0'
s.version = '3.1.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', '~>4.0'
s.dependency 'Mux-Stats-Core', '~>4.2'

s.ios.deployment_target = '11.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: "4.0.0"
from: "4.2.0"
)
],
targets: [
Expand Down
18 changes: 9 additions & 9 deletions XCFramework/MUXSDKStats.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>MUXSDKStats.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -15,36 +15,36 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<string>tvos-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>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>tvos-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>tvos</string>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
BOOL _automaticVideoChange;
BOOL _didTriggerManualVideoChange;
BOOL _playbackIsLivestream;
NSInteger _totalFrameDrops;
BOOL _totalFrameDropsHasChanged;
}

@property (nonatomic, weak) id<MUXSDKPlayDispatchDelegate> playDispatchDelegate;
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
BOOL _automaticVideoChange;
BOOL _didTriggerManualVideoChange;
BOOL _playbackIsLivestream;
NSInteger _totalFrameDrops;
BOOL _totalFrameDropsHasChanged;
}

@property (nonatomic, weak) id<MUXSDKPlayDispatchDelegate> playDispatchDelegate;
Expand Down
Binary file not shown.
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>21G115</string>
<string>22A400</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.0.0</string>
<string>3.1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -27,19 +27,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<string>14B47b</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>12.3</string>
<string>13.0</string>
<key>DTSDKBuild</key>
<string>21E226</string>
<string>22A372</string>
<key>DTSDKName</key>
<string>macosx12.3</string>
<string>macosx13.0</string>
<key>DTXcode</key>
<string>1401</string>
<string>1410</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<string>14B47b</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 @@ -74,6 +74,8 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
BOOL _automaticVideoChange;
BOOL _didTriggerManualVideoChange;
BOOL _playbackIsLivestream;
NSInteger _totalFrameDrops;
BOOL _totalFrameDropsHasChanged;
}

@property (nonatomic, weak) id<MUXSDKPlayDispatchDelegate> playDispatchDelegate;
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<dict>
<key>Headers/MUXSDKPlayerBinding.h</key>
<data>
HxFqa1bh8d4u7co2exZq0ZGg2I4=
M1nmxfgFpgAo4Skt045RSal7UVc=
</data>
<key>Headers/MUXSDKStats.h</key>
<data>
gL3TQD7YDBFt5IoFykpHpruUeTg=
</data>
<key>Info.plist</key>
<data>
sCTQxTL9iRHGQfh/xNtsN0Mj9CM=
RaD5cEAlR4zUhPLNVLaVdzpnNxw=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand All @@ -27,7 +27,7 @@
<dict>
<key>hash2</key>
<data>
7eb8SKafqdT0KCZoH+9Uf15jYiHWwpDgzengf/KZZwE=
v/d7IiNFkMA1dh3GkOetvEhA+Zp1/N/8Tl1i4n9IgmU=
</data>
</dict>
<key>Headers/MUXSDKStats.h</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
BOOL _automaticVideoChange;
BOOL _didTriggerManualVideoChange;
BOOL _playbackIsLivestream;
NSInteger _totalFrameDrops;
BOOL _totalFrameDropsHasChanged;
}

@property (nonatomic, weak) id<MUXSDKPlayDispatchDelegate> playDispatchDelegate;
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ typedef NS_ENUM(NSUInteger, MUXSDKViewOrientation) {
BOOL _automaticVideoChange;
BOOL _didTriggerManualVideoChange;
BOOL _playbackIsLivestream;
NSInteger _totalFrameDrops;
BOOL _totalFrameDropsHasChanged;
}

@property (nonatomic, weak) id<MUXSDKPlayDispatchDelegate> playDispatchDelegate;
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>
HxFqa1bh8d4u7co2exZq0ZGg2I4=
M1nmxfgFpgAo4Skt045RSal7UVc=
</data>
<key>Headers/MUXSDKStats.h</key>
<data>
Expand All @@ -18,7 +18,7 @@
</data>
<key>Info.plist</key>
<data>
yu1GtJrZSwFDY99MvMZEZE06JtU=
0P2lJLYEqEobKHYfeC2Pf8u8i/k=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand All @@ -31,7 +31,7 @@
<dict>
<key>hash2</key>
<data>
7eb8SKafqdT0KCZoH+9Uf15jYiHWwpDgzengf/KZZwE=
v/d7IiNFkMA1dh3GkOetvEhA+Zp1/N/8Tl1i4n9IgmU=
</data>
</dict>
<key>Headers/MUXSDKStats.h</key>
Expand Down
Loading

0 comments on commit 6a06965

Please sign in to comment.