startAudio method

Future<void> startAudio()

Implementation

Future<void> startAudio() async {
  try {
    var audioContextRunning = await audio.startAllAudioElement();
    if (audioContextRunning) {
      _handleAudioPlaybackStarted();
    } else {
      _handleAudioPlaybackFailed();
    }
  } catch (err) {
    logger.warning('could not playback audio $err');
    _handleAudioPlaybackFailed();
  }
}