Skip to content

Commit 9f93885

Browse files
author
Shane
committed
Update AudioPlayerModule.java
Fix error in Android <= 6 due to attempting to pause the player when it is not already playing.
1 parent 95bce57 commit 9f93885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/reactnativecommunity/rctaudiotoolkit/AudioPlayerModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public void set(Integer playerId, ReadableMap options, Callback callback) {
373373

374374
player.setPlaybackParams(params);
375375

376-
if (needToPauseAfterSet) {
376+
if (needToPauseAfterSet && player.isPlaying()) {
377377
player.pause();
378378
}
379379
}

0 commit comments

Comments
 (0)