File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
package/native-package/src/optionalDependencies Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,13 @@ class NativeAudioSoundAdapter implements SoundReturnType {
271271
272272 if ( this . playbackInstance ?. setPlaybackSpeed && this . isLoaded ) {
273273 await this . playbackInstance . setPlaybackSpeed ( rate ) ;
274+
275+ // Some Android backends resume playback as a side effect of changing speed.
276+ // Preserve the previous paused state explicitly so rate changes stay silent.
277+ if ( ! this . isPlaying ) {
278+ await this . playbackInstance . pausePlayer ( ) ;
279+ this . emitPlaybackStatus ( ) ;
280+ }
274281 }
275282 } ;
276283
@@ -315,7 +322,7 @@ class NativeAudioSoundAdapter implements SoundReturnType {
315322
316323const initializeSound =
317324 createNitroSound || LegacyAudioRecorderPlayer
318- ? async (
325+ ? (
319326 source ?: { uri : string } ,
320327 initialStatus ?: Partial < AVPlaybackStatusToSet > ,
321328 onPlaybackStatusUpdate ?: ( playbackStatus : PlaybackStatus ) => void ,
You can’t perform that action at this time.
0 commit comments