public bool CanSelectVideoDevice()
 {
     return(CAPI.DeviceApi_LastUpdate() > 0);
 }
Esempio n. 2
0
 /// <summary>
 /// Flushes messages. Not needed in WebRtcNetwork but use it at the end of a frame
 /// if you want to be able to replace WebRtcNetwork with other implementations
 /// </summary>
 public void Flush()
 {
     CAPI.Unity_WebRtcNetwork_Flush(mReference);
 }
Esempio n. 3
0
 /// <summary>
 /// Disconnects the given connection id.
 /// </summary>
 /// <param name="id">Id to disconnect</param>
 public void Disconnect(ConnectionId id)
 {
     CAPI.Unity_WebRtcNetwork_Disconnect(mReference, id.id);
 }
Esempio n. 4
0
 public int GetBufferedAmount(ConnectionId conId, bool reliable)
 {
     return(CAPI.Unity_WebRtcNetwork_GetBufferedAmount(mReference, conId.id, reliable));
 }
Esempio n. 5
0
 /// <summary>
 /// Shuts webrtc down. All connection will be disconnected + if the server is started it will be stopped.
 ///
 /// The instance itself isn't released yet! Use Dispose to destroy the network entirely.
 /// </summary>
 public void Shutdown()
 {
     CAPI.Unity_WebRtcNetwork_Shutdown(mReference);
 }
Esempio n. 6
0
 public void StopServer()
 {
     CAPI.Unity_WebRtcNetwork_StopServer(mReference);
 }
Esempio n. 7
0
 /// <summary>
 /// Sends a byte array
 /// </summary>
 /// <param name="conId">Connection id the message should be delivered to.</param>
 /// <param name="data">Content/Buffer that contains the content</param>
 /// <param name="offset">Start index of the content in data</param>
 /// <param name="length">Length of the content in data</param>
 /// <param name="reliable">True to use the ordered, reliable transfer, false for unordered and unreliable</param>
 public bool SendData(ConnectionId conId, byte[] data, int offset, int length, bool reliable)
 {
     return(CAPI.Unity_WebRtcNetwork_SendData(mReference, conId.id, data, offset, length, reliable));
 }
 public void SetMute(bool val)
 {
     CAPI.Unity_MediaNetwork_SetMute(mReference, val);
 }
 public bool IsMute()
 {
     return(CAPI.Unity_MediaNetwork_IsMute(mReference));
 }
 public bool HasVideoTrack(ConnectionId remoteUserId)
 {
     return(CAPI.Unity_MediaNetwork_HasVideoTrack(mReference, remoteUserId.id));
 }
 public void SetVolume(double volume, ConnectionId remoteUserId)
 {
     CAPI.Unity_MediaNetwork_SetVolume(mReference, volume, remoteUserId.id);
 }
 public void ResetConfiguration()
 {
     CAPI.Unity_MediaNetwork_ResetConfiguration(mReference);
 }