BBNativePlayerAPI

class BBNativePlayerAPI(playerView: BBNativePlayerView, eventBus: EventBus?)

BBNativePlayerAPI is the convenience API, accessible via BBNativePlayerView::player. It simply wraps BBNativePlayerView::callApiMethod & BBNativePlayerView::getApiProperty

Parameters

playerView

Constructors

Link copied to clipboard
constructor(playerView: BBNativePlayerView, eventBus: EventBus?)

no need to call this directly; use the playerView's player property

Properties

Link copied to clipboard

Ad media height in pixels (read-only)

Link copied to clipboard

Ad media width in pixels (read-only)

Link copied to clipboard

Clip data (read-only)

Link copied to clipboard

Controls shown

Link copied to clipboard

Media duration in seconds (read-only)

Link copied to clipboard

InView override

Link copied to clipboard
val mode: String?

Mode (read-only)

Link copied to clipboard

Muted state

Link copied to clipboard
val phase: Phase?

Phase (read-only)

Link copied to clipboard

Playout data (read-only)

Link copied to clipboard

Project data (read-only)

Link copied to clipboard
var relatedItems: List<ContentItemInterface>?

Related items

Link copied to clipboard
val state: State?

State (read-only)

Link copied to clipboard

Volume 0.0 - 1.0

Functions

Link copied to clipboard

Destruct, freeing all memory allocated internally

Link copied to clipboard

Cancel AutoPlayNext countdown

Link copied to clipboard
fun collapse()

Collapse

Link copied to clipboard

Enter fullscreen

Link copied to clipboard

Leave fullscreen

Link copied to clipboard
fun expand()

Expand

Link copied to clipboard
fun loadWithClipId(clipId: String, initiator: String? = "external", autoPlay: Boolean? = true, seekTo: Number? = null)

Load With Clip Id

Link copied to clipboard
fun loadWithClipJson(clipJson: String, initiator: String? = "external", autoPlay: Boolean? = true, seekTo: Number? = null)

Load With Clip JSON

Link copied to clipboard
fun loadWithClipListId(clipListId: String, initiator: String? = "external", autoPlay: Boolean? = true, seekTo: Number? = null)

Load With Clip List Id

Link copied to clipboard
fun loadWithClipListJson(clipListJson: String, initiator: String? = "external", autoPlay: Boolean? = true, seekTo: Number? = null)

Load With Clip List JSON

Link copied to clipboard
fun loadWithProjectId(projectId: String, initiator: String? = "external", autoPlay: Boolean? = true, seekTo: Number? = null)

Load With Project Id

Link copied to clipboard
fun loadWithProjectJson(projectJson: String, initiator: String? = "external", autoPlay: Boolean? = true, seekTo: Number? = null)

Load With Project JSON

Link copied to clipboard
fun pause()

Pause playback

Link copied to clipboard
fun play()

Start / Resume playback

Link copied to clipboard
fun seek(offsetInSeconds: Number)

Seek to time offset

Link copied to clipboard
fun setMuted(muted: Boolean, userAction: Boolean = false)

Set Muted state

Link copied to clipboard
fun setVolume(volume: Double, userAction: Boolean = false)

Set Volume