Skip to content

Quickstart (learning by doing)

$ ./stream-server
Serving on
Read the quickstart at 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 http://localhost:8080 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": "",
            "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": ""
  4. Start playback of your selected stream with chat and muted volume:

    client.display("CHANNEL-NAME", 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.

Last update: June 20, 2020