Media Player Integration
API Reference

Player Methods

13min

Please note: This documentation is currently being revised. It may therefore be incomplete in some parts.

closePlayer()

Closes the player.

In the case of Embedded Media Player instances in Picture-in-Picture, cover or fullscreen mode, the player reverts back to its embedded location.

This action pauses media playback and resets the seek position to 0.

Usage Example


maximizePlayer()

By invoking this method, Embedded Media Players or players in Picture-in-Picture Mode transition to cover mode.

Usage Example


minimizePlayer()

By invoking this method, Embedded Media Players or players in cover or fullscreen mode transition to Picture-in-Picture Mode.

Usage Example


off()

Deregisters a previously registered event listener, preventing it from receiving further events.

TypeScript


Calling off() with arguments that do not identify any currently registered event listener has no effect.

on()

Registers an event listener to capture any event from the list of Player Events.

Usage Example


open()

When invoking this method, the main player is activated in cover mode, displaying either the playlists or media content specified by the input argument that were previously defined.

Name

Description

input

Optional. The input object, which determines the type of media to be displayed. Currently, types of PlaylistItem are the sole options available.

options

Optional. The Player Options to apply when opening the player.

Please note: If specified, the player options do not overwrite the player's configuration as defined during creation. To update the player's configuration, please use updateConfiguration().

Schema
Usage Example
TypeScript


removeAllListeners()

Proceed with care when employing this functionality, as it removes all event listeners that have been registered using player.on().

Usage Example


requestFullscreen()

By invoking this method, the player is switched to fullscreen mode.

If fullscreen mode is not allowed/supported, the player is switched to cover mode.

Schema
Usage Example
Schema


updateConfiguration()

By invoking this method, the player configuration options get updated.

Parameter

Description

options

Player Options object.

Schema
Usage Example
Schema


updatePlaylists()

By invoking this method, the playlists for the player to render get updated.

Parameter

Description

playlists

Array of Playlist objects to be rendered by the player.

The player requires a distinct media item description depending on the type of media. Currently, story is the sole supported media item type.

For a comprehensive description of the playlist schema, refer to its definition provided in the tab view below.

Schema
Usage Example
Schema




Updated 25 Mar 2024
Doc contributor
Did this page help you?