Options
All
  • Public
  • Public/Protected
  • All
Menu

External module PlayerConfigAPI

The entry point to the player configuration is the Config interface, which is passed into PlayerAPI.setup to setup a a player instance.

Example configuration:

{
  key: 'INSERTPROVIDEDKEYHERE',
  playback: {
    autoplay: false,
    muted: false
  },
  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: 'https://mywidevine.licenseserver.com/'
      },
      playready: {
        LA_URL: 'https://myplayready.licenseserver.com/'
      },
      access: {
        LA_URL: 'https://myaccess.licenseserver.com/',
        authToken: 'INSERT-YOUR-BASE64-ENCODED-AUTH-TOKEN'
      },
      primetime: {
        LA_URL: 'https://myprimetime.licenseserver.com/'
      },
      fairplay: {
        LA_URL: 'https://fairplay.licenseserver.com/',
        certificateURL: 'https://fairplay.licenseserver.com/certificate-url'
      }
    }
  },
  style: {
    width: '90%',
    aspectratio: '16/9',
    ux: true
  },
  events: {
    onReady: myFunc,
    onPlay: function() {
      // do some awesome stuff
    },
    onError: myErrorHandlingFunc
  },
  tweaks: {
    max_buffer_level: 20
  },
  advertising: {
    client: 'vast',
    tag: 'http://your.ad.provider/manifest.xml'
  }
}
module

PlayerConfigAPI

Index

Type aliases

AdClient

AdClient: "vast" | "vpaid" | "ima"

Allowed types of the AdvertisingConfig.client and used in the scheduleAd API call. The ima client can also be used for VMAP.

Bitrate

Bitrate: number | string

Specifies a bitrate either as number in bits per second (bps) or as a string with the unit, such as mbps (megabits per second), kbps (kilobits per second) or bps (bits per second). Example: '5000kbps'

HttpRequestBody

HttpRequestBody: ArrayBuffer | ArrayBufferView | Blob | FormData | string | Document | URLSearchParams

Allowed types of the HttpRequest.body

HttpResponseBody

HttpResponseBody: string | ArrayBuffer | Blob | Object | Document

Possible types of HttpResponse.body

Generated using TypeDoc