rxlabz / audioplayer

A flutter plugin to play audio files iOS / Android / MacOS / Web ( Swift/Java )

Home Page:https://pub.dartlang.org/packages/audioplayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mediaPlayer keeps going null?

LarsDu opened this issue · comments

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

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