Package-level declarations

Types

Link copied to clipboard
data class AudioTrackInfo(val index: Int, val trackId: String?, val label: String?, val languageCode: String?)

One selectable audio track of the current video, as listed in the player's settings menu.

Link copied to clipboard
data class AudioTrackInfoOptions(val options: List<AudioTrackInfo>, val selectedOption: AudioTrackInfo? = null)

Audio tracks available for the current video plus the one that is playing.

Link copied to clipboard
data class Chapter(val startTimeMs: Long, val endTimeMs: Long, val title: String)

A chapter marker of the current video, defined per video in the Bunny dashboard. The player draws chapters as segments on the seek bar; the list arrives through net.bunny.bunnystreamplayer.PlayerStateListener.onChaptersUpdated.

Link copied to clipboard
data class Moment(val label: String, val timestamp: Long)
Link copied to clipboard
data class PlayerIconSet(@DrawableRes val playIcon: Int = R.drawable.ic_play_48dp, @DrawableRes val pauseIcon: Int = R.drawable.ic_pause_48dp, @DrawableRes val rewindIcon: Int = R.drawable.ic_replay_10s_48dp, @DrawableRes val forwardIcon: Int = R.drawable.ic_forward_10s_48dp, @DrawableRes val settingsIcon: Int = R.drawable.ic_settings_24dp, @DrawableRes val volumeOnIcon: Int = R.drawable.ic_volume_on_24dp, @DrawableRes val volumeOffIcon: Int = R.drawable.ic_volume_off_24dp, @DrawableRes val fullscreenOnIcon: Int = R.drawable.ic_fullscreen_24dp, @DrawableRes val fullscreenOffIcon: Int = R.drawable.ic_fullscreen_exit_24dp) : Parcelable

Drawable overrides for the player controls. Assign an instance to net.bunny.bunnystreamplayer.ui.BunnyStreamPlayer.iconSet to replace any of the default icons with your own drawables. Every field defaults to the SDK icon, so override only what you need:

Link copied to clipboard
data class RetentionGraphEntry(val x: Int, val y: Int)

One point of the audience retention (watch-time heatmap) graph drawn above the seek bar.

Link copied to clipboard
data class SeekThumbnail(val seekThumbnailUrls: List<String>, val frameDurationPerThumbnail: Int, val totalThumbnailCount: Int, val thumbnailsPerImage: Int)

Preview thumbnails shown above the seek bar while scrubbing. Bunny generates them as sprite sheets (a grid of frames per image); the player picks the right frame for the hovered position.

Link copied to clipboard
data class SubtitleInfo(val title: String, val language: String)

One caption track of the current video, as listed in the player's captions menu.

Link copied to clipboard
data class Subtitles(val subtitles: List<SubtitleInfo>, val selectedSubtitle: SubtitleInfo? = null)

Caption tracks available for the current video plus the one that is showing.

Link copied to clipboard
data class VideoQuality(val width: Int, val height: Int)

One playable rendition of the current video, offered in the player's quality menu.

Link copied to clipboard
data class VideoQualityOptions(val options: List<VideoQuality>, val selectedOption: VideoQuality? = null)

Renditions available for the current video plus the one that is playing.

Functions

Link copied to clipboard

Turns the API's retention heatmap into offsets the timeline can draw.