rxlabz / audioplayer

A flutter plugin to play audio files iOS / Android / MacOS / Web ( Swift/Java )
https://pub.dartlang.org/packages/audioplayer
492 stars 189 forks source link

mediaPlayer keeps going null? #54

Open LarsDu opened 6 years ago

LarsDu commented 6 years ago

I've created a simple audio recorder here: I tend to find that my app will crash due to the mediaplayer going null (tested on a Google Pixel phone) when trying to call seek. For some reason this only happens when the phone is plugged into my computer.

The relavant code is in this file: https://github.com/LarsDu/simple_flutter_audio_recorder/blob/master/lib/audio_play_bar.dart The error:

W/MediaPlayer( 1997): See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case
V/MediaPlayer( 1997): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 1997): cleanDrmObj: mDrmObj=null mDrmSessionId=null
W/MediaPlayer( 1997): mediaplayer went away with unhandled events
alfianakbar commented 5 years ago

I have this kind of problem too. Have you found the solution?