WebRTC Video Chat 1.1.4
Loading...
Searching...
No Matches
Byn.Awrtc.IMediaNetwork Interface Reference

WebRtc network that allows access to video / audio functionality. More...

Inheritance diagram for Byn.Awrtc.IMediaNetwork:
Byn.Awrtc.IWebRtcNetwork Byn.Awrtc.IBasicNetwork Byn.Awrtc.INetwork

Public Member Functions

void Configure (MediaConfig config)
 Configures the local media stream allowing to activate the local camera and microphone.
 
MediaConfigurationState GetConfigurationState ()
 Returns the current state of the configuration process.
 
string GetConfigurationError ()
 Returns an error in case the configuration state is failed. (note this is not fully implemented)
 
void ResetConfiguration ()
 Resets the configuration back to NoConfiguration. Can only be used during Failed state.
 
IFrame TryGetFrame (ConnectionId id)
 Returns a RawFrame. This is a direct reference used internally and should not be accessed after the next Update call.
 
void SetVolume (double volume, ConnectionId remoteUserId)
 Sets a volume for the replay of a remote connections audio stream.
 
bool HasAudioTrack (ConnectionId remoteUserId)
 Checks if the connection with the given id has a media stream with an audio track attached.
 
bool HasVideoTrack (ConnectionId remoteUserId)
 Checks if the connection with the given id has a media stream with an video track attached.
 
bool IsMute ()
 Checks if the microphone is muted. True means it is muted. False means it isn't muted (via this system). This doesn't mean the microphone is actually sending. It still can be muted within the OS or via the physicial device.
 
void SetMute (bool val)
 Allows to mute the microphone. True = mute False = send the microphone data if available.
 
- Public Member Functions inherited from Byn.Awrtc.IWebRtcNetwork
int GetBufferedAmount (ConnectionId id, bool reliable)
 Still experimental. Only supported for Native platforms so far.
 
- Public Member Functions inherited from Byn.Awrtc.IBasicNetwork
void StartServer (string address=null)
 Starts a server + asking for it to have a certain address. The use of the address is not guaranteed. If the address is in use the underlying system will return ServerConnectionFailed. (This can also be triggered if anything else fails in the process)
 
void StopServer ()
 Stops incoming connections. This usually doesn't close existing connections thus can be used to enforce a certain amount of maximum allowed connections.
 
ConnectionId Connect (string address)
 Connects to a given address or room name.
 
- Public Member Functions inherited from Byn.Awrtc.INetwork
bool Dequeue (out NetworkEvent evt)
 This will return the incoming network events. Call this method and handle the incoming events until it returns false.
 
bool Peek (out NetworkEvent evt)
 Will return the first event in the queue without removing it.
 
void Flush ()
 Sends buffered data.
 
bool SendData (ConnectionId id, byte[] data, int offset, int length, bool reliable)
 Sends the content of a byte array to the given connection.
 
void Disconnect (ConnectionId id)
 Disconnects the given connection.
 
void Shutdown ()
 Disconnects all connection and shuts down the server if started. Dequeue will still return the confirmation messages such as Disconnected event for each connection.
 
void Update ()
 Call this every frame if you intend to read incoming messages using Dequeue. This will make sure all data is read received by the network.
 

Detailed Description

WebRtc network that allows access to video / audio functionality.

This interface will change a lot in the future. Avoid using this directly and use ICall whenever possible.

Member Function Documentation

◆ Configure()

void Byn.Awrtc.IMediaNetwork.Configure ( MediaConfig config)

Configures the local media stream allowing to activate the local camera and microphone.

Parameters
config

◆ GetConfigurationError()

string Byn.Awrtc.IMediaNetwork.GetConfigurationError ( )

Returns an error in case the configuration state is failed. (note this is not fully implemented)

Returns
Text returned by native webrtc or the browser (not yet implemented. Will reference to the browsers log for error information)

◆ GetConfigurationState()

MediaConfigurationState Byn.Awrtc.IMediaNetwork.GetConfigurationState ( )

Returns the current state of the configuration process.

Returns
Current value of MediaConfigurationState

◆ HasAudioTrack()

bool Byn.Awrtc.IMediaNetwork.HasAudioTrack ( ConnectionId remoteUserId)

Checks if the connection with the given id has a media stream with an audio track attached.

Returns
True if at least one audio track is attached. False if no audio track or no media stream

◆ HasVideoTrack()

bool Byn.Awrtc.IMediaNetwork.HasVideoTrack ( ConnectionId remoteUserId)

Checks if the connection with the given id has a media stream with an video track attached.

Returns
True if at least one video track is attached. False if no video track or no media stream

◆ IsMute()

bool Byn.Awrtc.IMediaNetwork.IsMute ( )

Checks if the microphone is muted. True means it is muted. False means it isn't muted (via this system). This doesn't mean the microphone is actually sending. It still can be muted within the OS or via the physicial device.

Returns

◆ SetMute()

void Byn.Awrtc.IMediaNetwork.SetMute ( bool val)

Allows to mute the microphone. True = mute False = send the microphone data if available.

Parameters
val

◆ SetVolume()

void Byn.Awrtc.IMediaNetwork.SetVolume ( double volume,
ConnectionId remoteUserId )

Sets a volume for the replay of a remote connections audio stream.

Parameters
volume1 = normal volume, 0 = mute. The native version supports values above 1 (up to 10). For the browser version 1 is the maximum value.
remoteUserIdId of the remote connection.

◆ TryGetFrame()

IFrame Byn.Awrtc.IMediaNetwork.TryGetFrame ( ConnectionId id)

Returns a RawFrame. This is a direct reference used internally and should not be accessed after the next Update call.

Parameters
idConnectionId of the user to get the frame information or INVALID for the local frame.
Returns
Returns a RawFrame containing an image or null if non available

The documentation for this interface was generated from the following file: