PureWeb Pixel Streaming Client Template

This package uses platform-sdk and platform-sdk-react to build a representative sample that works on mobile as well as desktop.

PureWeb supports three different methods for obtaining access to a game. We are in

the process of moving new deployments to our Launch Queue infrastructure, but the

REST API remains until completely deprecated in a future release:

  1. Local - Construct a LocalModelDefinition with a predefined endpoint running the appropriate Cirrus server.
  2. Platform (REST) - Create a LegacyModelDefinition and launch a model on the PureWeb platform that was not uploaded through the developer console. Contact your sales representative for the correct keys and endpoint.
  3. Platform (Queuing) - If you uploaded your model through the PureWeb developer console, you can connect to it through the ProjectId . Enable anonymous access to your model in the console use the Platform to list projects and retrieve the correct ModelDefinition .

Connections are made using the use LaunchRequest hook with the appropriate model definition.

Prereqs & Local Development Workflow 

The template is built around create-react-app. Familiarize yourself with the standard

pixel streaming workflow:

https://docs.unrealengine.com/en-US/Platforms/PixelStreaming/PixelStreamingIntro/ind ex.html

  • You will need an Unreal game running 4.24 or higher. You can develop locally
    using just the PixelStreaming plugin. If you want to deploy your project to the PureWeb platform for a pilot, you will need to include our plugin. Please contact your sales rep or see http://console.pureweb.io for details.
  • Install a recent version of npm (6.14+) and node (12.18+)
  • Globally install yarn
  • Install: yarn install
  • Develop: yarn watch
  • If using Unreal, run the Cirrus web server that is bundled with your Engine or game:
cd < Game location or

UE_4. 25> \Engine\Source\Programs\PixelStreaming\WebServers\SignallingWebServer

  • Run your game either as Standalone through the editor, or via the debugger or a distribution build. PlayInEditor will not work.

  • Navigate to http://localhost:3000 and press play.


Variation from Epic's Pixel Streaming Client


By default PureWeb will attempt to resize the game to match the client.

You can override this behavior by modifying the Resolution property passed to the

VideoStream .

Input Events

PureWeb uses the UseNativeTouchEvents property on the VideoStream component to

toggle whether touch events are sent natively, or translated into simulated mouse


By default, this value is false . You should toggle this in your application if you have

added touch support to your game.

Presently Unsupported

  • Multiple viewers outside of local development.
  • Freeze Frame API is not exported.

client.json configuration and URL parameters

  1. launchType : local for local development, legacy for REST-based Platform launch requests. Anything else for queues.
  2. target : For local launches, defaults to localhost .
  3. name : For legacy launches, the application name.
  4. key : For legacy launches, the application key.
  5. secret : For legacy launches, the application secret.
  6. projectId : For launch queue launches, the project id.
  7. forceRelay : Used to force the WebRTC connection over TURN. Defaults to false.
  8. useNativeTouchEvents : Whether to simulate pointer events with touch. Defaults to false.


Contact support@pureweb.com with any questions or concerns.