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

audio.startPlaying(null) causes NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Master
    • Master
    • cordova-plugin-media
    • android

    Description

      When AudioHandler.resumeAllGainedFocus is called it calls each AudioPlayer with startPlaying(null). That causes a NullPointerException:

      11-16 16:13:11.071 E/AndroidRuntime(30650): FATAL EXCEPTION: JavaBridge
      11-16 16:13:11.071 E/AndroidRuntime(30650): java.lang.NullPointerException
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at org.apache.cordova.media.AudioPlayer.readyPlayer(AudioPlayer.java:583)
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at org.apache.cordova.media.AudioPlayer.startPlaying(AudioPlayer.java:299)
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at org.apache.cordova.media.AudioHandler.resumeAllGainedFocus(AudioHandler.java:414)
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at org.apache.cordova.media.AudioHandler$1.onAudioFocusChange(AudioHandler.java:431)
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at android.media.AudioManager$FocusEventHandlerDelegate$1.handleMessage(AudioManager.java:2044)
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at android.os.Handler.dispatchMessage(Handler.java:102)
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at android.os.Looper.loop(Looper.java:136)
      11-16 16:13:11.071 E/AndroidRuntime(30650):     at android.os.HandlerThread.run(HandlerThread.java:61)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fkoenigs Frank Koenigstein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: