Streams Unity SDK
Last updated
Last updated
To establish a connection between your Unity application and your client-side. You have to establish a websocket connection first.
Connect to websocket url ws://localhost:7788/
using your engine's built-in websocket client.
After establishing the connection, the messages you send to the websocket will be received on the JS side and vice-versa.
You can initiate action to open a specific URL from the default browser of your visitor from inside your application. You should send a Websocket message by following the format below, message should be JSON formatted plain text message.
If your visitors are using your Applications on mobile/tablet devices, you can also allow them to type with the on-screen keyboard inside Vagon Streams. The good part is, you can manage the visibility of the on-screen keyboard button directly from your application, and trigger actions to show the keyboard button when the visitor focuses on an input inside the application. To show the On Screen Keyboard Button, you should send a Websocket message by following the format below, message should be JSON formatted plain text message.
When the focus changes from the input, you can hide the on-screen keyboard button from the screen as well. Again, you should send a Websocket message by following the format below, message should be JSON formatted plain text message.
Independently from Application Configurations, you can enable 360 View Mode inside your application by sending the following message via Websocket.
After sending this message, 360 View Mode will be activated with the first mouse click on Stream.
Independently from Application Configurations, you can disable 360 View Mode inside your application by sending the following message via Websocket.
When the Idle Duration Limit is active, you can reset the Idle Timer by sending the message below via Websocket.
You can send the following message via Websocket to turn off the Stream Machine which is running the related application.
Updates the streaming resolution and matches the iframe height and width when initiated.
Quality parameters can be set as "standard", "moderate" or "high". Session will be refreshed automatically after the quality is set.
Triggers the Session Information
event, data must be collected via Session Information
event.
Triggers the Machine ID Information
event, data must be collected via Machine ID Information
event.
Message responses will be returned as JSON-formatted string to WebSocket onMessage events. Additional parsing operation may be required.
isConnected
returns true
when user joins to the Session, returns false
when leaves the session.