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

audio.startPlaying(null) causes NullPointerException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Master
    • Fix Version/s: Master
    • Component/s: cordova-plugin-media
    • Labels:
    • Environment:

      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

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

                Dates

                • Created:
                  Updated: