From 050c3007d83e6501ec1e47d3b55cd3082be0f846 Mon Sep 17 00:00:00 2001 From: Joe Forbes Date: Wed, 29 Aug 2018 14:44:40 -0700 Subject: [PATCH] docs: update readme to include plugin init (#51) --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 851550d..384b223 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,9 @@ Maintenance Status: Experimental - [Using](#using) + - [Initialization](#initialization) - [FairPlay](#fairplay) + - [PlayReady for IE11 (Windows 8.1+)](#playready-for-ie11-windows-81) - [Other DRM Systems](#other-drm-systems) - [Source Options](#source-options) - [Plugin Options](#plugin-options) @@ -33,6 +35,20 @@ decrypt audio/video, a user must pass in either relevant license URIs, or method to a source and its combination of key system and codec. These are provided to the plugin via either videojs-contrib-eme's plugin options, or source options. +### Initialization +The videojs-contrib-eme plugin must be initialized before a source is loaded into the player: + +```javascript +player.eme(); +player.src({ + src: '', + type: 'application/dash+xml', + keySystems: { + 'com.widevine.alpha': '' + } +}); +``` + ### FairPlay For FairPlay, only `keySystems` is used from the options passed into videojs-contrib-eme,