Readonly
adaptationThe adaptation API namespace.
Readonly
adsThe advertising API namespace.
Readonly
bufferThe buffer API namespace.
Readonly
drmThe DRM API namespace.
Readonly
exportsExports from the player core as a convenience fallback for non-modular code. It is recommended to use ES6 imports instead.
Usage:
import { Player } from 'bitmovin-player';
const player = new Player(...);
player.on(player.exports.Event.Loaded, () => ...);
Recommended approach:
import { Player, Event } from 'bitmovin-player';
const player = new Player(...);
player.on(Event.Loaded, () => ...);
Readonly
lowlatencyThe low latency API namespace.
Readonly
manifestThe manifest API namespace.
Readonly
subtitlesThe subtitles API namespace.
Readonly
versionThe version number of the player.
Readonly
vrThe VR API namespace.
Removes all existing query parameters as specified in setQueryParameters or TweaksConfig.query_parameters.
Returns the currently selected audio quality. One of the elements of getAvailableAudioQualities.
Returns the config object of the current player instance.
Optional
mergedConfig: booleantrue to return the config expanded with all default values, false to return the user config passed to the player's constructor.
The current user or merged player config.
Creates a snapshot of the current video frame. Snapshots cannot be taken from DRM protected content.
Optional
type: stringThe type of image snapshot to capture. Allowed values are 'image/jpeg' and 'image/webp'.
Optional
quality: numberA number between 0 and 1 indicating the image quality.
Gets the source that was loaded via a successfully finished load call or null
if no source is loaded
or a load is in progress.
the loaded source or null
if no source is loaded
Returns an array of objects denoting a player and streaming technology combination. By default, this returns the combinations supported on the current platform (SupportedTechnologyMode.Platform), ordered by descending priority which will be used to play a stream.
Optional
mode: SupportedTechnologyModethe mode by which the supported technologies are determined
Returns a thumbnail image for a certain time or null if there is no thumbnail available. Requires a configured thumbnails track in SourceConfig.thumbnailTrack.
the media time for which the thumbnail should be returned
A thumbnail if a thumbnails track is configured and a thumbnail exists for the specified time, else null
Returns the currently selected video quality, if the user manually selected one. In this case it returns one of the elements of getAvailableVideoQualities.
In case the user did not select a video quality it returns auto
.
Tests if a particular ViewMode is available for selection with setViewMode.
the view mode to test
true
if the tested view mode is available, else false
Sets a new video source and returns a promise which resolves to the player.
The source the player should load.
Optional
forceTechnology: stringForces the player to use the specified playback and streaming technology. The specified technologies have to be separated by a period (e.g. 'html5.hls'). A list of valid combinations can be retrieved by calling getSupportedTech.
Optional
disableSeeking: booleanIf set, seeking will be disabled
Subscribes an event handler to a player event. This method was called addEventHandler
in previous
player versions.
The type of event to subscribe to.
The event callback handler that will be called when the event fires.
Starts playback or resumes after being paused. No need to call it if the player is setup with autoplay attribute (PlaybackConfig.autoplay). Has no effect if the player is already playing.
Optional
issuer: stringThe issuer of the API call that will be passed to events triggered by this call
a Promise which resolves as soon as playback has actually started. This promise can reject if play is prohibited by the browser (a missing user interaction for example)
Seeks to the given playback time specified by the parameter time in seconds. Must not be greater than the total duration of the video. Has no effect when watching a live stream as seeking is not possible.
The time to seek to
Optional
issuer: stringThe issuer of the API call that will be passed to events triggered by this call
Modifies the current aspect ratio of the player. Can be used to override the StyleConfig.aspectratio
that is optionally passed during player initialization. Has no effect if the player has also been configured
to have a fixed StyleConfig.width and StyleConfig.height: in general, no more than two options
among width
, height
, and aspectratio
should be provided to the player.
The desired aspect ratio for the player. It can be a string (e.g. '16:9' or '16/9'), or a number (e.g 1.6 for 16:10).
Sets the audio track to the ID specified by trackID. Available tracks can be retrieved with getAvailableAudio.
The ID of the audio track to activate
Manually sets the audio stream to a fixed quality, identified by ID. Has to be an ID defined in the MPD or the keyword 'auto'. Auto resets to dynamic switching. A list with valid IDs can be retrieved by calling getAvailableAudioQualities.
The ID of the desired audio quality or 'auto' for dynamic switching
Sets authentication data which is sent along with the licensing call. Can be used to add more information for a 3rd party licensing backend. The data be any type or object as needed by the 3rd party licensing backend.
Data which should be sent with the licensing call
Sets a poster image. Will be displayed immediately, even if a video stream is playing.
The URL to the poster image
Flag to set the poster image persistent so it is also displayed during playback (useful for audio-only playback)
Adds GET parameters to all request URLs (e.g. manifest, media segments, subtitle files, …). The queryParameters should be an object with key value pairs, where the keys are used as parameter name and the values as parameter values.
The list of query parameter key/value pairs
Passes an HTML video element to the player, which should be used in case of Html5 or Native playback. Needs to be called before load.
The HTML video element to use
Manually sets the video stream to a fixed quality, identified by ID. Has to be an ID defined in the MPD or the keyword 'auto'. Auto resets to dynamic switching. A list with valid IDs can be retrieved by calling getAvailableVideoQualities.
ID defined in the MPD or 'auto'
Sets the player to a particular ViewMode. Will only work if the selected view mode is available and
isViewModeAvailable returns true
, else this call will be ignored. If successful, a
PlayerEvent.ViewModeChanged will be fired.
the view mode to switch the player into
Optional
options: ViewModeOptionsadditional optional parameters for view modes
Sets the player’s volume in the range of 0 (silent) to 100 (max volume). Unmutes a muted player.
The volume to set between 0 and 100
Optional
issuer: stringThe issuer of the API call that will be passed to events triggered by this call
Shifts the time to the given offset in seconds from the live edge. Has to be within getMaxTimeShift (which is a negative value) and 0. Only works in live streams. [new in v4.3]: The offset can be positive and is then interpreted as a UNIX timestamp in seconds. The value has to be within the timeShift window as specified by getMaxTimeShift.
The offset to timeshift to
Optional
issuer: stringThe issuer of the API call that will be passed to events triggered by this call
Extended interface of the Player for use in the UI.