zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 749 forks source link

Voice recorded audio not working in iOS #657

Open Balasnest opened 4 years ago

Balasnest commented 4 years ago

:beetle: Description

Reproducible step:

Note: Files are not recorded via react-native-audio. It's from another app.

:beetle: What is the observed behavior? It failed to play recorded audio in iOS. failed to load the sound {code: "ENSOSSTATUSERRORDOMAIN1818327410", message: "The operation couldn’t be completed. (OSStatus error 1818327410.)", nativeStackIOS: Array(17), domain: "NSOSStatusErrorDomain", userInfo: {…}}

:beetle: What is the expected behavior? It should play Voice recorded audio in iOS also.

:beetle: Please post your code:

loadSound = playSeconds => {
    file = filePath + '/' + date + this.state.fileType;

    setTimeout(() => {
      this.sound = new Sound(file, '', error => {
        if (error) {
          Logger.log('failed to load the sound', error);
        } else {
          this.startPlaying();
        }
      });
    }, 100);
  };

Which versions are you using?

If your problem is happening on a device, which device?

Balasnest commented 4 years ago

@schumannd @paulmelnikow Need your help please. Thanks!

schumannd commented 4 years ago

we have since moved to using the package expo-av as we were experiencing problems with audio playback on iOS.