Skip to content

feat: implement Android player bridge - #5

Draft
TenGosc007 wants to merge 35 commits into
mainfrom
android-sdk
Draft

feat: implement Android player bridge#5
TenGosc007 wants to merge 35 commits into
mainfrom
android-sdk

Conversation

@TenGosc007

@TenGosc007 TenGosc007 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Wrap native BunnyStreamPlayer from the Bunny Android Gradle module;
map RN props, commands, and events.

untitled-ezgif com-resize

@TenGosc007 TenGosc007 self-assigned this Aug 12, 2026
…ion and validation

- Add net.bunny:api:3.3.0 dependency to android/build.gradle for BunnyStreamApi access
- Extend NativeBunnyStreamPlayerSpec instead of ReactContextBaseJavaModule
- Implement initialize(accessKey, libraryId) method delegating to BunnyStreamApi.initialize
- Add validateLibraryId helper with finite/positive/integer validation
- Add @Suppress("DEPRECATION") annotation to createNativeModules
- Add explicit type parameter
…tive player wrapper

- Add BunnyStreamPlayerView wrapper extending FrameLayout with single BunnyStreamPlayer child
- Implement BunnyStreamPlayerViewManager extending SimpleViewManager with Codegen delegate integration
- Add commitProps() lifecycle hook in onAfterUpdateTransaction for prop batching
- Add cleanup() and onDropViewInstance override for proper resource disposal
- Update ViewManager documentation from stub placeholder
- Add CommandQueue class with FIFO semantics and ready-gate for Play/Pause/SeekTo commands
- Add PlayerCommand sealed class hierarchy for type-safe command representation
- Integrate CommandQueue in BunnyStreamPlayerView with executor lambda delegating to player methods
- Add onPlayerReady() hook to drain pending commands when player reaches STATE_READY
- Reset command queue on source change and cleanup to drop stale commands
- Route
…d state machine

- Add androidx.media3:media3-common:1.6.0 dependency for Player.Listener and PlaybackException access
- Add PlayerEventListener adapter registering Media3 Player.Listener on DefaultBunnyPlayer.currentPlayer
- Implement generation-based callback filtering to drop stale events after source changes
- Add FabricEventEmitter wrapper over EventDispatcher with WritableMap payload building
- Implement PlaybackState sealed
…te cleanup lifecycle

- Add BunnyPlayerLease class with atomic acquire/release semantics for DefaultBunnyPlayer singleton ownership
- Implement onRevoke callback to trigger cleanup when newer view takes over
- Add lease.acquire() in BunnyStreamPlayerView.init and lease.release() in cleanup()
- Add cleanedUp guard to prevent double-cleanup from lease revoke + onDropViewInstance
- Split cleanup() into public method (releases lease) and private
Comment thread src/index.tsx Fixed
Comment thread src/index.tsx Fixed
Comment thread src/index.tsx Dismissed
Comment thread src/index.tsx Dismissed
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

- Migrate BunnyStreamPlayerPackage to BaseReactPackage
- Fix view ID resolution in view manager
- Add buffering end event on ready transition
- Add slug to example app.json for singleApp mode

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Comment thread src/index.tsx Dismissed
Comment thread src/index.tsx Dismissed
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