Skip to content

Commit

Permalink
set dashplayer2 in eme test
Browse files Browse the repository at this point in the history
  • Loading branch information
dong-heun committed Mar 15, 2024
1 parent 57ff9a8 commit b4fbea0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eme/clearkey-hbbtv/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<h1>EME: Clear Key Encryption</h1>

<video autoplay controls preload="auto">
<source src="../video/EME/video_dash.mpd" type="application/dash+xml" />
<!--<source src="../video/EME/video_dash.mpd" type="application/dash+xml" />-->
<!--<source src="../video/EME/video_encrypted.mp4" type="video/mp4" />-->
<p>This browser does not support the video element.</p>
</video>
Expand Down
11 changes: 11 additions & 0 deletions eme/clearkey-hbbtv/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ var config = [{
var video = document.querySelector('video');
video.addEventListener('encrypted', handleEncrypted, false);

// Temporarily set hybridTV for using dashplayer instead of dashplayer2.
var options = {};
options.option = {};
options.option.hybridTV = true;

var source = document.createElement("source");
source.setAttribute('src', '../video/EME/video_dash.mpd');
source.setAttribute('type','application/dash+xml;mediaOption=' + escape(JSON.stringify(options)));
video.appendChild(source);
video.load();

/*
navigator.requestMediaKeySystemAccess('org.w3.clearkey', config).then(
function(keySystemAccess) {
Expand Down

0 comments on commit b4fbea0

Please sign in to comment.