0

I'm trying to hide the seek bar while playing the live stream. It seems like not adding it to the system actions is all I need to do but it still shows up. At first it's just the bar, then after 10 seconds the start and end times appears and the icon to drag along the bar. I have this in my audio handler file:

playbackState.add(playbackState.value.copyWith(
            controls: [
              if (playing) MediaControl.pause else MediaControl.play,
            ],
            systemActions: {
              MediaAction.rewind,
            },
            processingState: const {
              ProcessingState.idle: AudioProcessingState.idle,
              ProcessingState.loading: AudioProcessingState.loading,
              ProcessingState.buffering: AudioProcessingState.buffering,
              ProcessingState.ready: AudioProcessingState.ready,
              ProcessingState.completed: AudioProcessingState.completed,
            }[_audioPlayer.processingState]!,
            playing: playing,
            updatePosition: Duration.zero,
            bufferedPosition: Duration.zero,
            speed: _audioPlayer.speed,
          ));

You can see I'm not adding MediaAction.seek. According to https://pub.dev/documentation/audio_service/latest/audio_service/PlaybackState/systemActions.html you need to add that action for it to show up but it's showing up anyway. I've tried not declaring systemActions, setting a bool that is false as condition to add the seek action, removing other values assigned just in case. But I can't seem to get rid of the seek bar.

swiftymf
  • 21
  • 4

0 Answers0