Configuration and Initialization the Arcware Pixel Streaming WebSDK is designed to be easily configurable to fit the needs of various web applications.
Below, we'll explain the configuration options and initialization process based on the provided React code example.
Configuration Options
When initializing the required classes by using the ArcwareInit method, you will provide two objects.
With the first input you have to provide the necessary connection information:
interfaceConnectionInfo {// Required ShareId. shareId:string;// If the ShareId is setup with multiple projects,// you'll have to add the projectId. projectId?:string;}
The second input is split into 2 sections, the initialSettings and the settings object.
For more details, check @epicgames-ps/lib-pixelstreamingfrontend-ue5.2.
settings
The settingsobject helps to configure Arcware Cloud features.
importtype { ErrorMessage, Queue, LoveLetter } from"@arcware-cloud/pixelstreaming-websdk";typesettings= {/** ShareId, used for sharing your project. * Using ArcwareInit will set this required property for you. */ shareId:string;/** Id of your project, only required if your shareId refers to multiple projects. * Using ArcwareInit will set this required property for you. */ projectId?:string;/** Overwrites the Session-Tool and uses the provided session instead. */ session?:string;/** Show or hide the fullscreen button. */ fullscreenButton?:boolean; //Default TRUE/** Show or hide the settings button. */ settingsButton?:boolean; //Default TRUE/** Show or hide the info button. */ infoButton?:boolean; //Default FALSE/** Show or hide the audio button. */ audioButton?:boolean; //Default FALSE/** Show or hide the microphone button. */ micButton?:boolean; //Default FALSE/** Show or hide the microphone button. */ stopButton?:boolean; //Default FALSE/** Show or hide the connectionStrengthIcon button. */ connectionStrengthIcon?:boolean; //Default FALSE/** Handler for server side error messages. */errorHandler?: (message:ErrorMessage) =>void;/** Handler for queue events. */queueHandler?: (message:Queue) =>void;/** Handler for sessionId message. */sessionIdHandler?: (sessionId:string) =>void;/** Handler for love letters. * "LoveLetters" are send from backend to the SDK to state what phase the connection currently is in. */loveLetterHandler?: (message:LoveLetter) =>void;/** Enable/Disable LoveLetter logging to the console. */ loveLetterLogging?:boolean;/** Enable/Disable Connection Identifier logging to the console. */ connectionIdentifierLoggingDisabled?:boolean;}
We have some plans in mind, how to extend this functionally, sadly we can't give any more details or an ETA yet.
Interaction with Unreal Engine Application
If you have come this far, you might be interested in how to interact with your application from your web-app: