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'
Placeholder type for the Bitmovin Player UI's UIConfig. https://github.com/bitmovin/bitmovin-player-ui
Generated using TypeDoc
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);
2) Whe the player is loaded from the CDN via RequireJS:
requirejs(['<cdn_url>'], (bitmovinplayer) => { const player = new bitmovinplayer.Player(container, config); });
3) When the player is imported from NPM:
import { Player } from 'bitmovin-player'; const player = new Player(container, config);
Example configuration:
{ key: 'INSERTPROVIDEDKEYHERE', 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: 'http://your.ad.provider/manifest.xml', type: 'vast', }, }], } }
Example source:
player.load({ 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' } } });