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 {
|
try {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
// Web implementation
|
// Web implementation
|
||||||
await _audioPlayer.setUrl(
|
await _audioPlayer.setUrl(widget.fileUrl, mimeType: widget.mimeType);
|
||||||
widget.fileUrl,
|
|
||||||
mimeType: widget.mimeType,
|
|
||||||
);
|
|
||||||
_durationSubscription = _audioPlayer.durationStream.listen((d) {
|
_durationSubscription = _audioPlayer.durationStream.listen((d) {
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
Reference in New Issue
Block a user