fix: audio play bug for ios safari. (#285)
* fix: audio play bug for ios safari. (WIP). * chore: Repair and can pop up the playback prompt dialog box correctly. * chore: add AudioContext to reduce playback delay.
This commit is contained in:
@@ -79,6 +79,15 @@ class _RoomPageState extends State<RoomPage> {
|
||||
print('Failed to decode: $_');
|
||||
}
|
||||
context.showDataReceivedDialog(decoded);
|
||||
})
|
||||
..on<AudioPlaybackStatusChanged>((event) async {
|
||||
if (!widget.room.canPlaybackAudio) {
|
||||
print('Audio playback failed for iOS Safari ..........');
|
||||
bool? yesno = await context.showPlayAudioManuallyDialog();
|
||||
if (yesno == true) {
|
||||
await widget.room.startAudio();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
void _askPublish() async {
|
||||
|
||||
Reference in New Issue
Block a user