From 040f7a106254b3084cd7926e4be2aa83b3db2c3f Mon Sep 17 00:00:00 2001 From: dsilhavy Date: Thu, 28 Apr 2022 16:39:03 +0200 Subject: [PATCH] Add example for keeping DRM MediaKeySessions in DRM section --- samples/drm/keepProtectionKeys.html | 136 ++++++++++++++++++++++++++++ samples/samples.json | 14 +++ 2 files changed, 150 insertions(+) create mode 100644 samples/drm/keepProtectionKeys.html diff --git a/samples/drm/keepProtectionKeys.html b/samples/drm/keepProtectionKeys.html new file mode 100644 index 0000000000..dcddf64b36 --- /dev/null +++ b/samples/drm/keepProtectionKeys.html @@ -0,0 +1,136 @@ + + + + + DRM - Keep MediaKeySession example + + + + + + + + + + + + + +
+
+
+ +
+
+
+ +
+
+
+
+
+

DRM - Keep MediaKeySession

+

The ProtectionController and the created MediaKeys and MediaKeySessions will be preserved during + the MediaPlayer lifetime.

+

To observe the effect of the "keepProtectionMediaKeys" + property open the developer tools and check the network requests for license request. Only for + the first playback attempt license requests will be visible. For any subsequent playback attempt + the existing MediaKeySession is reused and no additional license requests are performed.

+

For a detailed explanation on DRM playback in dash.js checkout the + Wiki.

+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+ © DASH-IF +
+
+
+ + + + + + diff --git a/samples/samples.json b/samples/samples.json index 4062b09afa..c8825072c1 100644 --- a/samples/samples.json +++ b/samples/samples.json @@ -391,6 +391,20 @@ "Video", "Audio" ] + }, + { + "title": "DRM - Keep MediaKeySession", + "description": "This example shows how the ProtectionController and the created MediaKeys and MediaKeySessions will be preserved during the MediaPlayer lifetime leading to less license requests.", + "href": "drm/keepProtectionKeys.html", + "image": "lib/img/tos-2.jpg", + "labels": [ + "VoD", + "DRM", + "Widevine", + "Playready", + "Video", + "Audio" + ] } ] },