Skip to content
This repository was archived by the owner on Aug 7, 2022. It is now read-only.
This repository was archived by the owner on Aug 7, 2022. It is now read-only.

Unable to trap Errors Contitions #52

@joesnarky

Description

@joesnarky

Every single request is giving a Result.Success.

flutter_exoplayer: ^0.6.1

final Result result = await _audioPlayer.play(
url,
repeatMode: true,
respectAudioFocus: false,
playerMode: PlayerMode.BACKGROUND,
);

I can put in a bad URL but it still gives Result.Success.

I've used this library in the past without issues so not sure what is going on now.
Using this
AudioPlayer.logEnabled = true;
doesn't provide anything useful.

I do see exoplayer exceptions thrown and caught in the logs so I can't even put a try catch around the code to catch errors.

I added a listener in initaudioplayer() but this is not even trapped errors.
void _initAudioPlayer() {
_audioPlayer = AudioPlayer();

_playerErrorSubscription = _audioPlayer.onPlayerError.listen((msg) {
  print('audioPlayer ERROR : $msg');
  playerState.value = PlayerState.STOPPED;
  _position = Duration(seconds: 0);
})

Can't see how I will be able to use this library without any way to trap error conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions