All Projects → videojs → Videojs Contrib Dash

videojs / Videojs Contrib Dash

Licence: apache-2.0
Video.js plugin for supporting the MPEG-DASH playback through a video.js player

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Videojs Contrib Dash

Videojs Transcript
▶️📃 Interactive transcript plugin for video.js
Stars: ✭ 106 (-58.43%)
Mutual labels:  videojs
react-hook-videojs
Easy React integration of Video.js using hooks.
Stars: ✭ 37 (-85.49%)
Mutual labels:  videojs
videojs-landscape-fullscreen
Videojs on Mobile and/or React: Automatically Switch to Landscape on Fullscreen, and Fullscreen on Landscape
Stars: ✭ 72 (-71.76%)
Mutual labels:  videojs
Videojs Hotkeys
Adds more hotkey support to video.js
Stars: ✭ 155 (-39.22%)
Mutual labels:  videojs
videojs-react-enhanced
React.js wrapper component for Video.js player
Stars: ✭ 37 (-85.49%)
Mutual labels:  videojs
videojs-hlsjs
HLS playback plugin for videojs
Stars: ✭ 26 (-89.8%)
Mutual labels:  videojs
Larkplayer
🚀 A lightweight & flexible web player :)
Stars: ✭ 82 (-67.84%)
Mutual labels:  videojs
refinerycms-videojs
Manage videos in RefineryCMS using Video.js player for playback
Stars: ✭ 41 (-83.92%)
Mutual labels:  videojs
videojs-plus
An extension and skin for video.js
Stars: ✭ 49 (-80.78%)
Mutual labels:  videojs
generator-videojs-plugin
Yeoman generator for video.js plugins.
Stars: ✭ 71 (-72.16%)
Mutual labels:  videojs
Videojs Wavesurfer
video.js plugin that adds a navigable waveform for audio and video files
Stars: ✭ 242 (-5.1%)
Mutual labels:  videojs
h5-qj
全景h5,商场活动,在商场场景下寻找企业LOGO展示优惠活动。
Stars: ✭ 18 (-92.94%)
Mutual labels:  videojs
videojs-ima-player
video ad plugin for video.js
Stars: ✭ 12 (-95.29%)
Mutual labels:  videojs
Html5 Dash Hls Rtmp
🌻 HTML5播放器、M3U8直播/点播、RTMP直播、低延迟、推流/播流地址鉴权
Stars: ✭ 1,805 (+607.84%)
Mutual labels:  videojs
videojs-share
Share plugin for video.js
Stars: ✭ 24 (-90.59%)
Mutual labels:  videojs
Streaming Room
Streaming room in Node.js, rtmp, hsl, html5 videojs player
Stars: ✭ 106 (-58.43%)
Mutual labels:  videojs
videojs-logo
A video.js plugin to display a logo image on the player. If you think it's good, give me a star! ⭐
Stars: ✭ 19 (-92.55%)
Mutual labels:  videojs
videojs-airplay
Videojs Plugin that adds an airplay button to the control bar
Stars: ✭ 28 (-89.02%)
Mutual labels:  videojs
videojs-annotation-comments
A plugin for video.js to add support for timeline moment/range comments and annotations
Stars: ✭ 129 (-49.41%)
Mutual labels:  videojs
videojs-react-course-assistant
A note taking tool to use with (initially) youtube playlists aiming to be similar to Frontend Masters or Coursera
Stars: ✭ 13 (-94.9%)
Mutual labels:  videojs

video.js MPEG-DASH Source Handler

Build Status Greenkeeper badge Slack Status

NPM

A video.js source handler for supporting MPEG-DASH playback through a video.js player on browsers with support for Media Source Extensions.

Supported Dash.js version: 2.x

Maintenance Status: Stable

Drop by our slack channel (#playback) on the Video.js slack.

Table of Contents generated with DocToc

Getting Started

Download Dash.js and videojs-contrib-dash. Include them both in your web page along with video.js:

<video id=example-video width=600 height=300 class="video-js vjs-default-skin" controls></video>
<script src="video.js"></script>

<!-- Dash.js -->
<script src="dash.all.min.js"></script>

<!-- videojs-contrib-dash script -->
<script src="videojs-dash.min.js"></script>

<script>
var player = videojs('example-video');

player.ready(function() {
  player.src({
    src: 'https://example.com/dash.mpd',
    type: 'application/dash+xml'
  });

  player.play();
});
</script>

Checkout our live example if you're having trouble.

Protected Content

If the browser supports Encrypted Media Extensions and includes a Content Decryption Module for one of the protection schemes in the dash manifest, video.js will be able to playback protected content.

For most protection schemes, the license server information (URL & init data) is included inside the manifest. The notable exception to this is Widevine-Modular (WV). To playback WV content, you must provide the URL to a Widevine license server proxy.

For this purpose, videojs-contrib-dash adds support for a "keySystemOptions" array to the object when using the player.src() function:

player.src({
  src: 'http://example.com/my/manifest.mpd',
  type: 'application/dash+xml',
  keySystemOptions: [
    {
      name: 'com.widevine.alpha',
      options: {
        serverURL: 'http://m.widevine.com/proxy'
      }
    }
  ]
});

You may also manipulate the source object by registering a function to the updatesource hook. Your function should take a source object as an argument and should return a source object.

var updateSourceData = function(source) {
  source.keySystemOptions = [{
    name: 'com.widevine.alpha',
    options: {
      serverURL:'https://example.com/anotherlicense'
    }
  }];
  return source;
};

videojs.Html5DashJS.hook('updatesource', updateSourceData);

Captions

As of [email protected], native captions are no longer supported on any browser besides Safari. Dash can handle captions referenced embedded vtt files, embedded captions in the manifest, and with fragmented text streaming. It is impossible to use video.js captions when dash.js is using fragmented text captions, so the user must disable native captions when using videojs-contrib-dash.

videojs('example-video', {
  html5: {
    nativeCaptions: false
  }
});

A warning will be logged if this setting is not applied.

Multi-Language Labels

When labels in a playlist file are in multiple languages, the 2-character language code should be used if it exists; this allows the player to auto-select the appropriate label.

Passing options to Dash.js

It is possible to pass options to Dash.js during initialiation of video.js. All methods in the Dash.js#MediaPlayer docs are supported.

To set these options, pass the exact function name with a scalar or array value to call the correpsonding MediaPlayer function.

For example:

var player = videojs('example-video', {
  html5: {
    dash: {
      setLimitBitrateByPortal: true,
      setMaxAllowedBitrateFor: ['video', 2000]
    }
  }
});

A warning will be logged if the configuration property is not found.

Deprecation Warning

Previously the set prefix was expected to be omitted. This has been deprecated and will be removed in a future version.

Initialization Hook

Sometimes you may need to extend Dash.js, or have access to the Dash.js MediaPlayer before it is initialized. For these cases, you can register a function to the beforeinitialize hook, which will be called just before the Dash.js MediaPlayer is initialized.

Your function should have two parameters:

  1. The video.js Player instance
  2. The Dash.js MediaPlayer instance
var myCustomCallback = function(player, mediaPlayer) {
  // Log MediaPlayer messages through video.js
  if (videojs && videojs.log) {
    mediaPlayer.getDebug().setLogToBrowserConsole(false);
    mediaPlayer.on('log', function(event) {
      videojs.log(event.message);
    });
  }
};

videojs.Html5DashJS.hook('beforeinitialize', myCustomCallback);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].