Skip to content

onMediaItemTransition not called when having a single media item with REPEAT_MODE_ALL #10667

Description

@mpivchev

Sometimes there are cases where even if we set to repeat a queue (REPEAT_MODE_ALL), we only have one track in the timeline. In that case I would assume that Player.MEDIA_ITEM_TRANSITION_REASON_REPEAT would trigger, since technically we are repeating the same track, but it doesn't seem like this is the case.

Here are the steps:

  1. Have one track in a queue with REPEAT_MODE_ALL set.
  2. Press the "skip to next" button.
  3. The track plays again, but onMediaItemTransition is not triggered with MEDIA_ITEM_TRANSITION_REASON_REPEAT

Is this state not considered a media transition? If that's the case, how can I track whenever the media item repeats itself again?

Activity

  1. tonihei commented on Oct 6, 2022

    @tonihei
    Collaborator

    Thanks for reporting! This is not expected and it should send onMediaItemTransition. The reason should probably be MEDIA_ITEM_TRANSITION_REASON_SEEK though.

  2. self-assigned this
    on Oct 6, 2022
  3. tonihei commented on Nov 14, 2022

    @tonihei
    Collaborator

    Fixed by the commit above.

  4. added a commit that references this issue on Dec 8, 2022
  5. locked and limited conversation to collaborators on Jan 14, 2023
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