我创建了一个测试 html 页面来播放 MPEG-CENC 保护的 MPEG-DASH 视频,如果我在player.configure() 中指定kid: 密钥对,我就可以播放。
然后我想设置一个clearkey服务器。请参阅Shaka Player 文档的DRM 配置部分,我更改了代码以指定获取许可证的 url,如下所示。但是当我在 Visual Studio 中的 Page_Load 事件中设置断点时,页面永远不会被触及。浏览器控制台没有错误。
我使用的浏览器是Firefox 53.0.2和Chrome 58.0.3029.96。我错过了什么?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/2.1.0/shaka-player.compiled.js"></script>
<title>MPEG-DASH Player Test</title>
<script>
//MPEG-DASH stream encrypted with MPEG-CENC:
var manifestUri = '/dashtest_encrypted/stream.mpd';
function initApp() {
// Install built-in polyfills to patch browser incompatibilities.
shaka.polyfill.installAll();
// Check to see if the browser supports the basic APIs Shaka needs.
if (shaka.Player.isBrowserSupported()) {
// Everything looks good!
initPlayer();
} …Run Code Online (Sandbox Code Playgroud)