new MultiView()
Members
(static, constant) HisPlayerEvent :string
Multiview HISPlayer event types.
Properties:
Name | Value | Type | Description |
---|---|---|---|
LICENSE_ERROR |
licenseError | string |
(static, constant) PlayerType :string
Properties:
Name | Value | Type | Description |
---|---|---|---|
WEBRTC |
webrtc | string | |
WEBRTS |
webrts | string | |
DEFAULT |
default | string |
Methods
addConfig(config, typeopt) → {number}
Add config for the playback and the player controllers
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
config |
Config | WebRTCConfig | WebRTSConfig | The playback configuration | ||
type |
PlayerType |
<optional> |
PlayerType.DEFAULT | The player type. It can be 'default' (HISPlayer), 'webrtc' (WebRTCPlayer) or 'webrts' (WebRTSPlayer). |
addEventListener(type, listener)
Add an event listener to this object.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The event type to listen for. |
listener |
EventListener | function | The callback or listener object to invoke. |
(async) destroy()
Destroy the MultiView instance.
getPlayer(playerId) → {HisPlayer|WebRTCPlayer|WebRTSPlayer}
Get a player from MultiView instance.
Parameters:
Name | Type | Description |
---|---|---|
playerId |
number | The playerId returned by addConfig |
getPlayerType(playerId) → {PlayerType|null}
Get the type of a player.
Parameters:
Name | Type | Description |
---|---|---|
playerId |
number | The playerId returned by addConfig |
init(licenseKey) → (nullable) {Promise}
Create the player for all configs.
Parameters:
Name | Type | Description |
---|---|---|
licenseKey |
string | HISPlayer license key to validate the playback. |
initialize(licenseKey) → (nullable) {Promise}
Create the player for all configs.
Parameters:
Name | Type | Description |
---|---|---|
licenseKey |
string | HISPlayer license key to validate the playback. |
- Deprecated:
- Yes
listenToAllEvents(listener)
Add an event listener to this object that is invoked for all events types the object fires.
Parameters:
Name | Type | Description |
---|---|---|
listener |
EventListener | function | The callback or listener object to invoke. |
removeEventListener(type, listener)
Remove an event listener from this object.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The event type for which you wish to remove a listener. |
listener |
EventListener | function | The callback or listener object to remove. |