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, I could write a very simple player that play the mpeg dash stream, something like this:
Code: Select all
<!DOCTYPE html>
    <meta charset="utf-8"/>
    <title>Dash JavaScript Player</title>
    <script src="dash.all.debug.js"></script>
    <script src=""></script>
    <video id="video" controls="true" autoplay="true"></video>
        var video = document.getElementById("video");
        var protData = {
          "org.w3.clearkey": {
            "clearkeys": {
              "IAAAACAAIAAgACAAAAAAAg": "5t1CjnbMFURBou087OSj2w"
        var player = MediaPlayer().create();
        player.attachSource("", null, protData);

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

Return to App development questions