How to play MPEG DASH stream

How to play MPEG DASH stream

Postby email_r_NhGpbbUkZh » Tue Feb 02, 2016 8:55 pm

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.
email_r_NhGpbbUkZh
 
Posts: 1
Joined: Tue Feb 02, 2016 12:08 am

Re: How to play MPEG DASH stream

Postby Specs_STA » Wed Feb 03, 2016 6:12 am

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!
Specs_STA
 
Posts: 14
Joined: Fri Aug 09, 2013 4:32 am


Return to App development questions



cron