Skip to content

feat: update android sdk - #10

Merged
TenGosc007 merged 7 commits into
mainfrom
update-android-sdk
Sep 2, 2026
Merged

feat: update android sdk#10
TenGosc007 merged 7 commits into
mainfrom
update-android-sdk

Conversation

@TenGosc007

@TenGosc007 TenGosc007 commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds native live streaming support to the Android bridge on top of Bunny Stream SDK 4.0.0, and fixes theming issues in the native player controls. Targets player-state (which already ships the VOD bridge and useBunnyStreamPlayer hook).

What's included

Native live player

  • New BunnyLiveStreamPlayerView hosting the SDK's Compose BunnyLiveStreamPlayer inside a ComposeView, with a bridge-owned BunnyLiveStreamPlayerViewModel + ViewModelStore/LifecycleOwner so polling and lifecycle are fully controlled by the bridge (no double polling, no leaked ViewModel when the RN view unmounts).
  • BunnyLiveStreamPlayerViewManager (Fabric) with Codegen props/commands and new onLiveStateChange / onLiveError events forwarding the SDK's live state machine (loading / offline / countdown / trailer / live / vod, isLive, DVR window, countdown target) to JS.
  • BunnyPlayerLease arbitration: mounting the live view revokes the VOD player's lease on the shared DefaultBunnyPlayer singleton (and vice versa).

JS/TS API

  • BunnyStreamPlayer source extended with a live variant ({ type: 'live', libraryId, videoId, ... }); the component picks the right native host.
  • useBunnyStreamPlayer hook consumes onLiveStateChange/onLiveError and exposes liveState / liveError, with sourceKey-based reset on source change.
  • New BunnyLiveStreamPlayerNativeComponent.ts Codegen spec.

Example app

  • New LivePlayerScreen showing current live state, DVR window, and countdown, plus a DirectLivePlayModal for manual videoId/streamId testing.
  • Home screen entry point to the live player.

Fixes — native control theming

  • Settings menu (quality/speed) was rendering white-on-white because PopupMenu requires an AppCompat parent theme. Added BunnyReactNativePlayerTheme (parent Theme.AppCompat.DayNight.NoActionBar) and applied it via ContextThemeWrapper to BunnyStreamPlayerView, so the menu now follows the system light/dark setting.
  • Progress bar readout kept white with a native drop shadow (added to the SDK's BunnyPlayerView) instead of the SDK's auto-contrast sampler, for consistent legibility over any video background.
  • Removed a stale call to releaseAutoProgressTextColorResources (no longer exposed on BunnyStreamPlayer) that broke the debug build.
  • Added androidx.appcompat:appcompat dependency.

Testing

  • yarn typecheck, yarn lint, yarn test pass.
  • yarn android in example/ builds and installs on a Pixel 9 (API 35) emulator; manually verified live playback, live state transitions, and the settings menu in both light and dark system themes.

@TenGosc007 TenGosc007 self-assigned this Aug 23, 2026
Comment thread src/index.tsx Fixed
Comment thread src/index.tsx Fixed
Comment thread src/index.tsx Fixed
Comment thread src/specs/BunnyLiveStreamPlayerNativeComponent.ts Dismissed
Comment thread src/index.tsx Fixed
Comment thread src/index.tsx Dismissed
Comment thread src/index.tsx Dismissed
@jakubboguski jakubboguski changed the title Update android sdk feat: update android sdk Sep 2, 2026
Base automatically changed from player-state to main September 2, 2026 08:30
TenGosc007 and others added 7 commits September 2, 2026 10:30
…ntrols and clarify progress text color comment
…DK snapshot

The build:android job fails because the `net.bunny:player`/`api:4.0.0-live.shadow.1-SNAPSHOT`
artifacts are local-only snapshots that are not resolvable in CI. Disable the job until a
public or otherwise resolvable Maven artifact is available.

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@TenGosc007
TenGosc007 merged commit 03a6e59 into main Sep 2, 2026
6 checks passed
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.

3 participants