- KalturaPlayers
- KPPlaylistOptions
- KPPlaylistCountdownOptions
- KPPlaylistConfigObject
- KPPlaylistObject
- KPPlaylistItemConfigObject
- BaseRemotePlayer
- Parameters
- loadMedia
- setMedia
- getMediaInfo
- configure
- ready
- load
- play
- pause
- reset
- destroy
- isLive
- isDvr
- seekToLiveEdge
- getStartTimeOfDvrWindow
- getTracks
- getActiveTracks
- selectTrack
- hideTextTrack
- enableAdaptiveBitrate
- isAdaptiveBitrateEnabled
- setTextDisplaySettings
- startCasting
- stopCasting
- isCasting
- isCastAvailable
- getCastSession
- isVr
- toggleVrStereoMode
- isInVrStereoMode
- ads
- textStyle
- textStyle
- buffered
- currentTime
- currentTime
- duration
- volume
- volume
- paused
- ended
- seeking
- muted
- muted
- src
- poster
- playbackRate
- playbackRate
- engineType
- streamType
- type
- config
- defaultConfig
- Type
- isSupported
- CastEventType
- PlayerSnapshot
- RemoteControl
- RemotePayload
- RemoteConnectedPayload
- RemoteDisconnectedPayload
- RemoteAvailablePayload
- RemotePlayerUI
- IRemotePlayer
- textStyle
- muted
- playbackRate
- volume
- currentTime
- buffered
- duration
- paused
- ended
- seeking
- src
- poster
- engineType
- streamType
- type
- ads
- config
- addEventListener
- removeEventListener
- dispatchEvent
- loadMedia
- setMedia
- getMediaInfo
- configure
- ready
- load
- play
- pause
- reset
- destroy
- isLive
- isDvr
- seekToLiveEdge
- getStartTimeOfDvrWindow
- getTracks
- getActiveTracks
- selectTrack
- hideTextTrack
- enableAdaptiveBitrate
- isAdaptiveBitrateEnabled
- setTextDisplaySettings
- startCasting
- stopCasting
- isCasting
- isCastAvailable
- getCastSession
- isVr
- toggleVrStereoMode
- isInVrStereoMode
- Type
- isSupported
- RemoteSession
- PlaylistEventType
- PlaylistItem
- PlaylistManager
- maybeSetStreamPriority
- hasYoutubeSource
- loadPlaylist
- loadPlaylistByEntryList
- configure
- playlist
- getPlayers
- getPlayer
a map of player instances by player ids
Type: Object<string, KalturaPlayer>
Type: Object
autoContinue
boolean? Determines whether to continue to the next item automatically.loop
boolean? Determines whether to play the playlist in a loop. When selected, the playlist will play automatically even if autoContinue is set to false.
Type: Object
timeToShow
number? Shows when the countdown is scheduled to appear (by default, this is towards the end).duration
number? Shows for how long the countdown will appear.showing
boolean? Determines whether to show the countdown.
Type: Object
options
KPPlaylistOptions Sets the playlist options.countdown
KPPlaylistCountdownOptions Configures the playlist countdown.items
Array<PlaylistItem> Lists the available playlist items.
Type: Object
id
string This is playlist's ID.metadata
ProviderPlaylistMetadataObject This is the playlist metadata.options
KPPlaylistOptions These are the playlist options.countdown
KPPlaylistCountdownOptions This is the playlist countdown configuration.items
Array<PlaylistItem> These are the playlist items.
Type: Object
countdown
KPPlaylistCountdownOptions? Countdown options
Extends FakeEventTarget
Basic remote player. Implements the Kaltura Player playback, ads, tracks,vr and cast APIs. Remote players should extend this class and implement the needed API.
name
string Remote player name.config
Object Cast configuration.remoteControl
RemoteControl Remote control.
Loads a media to the receiver application.
mediaInfo
Object The entry media info.
Returns Promise<void> Promise to indicate load succeed or failed.
Sets a media to the remote player..
mediaConfig
Object Media configuration to set.
Returns void
Gets the media Info.
Returns Object? The media info.
Configure the remote player
config
Object Configuration to set. (optional, default{}
)
Returns void
The remote player readiness.
Returns Promise<any> Promise which resolved when the remote player is ready.
Load the remote player.
Returns void
Play/resume the remote player.
Returns void
Pause the remote player.
Returns void
Reset the remote player.
Returns void
Destroy the remote player.
Returns void
BaseRemotePlayer.prototype.isLive(); // false
Returns boolean Whether the current playback is a live playback.
BaseRemotePlayer.prototype.isDvr(); // false
Returns boolean Whether the current live playback has DVR window. In case of non-live playback will return false.
Seeks to the live edge.
Returns void
BaseRemotePlayer.prototype.getStartTimeOfDvrWindow(); // 0
Returns number The start time of the DVR window.
type
string? Track type.
BaseRemotePlayer.prototype.getTracks(); // []
Returns Array<Track> The remote player tracks.
BaseRemotePlayer.prototype.getTracks(); // {audio: undefined, video: undefined, text: undefined}
Returns Object The remote player active tracks.
Select a certain track to be active.
track
Track The track to activate.
Returns void
Hides the active text track.
Returns void
Enables automatic adaptive bitrate switching.
Returns void
BaseRemotePlayer.prototype.isAdaptiveBitrateEnabled(); // true
Returns boolean Whether adaptive bitrate is enabled.
Sets the text display settings.
settings
Object Text settings.
Returns void
Start casting.
Returns Promise<any> A promise to indicate session is starting, or failed
Stops the current cast session.
Returns void
BaseRemotePlayer.prototype.isCasting(); // true
Returns boolean Whether casting is currently active.
BaseRemotePlayer.prototype.isCastAvailable(); // true
Returns boolean Whether casting is available.
Gets the current remote session.
BaseRemotePlayer.prototype.getCastSession(); // new RemoteSession('', '')
Returns RemoteSession The remote session.
BaseRemotePlayer.prototype.isVr(); // false
Returns boolean Whether the current media is of VR type (360 content).
Toggles VR mode on the current content.
Returns void
BaseRemotePlayer.prototype.isInVrStereoMode(); // false
Returns boolean Whether the current content displayed in VR mode.
The remote player ads controller.
Type: Object?
BaseRemotePlayer.prototype.ads; // null
Returns Object?
Setter.
style
TextStyle The text style to set.
Returns void
Getter.
BaseRemotePlayer.prototype.textStyle; // new TextStyle()
Returns TextStyle The current text style.
Gets the first buffered range of the remote player.
BaseRemotePlayer.prototype.buffered; // []
Returns Array<any> First buffered range in seconds.
Setter.
to
number The number to set in seconds.
Returns void
Getter.
BaseRemotePlayer.prototype.currentTime; // 0
Returns number The current time in seconds.
BaseRemotePlayer.prototype.duration; // 0
Returns number The duration in seconds.
Setter.
vol
number The volume to set in the range of 0-1.
Returns void
Getter.
BaseRemotePlayer.prototype.volume; // 1
Returns number The current volume in the range of 0-1.
BaseRemotePlayer.prototype.paused; // false
Returns boolean Whether the cast player is in paused state.
BaseRemotePlayer.prototype.ended; // false
Returns boolean Whether the cast player is in ended state.
BaseRemotePlayer.prototype.seeking; // false
Returns boolean Whether the cast player is in seeking state.
Setter.
mute
boolean The mute value to set.
Returns void
Getter.
BaseRemotePlayer.prototype.muted; // false
Returns boolean The muted state.
BaseRemotePlayer.prototype.src; // ''
Returns string The current playing source url.
BaseRemotePlayer.prototype.poster; // ''
Returns string The current poster url.
Setter.
rate
number The playback rate to set.
Returns void
BaseRemotePlayer.prototype.playbackRate; // 1
Returns string The current playback rate.
BaseRemotePlayer.prototype.engineType; // ''
Returns string The active engine type.
BaseRemotePlayer.prototype.streamType; // ''
Returns string The active stream type.
BaseRemotePlayer.prototype.type; // BaseRemotePlayer.Type
Returns string The remote player type.
Returns KPOptionsObject The runtime remote player config.
Default configuration of the remote player.
Type: Object
BaseRemotePlayer.defaultConfig; // {}
Remote player type.
Type: string
BaseRemotePlayer.Type; // 'BaseRemotePlayer'
BaseRemotePlayer.isSupported(); // true
Returns boolean Whether the remote player is supported in the current environment.
Type: Object
// Events lifecycle
1. CAST_AVAILABLE
2. CAST_SESSION_STARTING
3. CAST_SESSION_STARTED || CAST_SESSION_START_FAILED -> X
4. CAST_SESSION_ENDING
5. CAST_SESSION_ENDED
// How to use
player.addEventListener(KalturaPlayer.cast.CastEventType.CAST_SESSION_STARTED, e => {
console.log(e.session);
};
player
KalturaPlayer The Kaltura player.
Type: TextStyle
Type: Object
Type: Object
player
KalturaPlayer The Kaltura player.
Gets the player snapshot.
Type: Function
Returns PlayerSnapshot player snapshot.
Gets the UI wrapper.
Type: Function
Returns UIWrapper The UI wrapper.
On remote device disconnected handler.
Type: Function
payload
RemoteDisconnectedPayload disconnected payload.
Returns void
On remote device connected handler.
Type: Function
payload
RemoteConnectedPayload connected payload.
Returns void
On remote device available handler.
Type: Function
payload
RemoteAvailablePayload available payload.
Returns void
On remote device connecting handler.
Type: Function
Returns void
On remote device disconnecting handler.
Type: Function
Returns void
On remote device connect failed handler.
Type: Function
Returns void
player
BaseRemotePlayer The active remote player.
The active remote player.
Type: BaseRemotePlayer
Returns BaseRemotePlayer
Extends RemotePayload
player
BaseRemotePlayer The active remote player.session
RemoteSession The remote session.ui
RemotePlayerUI? Optional remote player UI preset.
Remote player UI preset.
Type: RemotePlayerUI?
Returns RemotePlayerUI?
Remote session.
Type: RemoteSession
Returns RemoteSession?
Extends RemotePayload
player
BaseRemotePlayer The active remote player.snapshot
PlayerSnapshot The remote player snapshot.
Remote player snapshot.
Type: PlayerSnapshot
Returns PlayerSnapshot
Extends RemotePayload
player
BaseRemotePlayer The active remote player.available
boolean Remote player availability.
Remote player availability.
Type: boolean
Returns boolean
Playback UI of the remote player.
props
Object UI creation parameters.
Returns React$Element<any> Component.
Idle UI of the remote player.
props
Object UI creation parameters.
Returns React$Element<any> Component.
Idle UI of the remote player.
props
Object UI creation parameters.
Returns React$Element<any> Component.
Live UI of the remote player.
props
Object UI creation parameters.
Returns React$Element<any> Component.
Error UI of the remote player.
props
Object UI creation parameters.
Returns React$Element<any> Component.
UI presets.
Type: Array<UIPreset>
Returns Array<UIPreset>
Type: TextStyle
Type: boolean
Type: number
Type: number
Type: number
Type: number
Type: number
Type: boolean
Type: boolean
Type: boolean
Type: string
Type: string
Type: string
Type: string
Type: string
Type: Object
Type: KPOptionsObject
event
FakeEvent
mediaInfo
Object
mediaConfig
Object
Returns Object
config
Object
Returns Promise<any>
Returns boolean
Returns boolean
Returns number
type
string?
Returns Array<Track>
Returns Object
track
Track
Returns boolean
settings
Object
Returns boolean
Returns boolean
Returns RemoteSession
Returns boolean
Returns boolean
Type: string
Returns boolean
id
string Session ID.friendlyName
string Receiver friendly name.resuming
boolean? Whether the session is resuming.
Receiver friendly name.
Type: string
Returns string
Session ID.
Type: string
Returns string
Whether the session is resuming.
Type: boolean?
Returns boolean?
Type: Object
// Events lifecycle
1. PLAYLIST_LOADED
2. PLAYLIST_ITEM_CHANGED (multiple)
3. PLAYLIST_ENDED
// How to use
player.addEventListener(KalturaPlayer.playlist.PlaylistEventType.PLAYLIST_LOADED, e => {
console.log(e.payload.playlist.metadata.name);
};
sources
ProviderMediaConfigSourcesObject? The item sourcesconfig
KPPlaylistItemConfigObject? The item config
Update the playlist item sources
sourcesObject
ProviderMediaConfigSourcesObject The sources
Returns void
Playlist item sources
Type: ProviderMediaConfigSourcesObject?
Returns ProviderMediaConfigSourcesObject?
Playlist item config
Type: KPPlaylistItemConfigObject?
Returns KPPlaylistItemConfigObject?
Returns boolean = Whether the playlist item has sources to play
player
KalturaPlayer The player instanceoptions
KPOptionsObject The player config object
Config the playlist
config
KPPlaylistObject? The playlist configentryList
ProviderEntryListObject? Entry list
Returns void
Load a playlist
playlistData
KPPlaylistObject The playlist dataplaylistConfig
KPPlaylistConfigObject? The playlist configentryList
ProviderEntryListObject? Entry list
Returns void
Reset the playlist
Returns void
Play the next item
Returns void
Play the previous item
Returns void
Play a specific item
index
number The index of the item to play
Returns void
Playlist items
Type: Array<PlaylistItem>
Returns Array<PlaylistItem>
Next item
Type: PlaylistItem?
Returns PlaylistItem?
Previous item
Type: PlaylistItem?
Returns PlaylistItem?
Playlist id
Type: string
Returns string
Playlist metadata
Type: ProviderPlaylistMetadataObject
Returns ProviderPlaylistMetadataObject
Playlist poster
Type: string?
Returns string?
Playlist countdown
Type: KPPlaylistCountdownOptions
Returns KPPlaylistCountdownOptions
Playlist options
Type: KPPlaylistOptions
Returns KPPlaylistOptions
set stream priority according to playerConfig
player
Player playerplayerConfig
PartialKPOptionsObject player config
Returns void
returns true if sources contain youtube video source
sources
PKSourcesConfigObject thr sources object
Returns boolean true if sources contain youtube source
Loads a playlist by id.
playlistInfo
ProviderPlaylistInfoObject The playlist info.playlistConfig
KPPlaylistConfigObject? The playlist config.
kalturaPlayer.loadPlaylist({playlistId: '123456'}, {options: {autoContinue: false}});
Returns Promise<ProviderPlaylistObject> The playlist data from the provider.
Loads a playlist by entry list.
entryList
ProviderEntryListObject The playlist info.playlistConfig
KPPlaylistConfigObject? The playlist config.
kalturaPlayer.loadPlaylistByEntryList({entries: [{entryId: '01234'}, {entryId: '56789'}]}, {options: {autoContinue: false}});
Returns Promise<ProviderPlaylistObject> The playlist data from the provider.
Config the player.
config
Object The player config. (optional, default{}
)
kalturaPlayer.configure({playback: {autoplay: true}});
Returns void
The playlist controller.
Type: PlaylistManager
KalturaPlayer.playlist.playNext();
Returns PlaylistManager
get all instantiated players
Returns KalturaPlayers map of player ids and their respective instantiated player
get a player instance by id
id
string the player ID
Returns (KalturaPlayer | null) the player if found by the supplied ID or null if key doesn't exist