Skip to content

Commit

Permalink
Enable fast-forward on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
MKucharski committed Jul 4, 2024
1 parent 560f92d commit 32cd305
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ios/Classes/BetterPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,8 @@ - (void)setSpeed:(double)speed result:(FlutterResult)result {
result([FlutterError errorWithCode:@"unsupported_speed"
message:@"Speed must be >= 0.0 and <= 2.0"
details:nil]);
} else if ((speed > 1.0 && _player.currentItem.canPlayFastForward) ||
(speed < 1.0 && _player.currentItem.canPlaySlowForward)) {
_playerRate = speed;
result(nil);
} else {
} else if ((speed > 1.0) || (speed < 1.0)) { _playerRate = speed; result(nil); }
else {
if (speed > 1.0) {
result([FlutterError
errorWithCode:@"unsupported_fast_forward"
Expand Down

0 comments on commit 32cd305

Please sign in to comment.