From 25678885dd1b9d33fc23801c1d71bb775b8c309a Mon Sep 17 00:00:00 2001 From: jd-buys Date: Wed, 2 Nov 2022 13:28:50 +0200 Subject: [PATCH] The mediaplayer status is unknown even if the buffer is full --- TritonPlayerSDK/Classes/Player/TDMediaPlayer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TritonPlayerSDK/Classes/Player/TDMediaPlayer.m b/TritonPlayerSDK/Classes/Player/TDMediaPlayer.m index 4a45976..df744fa 100644 --- a/TritonPlayerSDK/Classes/Player/TDMediaPlayer.m +++ b/TritonPlayerSDK/Classes/Player/TDMediaPlayer.m @@ -383,7 +383,7 @@ -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NS BOOL isFromNetwork = ([self.streamURL containsString:@"http://"] || [self.streamURL containsString:@"https://"]); BOOL isNotFailed = self.mediaPlayerItem.status != AVPlayerItemStatusFailed; - BOOL isReadyToPlay = self.mediaPlayerItem.status == AVPlayerItemStatusReadyToPlay; + BOOL isReadyToPlay = self.mediaPlayerItem.status == AVPlayerItemStatusReadyToPlay || self.mediaPlayerItem.status == AVPlayerItemStatusUnknown; if((!isFromNetwork && isNotFailed) || (isReadyToPlay && isFromNetwork)) { // Move state machine to play state