Skip to content

Commit

Permalink
Merge branch 'release/1.8.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed May 11, 2016
2 parents ba259b2 + 0053972 commit 6510efd
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 27 deletions.
8 changes: 4 additions & 4 deletions Podfile.lock
Expand Up @@ -14,11 +14,11 @@ PODS:
- SDWebImage (3.7.0):
- SDWebImage/Core (= 3.7.0)
- SDWebImage/Core (3.7.0)
- SRGMediaPlayer (1.8.3):
- SRGMediaPlayer (1.8.4):
- libextobjc/EXTScope (~> 0.4.1)
- SRGMediaPlayer/Version (= 1.8.3)
- SRGMediaPlayer/Version (= 1.8.4)
- TransitionKit (~> 2.2.0)
- SRGMediaPlayer/Version (1.8.3):
- SRGMediaPlayer/Version (1.8.4):
- libextobjc/EXTScope (~> 0.4.1)
- TransitionKit (~> 2.2.0)
- TransitionKit (2.2.0)
Expand All @@ -40,7 +40,7 @@ SPEC CHECKSUMS:
libextobjc: a650fc1bf489a3d3a9bc2e621efa3e1006fc5471
MAKVONotificationCenter: eddfb85e77040323ee43a0fddbe616926ec005a8
SDWebImage: b42db92951f9d565c55f1d7f1d5efe47e33a7515
SRGMediaPlayer: 7eb098ba4e188ecfe2381cdeb1fae502f30dde82
SRGMediaPlayer: 200abce97328f253f6ca03cef5d7cd216adbce09
TransitionKit: 5c9001a77acc409d71f26a4eba0159cf8619c418

COCOAPODS: 0.39.0
6 changes: 3 additions & 3 deletions Pods/Local Podspecs/SRGMediaPlayer.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion RTSMediaPlayer/RTSMediaPlayerController.m
Expand Up @@ -55,6 +55,7 @@ @interface RTSMediaPlayerController () <RTSMediaPlayerControllerDataSource, UIGe
@property (readwrite) TKState *playingState;
@property (readwrite) TKState *seekingState;
@property (readwrite) TKState *stalledState;
@property (readwrite) TKState *endedState;

@property (readwrite) TKEvent *loadEvent;
@property (readwrite) TKEvent *loadSuccessEvent;
Expand Down Expand Up @@ -357,6 +358,7 @@ - (TKStateMachine *)stateMachine
self.playingState = playing;
self.stalledState = stalled;
self.seekingState = seeking;
self.endedState = ended;

self.loadEvent = load;
self.loadSuccessEvent = loadSuccess;
Expand Down Expand Up @@ -411,6 +413,10 @@ - (void)prepareToPlay

- (void)play
{
if ([self.stateMachine.currentState isEqual:self.endedState]) {
[self reset];
}

if ([self.stateMachine.currentState isEqual:self.idleState]) {
[self loadPlayerAndAutoStartAtTime:[NSValue valueWithCMTime:kCMTimeZero]];
}
Expand Down Expand Up @@ -819,7 +825,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
switch (playerItem.status) {
case AVPlayerItemStatusReadyToPlay:
if (![self.stateMachine.currentState isEqual:self.playingState] && self.startTimeValue) {
if (CMTIME_COMPARE_INLINE([self.startTimeValue CMTimeValue], ==, kCMTimeZero)) {
if (CMTIME_COMPARE_INLINE([self.startTimeValue CMTimeValue], ==, kCMTimeZero) || CMTIME_IS_INVALID([self.startTimeValue CMTimeValue])) {
[self play];
}
else {
Expand Down
2 changes: 1 addition & 1 deletion SRGMediaPlayer.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SRGMediaPlayer"
s.version = "1.8.3"
s.version = "1.8.4"
s.summary = "Shared media player for SRG mobile apps."
s.homepage = "https://github.com/SRGSSR/SRGMediaPlayer-iOS"
s.authors = { "Frédéric Humbert-Droz" => "fred.hd@me.com", "Cédric Luthi" => "cedric.luthi@rts.ch", "Cédric Foellmi" => "cedric@onekilopars.ec", "Samuel Défago" => "defagos@gmail.com", "Pierre-Yves Bertholon" => "py.bertholon@gmail.com" }
Expand Down

0 comments on commit 6510efd

Please sign in to comment.