Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11026

iOS 9.3: media.release() kills all running audio files

    XMLWordPrintableJSON

Details

    Description

      I got two media objects
      var media1 = new Media("file1.mp3");
      var media2 = new Media("file2.mp3");

      When I call the media2.release() method while media1 is playing, then an error will popup in XCode and media1 is stopping imediatelly.

      The error message is:

      AVAudioSession.mm:692: -[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.

      When I comment the line

      [self.avSession setActive:NO error:nil];

      in the release method of the CDVSound.m file then the error disappears and media1 is continuing playing after I invoked media2.release().
      Tested on v2.2.0 and v1.0.1 of the cordova-plugin-media plugin.

      Attachments

        Activity

          People

            Unassigned Unassigned
            KramericaIndustries Kramer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: