Class WindowsMRRemoting
Windows Mixed Reality Class used to manage Remoting within the application
Namespace: UnityEngine.XR.WindowsMR
Syntax
public static class WindowsMRRemoting : object
Properties
isAudioEnabled
Enable Audio when remoting
Declaration
public static bool isAudioEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
isConnected
Active remoting connection established
Declaration
public static bool isConnected { get; }
Property Value
Type | Description |
---|---|
Boolean |
isVideoEnabled
Enable Video when remoting
Declaration
public static bool isVideoEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
maxBitRateKbps
The maximum bit rate (in Kbps) for sending data between application and device when Remoting
Declaration
public static int maxBitRateKbps { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
remoteMachineName
IP address of the device to connect to
Declaration
public static string remoteMachineName { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
Connect()
Attempt to connect to the Holographic Remoting Player on the device specified by the remoteMachineName
Declaration
public static void Connect()
Connect(String)
Attempts to create a secure connection to the server.
See Microsoft documentation about secure Holographic Remoting Connections for how a secure connection is setup and used.
Declaration
public static void Connect(string token)
Parameters
Type | Name | Description |
---|---|---|
String | token | Shared secret used to authenticate the client with the server. |
Disconnect()
Disconnect any active remoting connections
Declaration
public static void Disconnect()
Listen()
Setup a listening port for a server to attempt to connect to the client application on the device.
Declaration
public static void Listen()
Listen(WindowsMRRemoting.SecureListenData, WindowsMRRemoting.ValidateToken)
Setup a listening port for a server to attempt to connect to the client application on the device.
Will used the passed in data to create a secure network connection and to authenticate the client.
If token is empty, and the validation callback is not used then a secure connection will not be established and the Listen call will fallback to non-secure listen mode.
Declaration
public static void Listen(WindowsMRRemoting.SecureListenData data, WindowsMRRemoting.ValidateToken validateToken)
Parameters
Type | Name | Description |
---|---|---|
WindowsMRRemoting.SecureListenData | data | Instance of WindowsMRRemoting.SecureListenData with information for validation and authentication. |
WindowsMRRemoting.ValidateToken | validateToken | The |
TryGetConnectionFailureReason(out ConnectionFailureReason)
Try to get the failure reason of the remoting connection
Declaration
public static bool TryGetConnectionFailureReason(out ConnectionFailureReason connectionFailureReason)
Parameters
Type | Name | Description |
---|---|---|
ConnectionFailureReason | connectionFailureReason | The reason the remoting connection failed |
Returns
Type | Description |
---|---|
Boolean | True if the connection failure reason was able to be acquired |
TryGetConnectionState(out ConnectionState)
Try to get the current state of the remoting connection
Declaration
public static bool TryGetConnectionState(out ConnectionState connectionState)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | connectionState | The current state of the connection |
Returns
Type | Description |
---|---|
Boolean | True if the connection state was able to be acquired |