Open
Description
Flutter Version
My version : 3.24.4
Lib Version
My version : ^3.1.1
Platform (Android / iOS / web) + version
Platform : Web Deployed and Test on...
- Microsoft Edge:
Version 130.0.2849.68 (Official build) (64-bit)
- Google Chrome:
Version 130.0.6723.93 (Official Build) (64-bit)
- Safari
18
on iOS18
Describe the bug
[√] I can run flutter run -d chrome
(tested web
only) and have the audio play just fine.
[X] however, when i deploy to the internet using firebase (firebase deploy
) no sound is played an the network console prints the founding messages (2 warnings, 1 error).
MissingPluginException(No implementation found for method stop on channel assets_audio_player)
MissingPluginException(No implementation found for method open on channel assets_audio_player)
Uncaught Error: MissingPluginException(No implementation found for method open on channel assets_audio_player)
Flutter doctor
[√] Flutter (Channel stable, 3.24.4, on Microsoft Windows [Version 10.0.22631.4391], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/windows-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.32)
[!] Android Studio (not installed)
[√] VS Code (version 1.95.1)
[√] Connected device (3 available)
[√] Network resources
Small code to reproduce
main.dart
import 'package:assets_audio_player/assets_audio_player.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: RaisedButton(
child: Text("open"),
onPressed: () {
AssetsAudioPlayer.newPlayer()
.open(Audio('assets/sound.mp3'), autoStart: true);
}
),
),
),
);
}
}
pubspec.yaml
dependencies:
flutter:
sdk: flutter
#...
assets_audio_player: ^3.1.1
#...
assets:
- assets/sound.mp3
#...