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

Update bitmovin dec 2024 #9

Open
wants to merge 143 commits into
base: update_bitmovin_nov_2024
Choose a base branch
from

Conversation

joornby-angel
Copy link
Collaborator

  • december bitmovin updates
  • pip fixes

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 27 commits November 22, 2024 13:18
…-mediasession-module

Add missing version replacement command for mediasession module
Co-authored-by: Roland Kákonyi <[email protected]>
Co-authored-by: Roland Kákonyi <[email protected]>
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
…o_3.94.0+jason

Update android player to 3.94.0+jason
# Conflicts:
#	android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt
…pdate_bitmovin_dec_2024

# Conflicts:
#	android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt
@@ -270,6 +295,14 @@ class RNPlayerView(
val aspectRatio =
player?.playbackVideoData
?.let { Rational(it.width, it.height) }
?.let { rational ->
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if (!isPictureInPictureAvailable() || Build.VERSION.SDK_INT < Build.VERSION_CODES.S) return
if (!isPictureInPictureAvailable() ||
Build.VERSION.SDK_INT < Build.VERSION_CODES.S ||
_playerView == null
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix for when pip enters from normal screens, and not just videos

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.

6 participants