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

Release 0.31.0 #555

Merged
merged 89 commits into from
Nov 7, 2024
Merged

Release 0.31.0 #555

merged 89 commits into from
Nov 7, 2024

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Nov 7, 2024

Release 0.31.0. Please review and merge this PR to continue the release process.

As I'll use a base branch and 2 separate PRs instead
To implement lock-screen controls, a player instance must be
'kept alive', so that the player is not garbage-collected or
destroyed by the system when the view is destroyed.

There are 2 ways to do this:
- init the player on the service itself
  (like in the Android SDK sample)
- init the player as usual, and somehow pass it to the service,
  to store an additional reference

This first version implements the second option.

The app has 1 strong reference, and the service has 1 strong reference
to the player. So that whenever the app dies, the background playback
still goes on.

Current Issues:
- Whenever the app gets back, the player instance should get fetched back as well!
- Another limitation with this implementation is that we're calling `setupMediaSession`
  on `player.ts`'s `inizitalize()`. But when changing sources
  (e.g. playback view, click back, playback view), the source in the
  media session does not get overridden with the source from the new view.
Via native by using player module

Note: The actual media session module can just be a native one (like offline module)
as it is just called via native (player module)
This module will be Android-only.
The old player was not getting destroyed when a
new one is being put in charge of the media session
This has to be handled via the activity lifecycle.
Took `BackgroundPlaybackScreen` from Android SDK samples as the example

Also fix `playerEventRelay` being null in some conditions
As modules represent something native that can be re-used from the
JS side, but this is not the case here
Limitation section will need an update once the lock-screen
implementation into Android SDK is finished
123mpozzi and others added 24 commits November 5, 2024 16:05
- NowPlaying info for iOS
- MediaSessions for Android
Pair-programming session w Mario

Improve general player view and player management

Fix:
- Restore the correct player from media session
- Media Session not getting destroyed
  as the `@ReactMethod onDestroy()` in `PlayerModule.kt` was nullifying the media session manager
  inside the promise block. However, the main thread was already killed from JS, so that code was
  unreached

Spot and comment a bug in `PlayerView` creation in Android SDK side
As this config is not existing on Native, we have
to set a default value directly here

Because it may not be there in the Json
…een-controls

Android: support Media Controls
@github-actions github-actions bot requested review from a team as code owners November 7, 2024 12:53
@github-actions github-actions bot requested a review from 123mpozzi November 7, 2024 12:53
@123mpozzi 123mpozzi merged commit ff23b47 into main Nov 7, 2024
1 check passed
@123mpozzi 123mpozzi deleted the release/v0.31.0 branch November 7, 2024 12:56
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