diff --git a/RCTVideo.m b/RCTVideo.m index 52486890..b6956ed3 100644 --- a/RCTVideo.m +++ b/RCTVideo.m @@ -96,9 +96,12 @@ static NSString *const statusKeyPath = @"status"; *stop = YES; } }]; - return [NSNumber numberWithFloat:CMTimeGetSeconds(CMTimeRangeGetEnd(effectiveTimeRange))]; + Float64 playableDuration = CMTimeGetSeconds(CMTimeRangeGetEnd(effectiveTimeRange)); + if (playableDuration > 0) { + return [NSNumber numberWithFloat:playableDuration]; + } } - return [NSNumber numberWithFloat:CMTimeGetSeconds(kCMTimeInvalid)]; + return [NSNumber numberWithInteger:0]; } - (void)stopProgressTimer