- Code: Select all
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Dash JavaScript Player</title>
<script src="dash.all.debug.js"></script>
<script src="dash.protection.debug.js"></script>
</head>
<body>
<video id="video" controls="true" autoplay="true"></video>
<script>
var video = document.getElementById("video");
var protData = {
"org.w3.clearkey": {
"clearkeys": {
"IAAAACAAIAAgACAAAAAAAg": "5t1CjnbMFURBou087OSj2w"
}
}
};
var player = MediaPlayer().create();
player.initialize();
player.attachView(video);
player.attachSource("http://html5.cablelabs.com:8100/cenc/ck/dash.mpd", null, protData);
</script>
</body>
</html>
It runs perfectly on chome and firefox (on desktop). But when deploy to SDK, it shows nothing. Does smarttv sdk really support mpeg dash stream and if it does, how to write simple player? I had read documents but could not find the solution.
Thanks.