BunnyPlayerView
Types
Properties
When true, the SDK periodically samples the video frame behind the progress/duration text and switches progressTextColor between black and white based on average luminance, so the readout stays legible regardless of scene brightness. Sampling only runs while the controller is visible and is suspended when the view detaches from the window.
Condensed control bar. When true, secondary controls (settings, captions, duration readout) are hidden to reduce clutter on small surfaces, leaving the essentials (play, progress, mute, PiP, fullscreen). Driven for live playback by the dashboard's enableCompactControls from the live /play customization.
Whether the built-in control bar is used. Set it to false to get a bare video surface and drive playback from your own UI; taps on the player then do nothing and no control ever appears. Defaults to true.
Invoked with the video's chapters once they are known (empty when it has none).
Invoked while the player buffers, so a custom UI can show its own spinner.
Invoked with the video's moments once they are known (empty when it has none).
Invoked when the audio is muted or unmuted, from any source.
Invoked when the engine reports a playback error (after the built-in error overlay is shown). Lets hosts react — the live player uses it to re-poll the stream status and rebuild playback from the live edge.
Invoked whenever the playback rate changes, including the rate the engine restores by itself when net.bunny.bunnystreamplayer.config.PlaybackSpeedConfig.rememberLastSpeed is on.
Invoked when playback moves between this device and a connected Chromecast. A custom UI needs it to stop presenting itself as the thing playing the video.
Invoked when playback starts or stops, whatever the cause - a control, your own code, the end of the video, or a handover to Chromecast. Keep a custom play/pause button in sync with this rather than with your own taps.
Invoked with the retention graph once it is known, for a custom seek bar.
Invoked with the current video's pixel dimensions (first frame and on change) so the host can size its container to the real aspect ratio — enabling correct display of both 16:9 and 9:16 (vertical) content.
Text color used for the position counter, total duration, and the / divider between them in the bottom controls. Defaults to Color.WHITE so the readout stays legible against the dark letterbox. The Bunny dashboard does not expose this setting — set it on the view from your app code to override.
Functions
Releases background resources held by the auto-contrast sampler. Call from your Activity/Fragment teardown if you toggled autoProgressTextColor — otherwise the sampler's worker thread persists until the view is garbage collected.