Page 1 of 1

How to play MPEG DASH stream

PostPosted: Tue Feb 02, 2016 8:55 pm
by email_r_NhGpbbUkZh
From Mpeg dash forum, https://github.com/Dash-Industry-Forum/dash.js/wiki I could write a very simple player that play the mpeg dash stream, something like this:
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.

Re: How to play MPEG DASH stream

PostPosted: Wed Feb 03, 2016 6:12 am
by Specs_STA
MPEG DASH streams are played on STA platforms by directly using the HTML5 video object. Set the src tag of the video element to the URL of the stream's MPD. Please see section 3.4.1 and 3.4.2 of the STA developer guidelines, available here: https://developers.smarttv-alliance.org ... umentation

There's no need to use the dash.js Javascript library. This uses a different API to play streams in desktop browsers.

Good luck with your application!