Skip to content

Commit

Permalink
Releases/v4.1.0 (#248)
Browse files Browse the repository at this point in the history
* fix: improve AVPlayer currentItem transition handling (#247)

* fix: dispatch view end when AVPlayerItem changes

end the view when there is a new AVPlayerItem

* fix: skip dispatching view init when player has no player item

* build: update core library dependency
  • Loading branch information
andrewjl-mux authored Aug 16, 2024
1 parent 705cb2b commit dec068f
Show file tree
Hide file tree
Showing 36 changed files with 127 additions and 113 deletions.
3 changes: 2 additions & 1 deletion MUXSDKStats.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"3.6.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.6.0/MUXSDKStats.xcframework.zip",
"3.6.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.6.1/MUXSDKStats.xcframework.zip",
"3.6.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.6.2/MUXSDKStats.xcframework.zip",
"4.0.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v4.0.0/MUXSDKStats.xcframework.zip"
"4.0.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v4.0.0/MUXSDKStats.xcframework.zip",
"4.1.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v4.1.0/MUXSDKStats.xcframework.zip"
}
14 changes: 7 additions & 7 deletions MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@
"@loader_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.1.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsVision/module.modulemap";
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
Expand Down Expand Up @@ -821,7 +821,7 @@
"@loader_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.1.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsVision/module.modulemap";
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
Expand Down Expand Up @@ -917,7 +917,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.1.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
Expand Down Expand Up @@ -951,7 +951,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.1.0;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
PRODUCT_NAME = MUXSDKStats;
Expand Down Expand Up @@ -1134,7 +1134,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.1.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1168,7 +1168,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.1.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1284,7 +1284,7 @@
repositoryURL = "https://github.com/muxinc/stats-sdk-objc";
requirement = {
kind = exactVersion;
version = 5.0.1;
version = 5.1.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
24 changes: 15 additions & 9 deletions MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

// Min number of seconds between timeupdate events. (100ms)
Expand Down Expand Up @@ -367,15 +367,16 @@ - (void) safelyRemovePlayerItemObserverForKeyPath:(NSString *)keyPath {
}

- (void)detachAVPlayer {
// NSLog(@"%s: Detaching AVPlayer", __PRETTY_FUNCTION__);
if (_playerItem) {
[self stopMonitoringAVPlayerItem];
}
[self safelyRemoveTimeObserverForPlayer];
[self safelyRemovePlayerObserverForKeyPath:@"rate"];
[self safelyRemovePlayerObserverForKeyPath:@"status"];
[self safelyRemovePlayerObserverForKeyPath:@"currentItem"];
[self safelyRemovePlayerObserverForKeyPath:@"timeControlStatus"];
_player = nil;
if (_playerItem) {
[self stopMonitoringAVPlayerItem];
}
if (_timeUpdateTimer) {
[_timeUpdateTimer invalidate];
_timeUpdateTimer = nil;
Expand All @@ -390,9 +391,14 @@ - (void)monitorAVPlayerItem {
if (_didTriggerManualVideoChange) {
_didTriggerManualVideoChange = false;
}
// NSLog(@"%s: Dispatching View End", __PRETTY_FUNCTION__);
[self dispatchViewEnd];
[self stopMonitoringAVPlayerItem];

[self.playDispatchDelegate videoChangedForPlayer:_name];
if (_player.currentItem) {
NSLog(@"Player: %@ Current Item: %@", _player, _player.currentItem);
[self.playDispatchDelegate videoChangedForPlayer:_name];
}

//
// Special case for AVQueuePlayer
Expand Down Expand Up @@ -461,13 +467,13 @@ - (void)dispatchSessionData {
}

- (void)stopMonitoringAVPlayerItem {
if (!_isAdPlaying) {
[MUXSDKCore destroyPlayer: _name];
}

[self safelyRemovePlayerItemObserverForKeyPath:@"status"];
[self safelyRemovePlayerItemObserverForKeyPath:@"playbackBufferEmpty"];
_playerItem = nil;
if (!_isAdPlaying) {
// NSLog(@"%s: MUXSDKCore destroyPlayer", __PRETTY_FUNCTION__);
[MUXSDKCore destroyPlayer: _name];
}
}

- (void) programChangedForPlayer {
Expand Down
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 = '4.0.0'
s.version = '4.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', '5.0.1'
s.dependency 'Mux-Stats-Core', '5.1.0'

s.ios.deployment_target = '12.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(
dependencies: [
.package(
url: "https://github.com/muxinc/stats-sdk-objc.git",
exact: "5.0.1"
exact: "5.1.0"
)
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/muxinc/stats-sdk-objc.git",
exact: "5.0.1"
exact: "5.1.0"
)
],
targets: [
Expand Down
22 changes: 11 additions & 11 deletions XCFramework/MUXSDKStats.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,21 @@
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>xros-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>xros</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>tvos</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>MUXSDKStats.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -51,29 +48,32 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<string>ios-arm64_x86_64-simulator</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>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>MUXSDKStats.framework/MUXSDKStats</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<string>xros-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>MUXSDKStats.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -82,7 +82,7 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<string>xros</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
Expand Down
Binary file modified XCFramework/MUXSDKStats.xcframework/_CodeSignature/CodeDirectory
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit dec068f

Please sign in to comment.