Flutter-AssetsAudioPlayer
Flutter-AssetsAudioPlayer copied to clipboard
Notification problem on iOS for liveStream only
Flutter Version
My version : >=2.12.0 <3.0.0
Lib Version
My version : ^3.0.3+6
Platform (Android / iOS / web) + version
Platform : iOS
Describe the bug
When I play a liveStream, if I pause on the notification, the play button is then greyed out and I can't resume the stream using the notification. What's even worse is if I pause using my app's UI, the play button on the notification is then usable, but not linked to my actual stream (if I press it, it will switch to pause button but not playing any sound) This issue is only happening on iOS
Small code to reproduce
import 'package:flutter/material.dart';
import 'package:assets_audio_player/assets_audio_player.dart';
class _RadioPageState extends State<RadioPage> {
final assetsAudioPlayer = AssetsAudioPlayer();
@override
void initState() {
super.initState();
initRadioService();
}
Future<void> initRadioService() async {
await assetsAudioPlayer.open(
Audio.liveStream(myStreamUrl,
metas: Metas(
title: title,
artist: artist,
album: album,
image: MetasImage.network(myImageUrl),
),
),
autoStart: false,
showNotification: true,
);
}
}
MetasImage.network(myImageUrl) works fine with you?!