This tutorial helps if you want to use a custom player for streaming.

Fetch the streaming urls

With our client-side rest API, you can fetch all data provided for a file or live-stream in easy way. For protection you need to generate a key. How to do this is provided here: Tutorial generating player token.

You can fetch the streaming URLs with the following URL. Please do not forget to replace the macro parameters with your own data.

https://playout.3qsdn.com/config/[DATAID]?key=[KEY]&timestamp=[TIMESTAMP]

Error Status codes If your token is not correct or the video is not published, you’ll get certain status codes which you have to handle.

  • 200: Everything is okay
  • 404: File does not exists
  • 403: Token is not correct
  • 401: Geo-Blocked
  • 410: File is not published (releaseStatus)

After you called the URL, you’ll receive a JSON file which looks like this, it provides also metadata, etc.

Note: If your project is using content protection, the call to this JSON must have exactly the same user agent header as the player.

{
  "dataid": "a719ecb1-b61f-11ea-97a4-002590c750be",

  ...

  "streamContent": "demand",
  "streamType": "video",
  "sources": {
    "hls": "https://sdn-global-streaming-cache.3qsdn.com/stream/.../manifest.m3u8",
    "dash": "https://sdn-global-streaming-cache.3qsdn.com/stream/.../manifest.mpd",
    "progressive": [
      {
        "src": "https://sdn-global-prog-cache.3qsdn.com/stream/.../57-XW8JQvNYrxfMHFBDqd9k.mp4",
        "type": "video/mp4",
        "height": 720
      },
      {
        "src": "https://sdn-global-prog-cache.3qsdn.com/stream/.../6-ZN2XYHqhdjtvC6M7PKD3.mp4",
        "type": "video/mp4",
        "height": 144
      },
      {
        "src": "https://sdn-global-prog-cache.3qsdn.com/stream/.../5-nGK4F8hVpX3RdBCWtDm6.mp4",
        "type": "video/mp4",
        "height": 240
      },
      {
        "src": "https://sdn-global-prog-cache.3qsdn.com/stream/.../4-KP6vg7JY2Rc9F3XDZxzr.mp4",
        "type": "video/mp4",
        "height": 360
      },
      {
        "src": "https://sdn-global-prog-cache.3qsdn.com/stream/.../3-v7rxNPKYDzgLH9Vtb3Gj.mp4",
        "type": "video/mp4",
        "height": 480
      },
      {
        "src": "https://sdn-global-prog-cache.3qsdn.com/stream/.../2-cMJT4DCB8drvPYRhz7x6.mp4",
        "type": "video/mp4",
        "height": 720
      }
    ]
  }
  ...
}

As you can see in the example you can now pick up the URLs you need and put them in the custom player. We always suggest to use streaming formats (HLS, DASH) instead of progressive download.