Skip to content

Commit

Permalink
Merge pull request #25 from muxinc/dj/video-source-duration
Browse files Browse the repository at this point in the history
bugfix: do not re-ask for currentItem.asset.duration
  • Loading branch information
dylanjha authored Oct 15, 2019
2 parents a310c75 + fa1c344 commit 7ba216a
Show file tree
Hide file tree
Showing 30 changed files with 16 additions and 18 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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.
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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.
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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.
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 @@ -14,7 +14,7 @@
</data>
<key>Info.plist</key>
<data>
kroQTbTgWCopfUtPc0wXTdi3JsI=
3M48mEVBCS4jouEeXq9pQH2A6MU=
</data>
<key>Modules/module.modulemap</key>
<data>
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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>0.0.6</string>
</dict>
Expand Down
Binary file not shown.
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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>0.0.6</string>
</dict>
Expand Down
Binary file not shown.
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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>0.0.6</string>
</dict>
Expand Down
Binary file not shown.
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 @@ -18,7 +18,7 @@
</data>
<key>Info.plist</key>
<data>
BJMoQbLxuqWxdjTnU7vMRusnRfo=
1bYNYxHlNZ1GXQiUCj+ZYJJB54A=
</data>
<key>Modules/module.modulemap</key>
<data>
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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
12 changes: 5 additions & 7 deletions MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,11 @@ - (void)checkVideoData {
[videoData setVideoSourceIsLive:@"true"];
} else {
[videoData setVideoSourceIsLive:@"false"];
if (_player.currentItem && _player.currentItem.asset) {
float sec = CMTimeGetSeconds(_player.currentItem.asset.duration);
if (sec && sec > 0) {
float ms = sec * 1000;
NSNumber *timeMs = [NSNumber numberWithFloat:ms];
[videoData setVideoSourceDuration:[NSNumber numberWithLongLong:[timeMs longLongValue]]];
}
float sec = CMTimeGetSeconds(_videoDuration);
if (sec && sec > 0) {
float ms = sec * 1000;
NSNumber *timeMs = [NSNumber numberWithFloat:ms];
[videoData setVideoSourceDuration:[NSNumber numberWithLongLong:[timeMs longLongValue]]];
}
}
if (_videoURL) {
Expand Down
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.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
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.1'
s.version = '1.0.2'
s.source = { :git => 'https://github.com/muxinc/mux-stats-sdk-avplayer.git',
:tag => "v#{s.version}" }

Expand Down

0 comments on commit 7ba216a

Please sign in to comment.