Web Sample

After setting up of any of the Cube Samples, you need a website able to make the proper calls to the Genvid API to display the stream and use the game data. It also needs to make specific calls via the Genvid API to interact with your game.

The Web Sample creates a website for you to stream any of the Cube Samples to: DirectX, Unreal, or Unity. It appears as a service on your Cluster UI Jobs page. It includes a CUBE SAMPLE link and a CUBE ADMIN link.

These links redirect you to the website that streams the running DirectX, Unreal, or Unity sample. The CUBE SAMPLE link redirects you as a user while the CUBE ADMIN link redirects you as an administrator.

In order to use it, you need to build it and then load it:

  1. Go to the /samples/cube/web directory.

  2. Build the website.

    py web.py build
    
  3. Load the website.

    py web.py load
    

This section covers a step-by-step example on how we created the Web Sample. Feel free to adapt any of our sample code you find useful for your own project.