Fix audio player: streamline setUrl method call for web implementation
This commit is contained in:
@@ -67,10 +67,7 @@ class _AudioPlayerBarState extends State<AudioPlayerBar>
|
||||
try {
|
||||
if (kIsWeb) {
|
||||
// Web implementation
|
||||
await _audioPlayer.setUrl(
|
||||
widget.fileUrl,
|
||||
mimeType: widget.mimeType,
|
||||
);
|
||||
await _audioPlayer.setUrl(widget.fileUrl, mimeType: widget.mimeType);
|
||||
_durationSubscription = _audioPlayer.durationStream.listen((d) {
|
||||
if (d != null) {
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user