Skip to content

Conversation

@david-macpherson
Copy link
Contributor

@david-macpherson david-macpherson commented May 17, 2023

Relevant components:

  • Scalable Pixel Streaming Frontend library
  • Examples
  • Docs

Problem statement:

Currently there is logic to handle sending the webRTC offer based on the engine version. A new property has been introduced to remove this logic.

Solution

The logic to determine if the frontend sends the webRTC offer is replaced with the frontendToSendOffer property as from the config message that is sent from the signalling server.

Test Plan and Compatibility

Prerequisites

  1. Installed sps to aws using a 0.0.0-devel version
  2. Added the sps details to the sps-cli config
  3. Ran the frontend locally
cd examples/typescript
npm run serve-dev

frontendToSendOffer set to true

  1. Deploy a new application using the CLI Tool using the following command.
./sps-client application create --name offer
  1. Deploy a version to the offer application with the frontendToSendOffer set to true using the following JSON data and command.

offer-v1.json

{
  "name": "v1",
  "buildOptions": {
    "input": {
      "containerTag": "tensorworks/ue:5.0-linux"
    }
  },
  "runtimeOptions": {
    "pixelStreaming": {
      "webRTC": {
        "frontendToSendOffer": true
      }
    }
  }
}
./sps-client version create --filepath offer-v1.json --application offer
  1. Set the activeVersion of application offer to v1.
./sps-client application update --name offer --activeVersion v1
  1. Retrieved the websocket address for the application and set the webSocketAddress.
let webSocketAddress = "ws://sps-dave-2023051701-283060373.ap-northeast-1.elb.amazonaws.com/offer/ws";
  1. Clicked to start the instance

  2. Wait for the instance to start

  3. Click the Gear in the top left corner

  4. The value of the Browser send offer options will be on

frontendToSendOffer set to false

  1. Deploy a new application using the CLI Tool using the following command.
./sps-client application create --name no-offer
  1. Deploy a version to the no-offer application with the frontendToSendOffer set to false using the following JSON data and command.

no-offer-v1.json

{
  "name": "v1",
  "buildOptions": {
    "input": {
      "containerTag": "tensorworks/ue:5.0-linux"
    }
  },
  "runtimeOptions": {
    "pixelStreaming": {
      "webRTC": {
        "frontendToSendOffer": false
      }
    }
  }
}
./sps-client version create --filepath offer-v1.json --application no-offer
  1. Set the activeVersion of application no-offer to v1.
./sps-client application update --name no-offer --activeVersion v1
  1. Retrieved the websocket address for the application and set the webSocketAddress.
let webSocketAddress = "ws://sps-dave-2023051701-283060373.ap-northeast-1.elb.amazonaws.com/no-offer/ws";
  1. Clicked to start the instance

  2. Wait for the instance to start

  3. Click the Gear in the top left corner

  4. The value of the Browser send offer options will be off

@david-macpherson david-macpherson requested a review from dan-tw May 17, 2023 03:36
@david-macpherson david-macpherson self-assigned this May 17, 2023
@dan-tw dan-tw changed the title Replaced the logic to send the offer from the frontend depending on w… Replaced the logic to send the offer from the frontend depending on what is sent from the signalling server May 18, 2023
@dan-tw dan-tw merged commit f100670 into ScalablePixelStreaming:v0.3.4 May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants