Skip to content

This is an example of how to use the Google Shaka player with vudrm

Notifications You must be signed in to change notification settings

Vualto/vuplay-shaka

Repository files navigation

Studio DRM Shaka

code style: prettier

Description

This repo will demonstrate how to use Studio DRM with Google's Shaka Player. If you have any questions please contact support@jwplayer.com

This repo is currently targeted at version 4.5.0 of the shaka player.

Instructions

Install dependencies

  1. Install npm
  2. Install the grunt-cli: npm install -g grunt-cli
  3. Clone the repo: git clone git@github.com:Vualto/vuplay-shaka.git
  4. Navigate to the project's root folder: cd studiodrm-shaka
  5. Install the dependencies: npm install

Set required variables

  1. Open the repo in your favourite javascript editor.
  2. In the file studiodrm.js replace <mpeg-dash-stream-url> with your MPEG-DASH stream url.
  3. In the file studiodrm.js replace <hls-stream-url> with your HLS stream url.
  4. In the file studiodrm.js replace <studiodrm-token> with a Studio DRM token. Details can be found in the Studio DRM Token v2 documentation
  5. In the file studiodrm.js replace <fairplay-certificate-url> with the link to your Fairplay certifcate.

Build and run the code

This repo contains a development node.js server. This server is not suitable for production.

  1. Add the host shaka.studiodrm.local to your local machine's hosts file.
  2. Run grunt serve.
  3. Load a supported browser and go to https://shaka.studiodrm.local:14703

In order to allow DRM encrypted playback in chrome (https://goo.gl/EEhZqT), SSL has been enabled for the demo. You will get a warning about an invalid cert NET::ERR_CERT_AUTHORITY_INVALID but this can safely be ignored.

NB: If you wish to use the uncompiled version of shaka run grunt serve --debug

Browser support

The browser must support encrypted media extensions. Currently this includes the latest versions of Chrome, Firefox, Internet Explorer 11 and Edge. For a complete breakdown of supported media extensions please contact support@jwplayer.com

Useful links

Studio DRM

mpeg-DASH

HLS

Encrpyted media extensions

Shaka

Build tools