Quickstart (learning by doing)

$ ./stream-server
Serving on
Read the quickstart at https://stream-server.h-da.io/quickstart to get started.
Stop with Ctrl-C or close this terminal.


In the examples of this documentation only the local address is used. If you want to connect from your phone or the emulator you need to use the network address ( in this case). Also we assume you use the default port 8080.

  1. Open in a browser. Leave this tab / window open while you do the other steps.
  2. Get the current state of the display:
    StreamServerClient client = new StreamServerClient("");
    JSONObject state = client.display(null, null, null, null, null);


        "large_channel": "",
        "small_channel": "",
        "volume": 0.5,
        "small_scale": 0.3,
        "show_chat": false
  3. Find some stream on twitch:
    List<JSONObject> topStreams = client.twitchGetTopStreams(null, null, null); // no filters


            "average_fps": 60,
            "started_at": "2019-08-18T17:29:55Z",
            "game": "League of Legends",
            "preview_img_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_riotgames-640x360.jpg",
            "video_height": 1080,
            "viewers": 226699,
            "status": "TL vs. CG | Semifinals Day 2 | LCS Summer Split | Team Liquid vs. Clutch Gaming (2019)",
            "language": "en",
            "mature": false,
            "channel_name": "riotgames",
            "channel_display_name": "Riot Games",
            "channel_logo_img_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/889e7697-b636-48d9-be15-a9a39e286a64-profile_image-300x300.png"
  4. Start playback of your selected stream with chat and muted volume:{channel name here}&volume=0&show_chat=true
    client.display("channel name here", null, 0.0f, null, true);


        "large_channel": "riotgames",
        "small_channel": "",
        "volume": 0,
        "small_scale": 0.3,
        "show_chat": true

    The tab / window from step 1 should now start playing that stream with the provided settings.

  5. Read the Reference.