@pureweb/platform-streaming-agent
Version:
The PureWeb platform streaming agent enables your game to communicate and stream through the PureWeb Platform
78 lines (68 loc) ⢠3.65 kB
Markdown
# Platform Streaming Agent
The PureWeb platform streaming agent enables your game to communicate and stream through the PureWeb Platform
## Install the PureWeb CLI and Streaming Agent
Using yarn:
```shell
$ yarn global add @pureweb/platform-cli
$ yarn global add @pureweb/platform-streaming-agent
```
Using npm:
```shell
$ npm install -g @pureweb/platform-cli
$ npm install -g @pureweb/platform-streaming-agent
```
## Access the PureWeb Developer Console
* Navigate to https://console.pureweb.io
* Login (or signup) and create a new project.
## Setup CLI credentials
* From the console, select the *gear* icon from the top menu to access project properties.
* Enable `anonymous access`
* From the project settings, select the `Platform CLI` tab. Copy the commands and run them in a console.
## For local development, without a published model
* Copy the `Default Environment` from the *Project Properties* dialog
* Use the cli to request an agent token:
`pw agent create --environmentId <your default environment id>`
```
š pw agent create --environmentId 12345-6789-1234-5678-123456733212389
{
"access_token": "ey...iw8rq2Wk",
"expires_in": 86400,
"token_type": "Bearer"
}
```
Set the `PUREWEB_AGENT_TOKEN` environment variable. This will vary between operating systems and shells.
* Windows PowerShell: `$env:PUREWEB_AGENT_TOKEN="<access_token>"`
* Windows Command: `set PUREWEB_AGENT_TOKEN=<access_token>`
* OSX / Linux Bash: `export PUREWEB_AGENT_TOKEN=<access_token>`
### Optional for Unreal
You can change the default port. For Unity, use 9210. For Unreal, you can skip this step. Set the PUREWEB_STREAMER_PORT environment variable.
* Windows PowerShell: `$env:PUREWEB_STREAMER_PORT=9210`
* Windows Command: `set PUREWEB_STREAMER_PORT=9210`
* OSX / Linux Bash: `export PUREWEB_STREAMER_PORT=9210`
Run the streaming-agent:
```
š streaming-agent
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā
ā PureWeb Streaming Agent 2.2.1 ā
ā ā
ā Agent id: e5b1b35a-c60b-45fb-89a4-dd2788620644 ā
ā Project id: bea3c4cb-efa5-4041-9485-6e7a2b49e6d3 ā
ā Environment id: 12345-6789-1234-5678-123456733212389 ā
ā ā
ā Streamer Port: 8888 ā
ā Leasing Enabled: NO ā
ā Sidecar Port: NO ā
ā ā
ā Timeouts ā
ā ā
ā Rendezvous: NO ā
ā Linger: NO ā
ā ā
ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
```
* Start your Unreal game: `game.exe -PixelStreamingPort=8888 -PixelStreamingIP=127.0.0.1`
* View (and share) your application in the preview client: `https://preview.pureweb.io/<project id>?environmentId=<environment id>&local=true`
## Support
Contact support@pureweb.com with any questions or concerns.