Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SourceConfig

The source object can either be part of the Config when passed into PlayerAPI.setup or can be directly passed into PlayerAPI.load when loading a (new) source into a set-up player instance.

Example:

source : {
  dash: 'http://path/to/mpd/file.mpd',
  hls: 'http://path/to/hls/playlist/file.m3u8',
  progressive: [{
    url: 'http://path/to/mp4',
    type: 'video/mp4',
    bitrate: 500000,
    label: 'Low'
  }, {
    url: 'http://path/to/another-mp4',
    type: 'video/mp4',
    bitrate: 1000000,
    label: 'Mid'
    preferred: true
  }, {
    url: 'http://path/to/another-mp4',
    type: 'video/mp4',
    bitrate: 2500000,
    label: 'High'
  }],
  poster: 'images/poster.jpg',
  tracks: [{
    file: 'http://path/to/thumbnail/vtt/file.vtt',
    kind: 'thumbnails'
  }],
  drm: {
    widevine: {
      LA_URL: 'https://mywidevine.licenseserver.com/'
    },
    playready: {
      LA_URL: 'https://myplayready.licenseserver.com/'
    }
  },
  labeling: {
    hls: {
      qualities: function(quality) {
        return quality.height + 'p';
      }
    },
    dash: {
      qualities: function(quality) {
        return quality.height + 'p';
      }
    }
  }
}

Hierarchy

  • SourceConfig

Index

Properties

Optional dash

dash: string

The URL to the MPEG-DASH manifest file (MPD, Media Presentation Description) for the video to play. The file has to be a valid MPD. MPEG-DASH content can easily and for free be generated using our encoding solution bitcodin.

Optional description

description: string

The description of the video source.

Optional drm

The DRM object should be included into the source object.

Optional hls

hls: string

An URL to an HLS playlist file (M3U8). The file has to be a valid M3U8 playlist. HLS content can easily and for free be generated using our encoding solution bitcodin.

Optional labeling

Labeling config for the different stream types.

Optional options

An object specifying advanced source specific options.

Optional poster

poster: string

The URL to a preview image displayed until the video starts. Make sure JavaScript and Flash are allowed to access it, i.e. CORS (for the HTML5/JavaScript player) must be enabled and a crossdomain.xml has to be there if it’s not the same server as the website.

Optional progressive

progressive: string | ProgressiveSourceConfig[]

An Array of objects to video files, used for progressive download as fallback. Is only used when all other methods fail. Multiple progressive files can be used, e.g. .mp4 and .webm files to support as many browsers as possible.

Optional smooth

smooth: string

An URL to a SmoothStreaming manifest file (xml or ismc). The file has to be a valid smooth streaming manifest file.

Optional title

title: string

The title of the video source.

Optional tracks

An array of objects with timed data.

Optional vr

Configuration for VR and omnidirectional (360°) video.

Generated using TypeDoc