Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setMediaListAndPlay to PlayerRepository #497

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

luizgrp
Copy link
Member

@luizgrp luizgrp commented Aug 16, 2022

WHAT

Add setMediaListAndPlay to PlayerRepository with a workaround implementation for #495.

WHY

In order to be able to play an item at specific index.
In order to be able to set the media list and seek to a specific index without having an intermediate emission from PlayerRepository.mediaPosition.

HOW

Checklist 📋

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

@luizgrp luizgrp merged commit e786818 into google:main Aug 16, 2022
@luizgrp luizgrp deleted the media_playerrepo_setmedialistandplay branch August 16, 2022 20:44
luizgrp added a commit that referenced this pull request Aug 16, 2022
@luizgrp luizgrp requested a review from yschimke August 22, 2022 10:50

// when
sut.setMediaListAndPlay(mediaList, 1)
runUntilPendingCommandsAreFullyHandled(player)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we know we can rely on this still? Does runUntilPendingCommandsAreFullyHandled, wait until the items are resolved and then we get onTimelineChangedcalled on the main thread?

@luizgrp luizgrp self-assigned this Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants