The entry point to the player configuration is the PlayerConfig interface, which is passed into the constructor of the player. There are several ways to do this:

  1. When the full player is loaded from the CDN via <source> tag:
const player = new bitmovin.player.Player(container, config);
  1. Whe the player is loaded from the CDN via|RequireJS:
requirejs(['<cdn_url>'], (bitmovinplayer) => {
const player = new bitmovinplayer.Player(container, config);
  1. When the player is imported from NPM:
import { Player } from 'bitmovin-player';
const player = new Player(container, config);

Example configuration:

playback: {
autoplay: false,
muted: false
style: {
width: '90%',
aspectratio: '16/9',
events: {
[PlayerEvent.SourceLoaded]: myFunc,
[PlayerEvent.Play]: () => {
// do some awesome stuff
[PlayerEvent.Error]: myErrorHandlingFunc
tweaks: {
startup_threshold?: 5;
advertising: {
adBreaks: [{
tag: {
url: '',
type: 'vast',

Example source:

dash: 'https://path/to/mpd/file.mpd',
hls: 'https://path/to/hls/playlist/file.m3u8',
smooth: 'https://path/to/manifest/file/Manifest',
progressive: [{
url: 'http://path/to/mp4',
type: 'video/mp4'
}, {
url: 'http://path/to/webm',
type: 'video/webm'
poster: 'images/poster.jpg',
drm: {
widevine: {
LA_URL: ''
playready: {
LA_URL: ''
access: {
LA_URL: '',
primetime: {
LA_URL: ''
fairplay: {
LA_URL: '',
certificateURL: ''
interface PlayerConfig {
    adaptation?: AdaptationPlatformConfig;
    advertising?: AdvertisingConfig;
    analytics?: false | AnalyticsConfig;
    buffer?: BufferConfig;
    cast?: CastConfig;
    events?: EventConfig;
    key: string;
    licensing?: LicensingConfig;
    live?: LiveConfig;
    location?: LocationConfig;
    logs?: LogsConfig;
    network?: NetworkConfig;
    playback?: PlaybackConfig;
    remotecontrol?: GoogleCastRemoteControlConfig | WebSocketRemoteControlConfig;
    storage?: StorageConfig;
    style?: StyleConfig;
    tweaks?: TweaksConfig;
    ui?: any;


Configures the adaptation logic.

advertising?: AdvertisingConfig

Allows you to define which ads you want to display and when you want to display them. In order to play ads on your website, you need to specify an ad config.

analytics?: false | AnalyticsConfig

Bundled Bitmovin Analytics Configuration used to specify metadata and other related info. Can also be used to completely disable Analytics by setting this to false in case the Analytics module is loaded, but Analytics is not desired.

buffer?: BufferConfig

Configures various buffer settings.

cast?: CastConfig

Google Cast configuration.


Use remotecontrol with GoogleCastRemoteControlConfig instead.

events?: EventConfig

A list of callback functions for events. Events can also be dynamically added and removed through on and off.


events: {
[PlayerEvent.SourceLoaded]: data => {
console.log('version: ' + player.getVersion() + ', SourceLoaded Event data: ', data);
[PlayerEvent.Play]: data => {
// do awesome stuff
[PlayerEvent.Error]: data => {
console.error('An error occurred:', data);
key: string

Mandatory. A personal key can be found in the bitmovin portal and should be specified here. Do not forget to enter all your domains (subdomains are included) in your account.

licensing?: LicensingConfig

Licensing configuration.

live?: LiveConfig

Provide parameters specific to live streams

location?: LocationConfig

This can be used to specify custom paths to bitmovinplayer-core.min.js, and bitmovinplayer-core.min.css instead of having all files in the same folder.

logs?: LogsConfig

Can be use to fine tune logging of the player.

network?: NetworkConfig

Network configuration.

playback?: PlaybackConfig

Playback config settings.

Remote control configuration (e.g. Chromecast)



storage?: StorageConfig

Allows configuration of the player's access to the Web Storage API.



style?: StyleConfig

UX/UI config settings.

tweaks?: TweaksConfig

Tweaks. Use these values only if you know what you are doing.

ui?: any

UI configuration that is passed to the Bitmovin Player UI if the UI module is loaded. Can also be used to disable the UI in case the UI module is loaded but the UI is not desired.