Skip to content

Asynchronous onAddMediaItems immediately get skipped when seeking to them #85

Description

@lukel97

Hi there, we’ve been trying out the main branch for the onAddMediaItems callback which is exactly what we require for our use case:
Our app adds a media item to the playlist via the controller but it only knows the media id of the item, the session itself then resolves the URL and metadata by communicating to an external server.

It’s been working great so far but the one edge case we’ve found so far is that when seeking to a media item that was just added, but not yet resolved, the player seems to immediately skip over it.

For example, if your playlist looks like

A C
^

where A is the currently playing media item, and then you add an “unresolved" media item B so it then becomes

A B C
^

If you seek to the next media item via seekToNextMediaItem, it immediately skips past B to C:

A B C
    ^

I’ve tested that this doesn’t happen if onAddMediaItems resolves immediately with a URI (via Futures.immediateFuture).

Is this by design? Or are we maybe misusing onAddMediaItems here?

The revision this is happening on is a105d03. (We’ve built snapshot artifacts here if anyone else is interested in riding the bleeding edge)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions