Skip to content

Calling pause while track is loading has no effect. #114

Open
@curiousdustin

Description

@curiousdustin

Describe the bug
If pause() is called while the next track is loading, the track still plays after it has loaded.

Expected behavior
The track would not play once it has loaded. Instead it would be paused at the beginning.

Desktop (please complete the following information):

  • Version 0.11.2

Additional context
I believe this is because of the _playWhenReady flag. If I add the following in AVPlayerWrapper, the issue is resolved.

func pause() {
    _playWhenReady = false
    avPlayer.pause()
}

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