I am just trying to add audioplayers pub to my application. but it is going for error, like:
resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
I tried all issues published in Stackoverflow. But I could not get the point.
This is my code:
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
final player = AudioPlayer();
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("data"),
),
body: Center(
child: TextButton(
onPressed: () {
player.setSource(AssetSource("sound/n1.wav"));
},
child: Text("data"),
),
),
),
);
}
}
What are the resources I tried:
- Flutter audioplayers error - No audio is played when clicking the audio button
- Android Studio resetDrmState message on MediaPlayer release and set to null