|
WebRTC Video Chat 1.1.4
|
Abstract base call class. Used for shared functionality between all platforms. More...
Public Member Functions | |
| AWebRtcCall (NetworkConfig config=null) | |
| Creates a new call using a given NetworkConfig object. | |
| virtual void | Configure (MediaConfig config) |
| Configures the camera/audio devices used for the call. | |
| virtual void | Call (string address) |
| Starts an outgoing call. Only supported in direct mode. Use Listen to connect in conference mode no matter if ingoing or outgoing. | |
| virtual void | Listen (string address=null) |
| Listens to incoming calls on the given address. | |
| virtual void | StopListening () |
| Stops the call from accepting any new connections. This is for use in conference mode only. | |
| void | Send (string message) |
| Send a string to all connected systems. | |
| void | Send (string message, bool reliable) |
| Sends a text message to all connected peers. | |
| bool | Send (string message, bool reliable, ConnectionId id) |
| Send a string to a specific receiver using a set channel. | |
| void | Send (byte[] data, bool reliable) |
| Sends data to all connections using a set channel. | |
| bool | Send (byte[] data, bool reliable, ConnectionId id) |
| Implements send method as defined in the interface. | |
| virtual void | Update () |
| Updates the call. Should be called around 30 times per second to move data from browser / native webrtc to this call object (and the used thread) | |
| void | Dispose () |
| Destroys the call object and released underlaying resources. | |
| void | SetVolume (double volume, ConnectionId remoteUserId) |
| Sets the volume. 0 = silent, 1 = full volume. Values outside this range might result in undefined behavior (platform dependent). | |
| bool | HasAudioTrack (ConnectionId remoteUserId) |
| True if the connection is sending an audio track. | |
| bool | HasVideoTrack (ConnectionId remoteUserId) |
| True if the connection is sending video. | |
| bool | IsMute () |
| Indicates if the sending audio is muted via the SetMute method. | |
| void | SetMute (bool val) |
| Mutes the outgoing audio. | |
| int | GetBufferedAmount (ConnectionId id, bool reliable) |
| Experimental. For testing only. Might be removed again. | |
| void | Disconnect (ConnectionId id) |
| Disconnects a specific call only. | |
Protected Member Functions | |
| void | Initialize (IMediaNetwork network) |
| Needs to be called by the subclass. | |
| virtual void | StopListeningInternal () |
| Stops new incoming calls. | |
| virtual void | HandleMediaEvents () |
| Called after HandleNetworkEvents and before Flush. It will handle the video frames and subclasses can use it to handle additional video or audio data. | |
| virtual void | HandleNetworkEvent (NetworkEvent evt) |
| Method is called to handle the network events triggered by the internal media network and trigger related event handlers for the call object. | |
| void | TriggerCallEvent (CallEventArgs args) |
| Will send out data to the user. | |
| virtual void | Dispose (bool disposing) |
| Destroys the call. | |
Protected Attributes | |
| NetworkConfig | mNetworkConfig = new NetworkConfig() |
| Used network configuration. | |
| MediaConfig | mMediaConfig = null |
| Media configuration or null if no media is configured. != null doesn't mean the configuration was accepted. | |
| IMediaNetwork | mNetwork |
| Local media network doing all the hard work. | |
| List< ConnectionId > | mConnectionIds = new List<ConnectionId>() |
| Keeps track of all connected users. | |
| Dictionary< ConnectionId, string > | mPendingOutgoingCalls = new Dictionary<ConnectionId, string>() |
| Calls that are currently attempted but haven't been accepted yet. | |
| bool | mPendingStopListen = false |
| Set to true if the user requests to stop listening to correctly handle the following ServerStop event. If this is true a StopServer event is expected and returned as event. If this is false a StopServer event is treated as an error (disconnected from signaling server). | |
Properties | |
| ListeningState | ListeningState [get] |
| Gets the current listening state of the call. Inactive - if we don't allow incoming connections / wait for calls. RequestingAddress - if we are waiting for a server response weather can can use a specific address Listening - if we are listening on an address and waiting for a connection. | |
| MediaConfigState | MediaState [get] |
| Returns the current media configuration state. | |
| bool | IsDisposed [get] |
| Will return true after Dispose is called. Just for testing. Software should be designed to never need this. | |
| bool | LocalFrameEvents [get, set] |
| Set to true to block delivery of local frames to increase performance. | |
| bool | InCall [get] |
| Returns true if there is at least one active connection. | |
| bool | HasPendingOutgoingCalls [get] |
| True if there are outgoing calls pending. | |
Events | |
| CallEventHandler | CallEvent |
| Event handler. All call events are delivered via this event handler. | |
Events inherited from Byn.Awrtc.ICall | |
| CallEventHandler | CallEvent |
| Event handler. Returns all events from new accepted calls to frame updates of the local and remote camera. | |
Abstract base call class. Used for shared functionality between all platforms.
| Byn.Awrtc.AWebRtcCall.AWebRtcCall | ( | NetworkConfig | config = null | ) |
Creates a new call using a given NetworkConfig object.
| config | NetworkConfig deciding url of the signaling server + WebRTC ice servers. |
|
virtual |
Starts an outgoing call. Only supported in direct mode. Use Listen to connect in conference mode no matter if ingoing or outgoing.
| address |
Implements Byn.Awrtc.ICall.
|
virtual |
Configures the camera/audio devices used for the call.
| config |
Implements Byn.Awrtc.ICall.
| void Byn.Awrtc.AWebRtcCall.Disconnect | ( | ConnectionId | id | ) |
Disconnects a specific call only.
| id | ConnectionId for the call to disconnect. |
Implements Byn.Awrtc.ICall.
|
protectedvirtual |
Destroys the call.
| disposing |
| int Byn.Awrtc.AWebRtcCall.GetBufferedAmount | ( | ConnectionId | id, |
| bool | reliable ) |
Experimental. For testing only. Might be removed again.
Implements Byn.Awrtc.ICall.
|
protectedvirtual |
Method is called to handle the network events triggered by the internal media network and trigger related event handlers for the call object.
| evt |
| bool Byn.Awrtc.AWebRtcCall.HasAudioTrack | ( | ConnectionId | remoteUserId | ) |
True if the connection is sending an audio track.
| remoteUserId |
Implements Byn.Awrtc.ICall.
| bool Byn.Awrtc.AWebRtcCall.HasVideoTrack | ( | ConnectionId | remoteUserId | ) |
True if the connection is sending video.
| remoteUserId |
Implements Byn.Awrtc.ICall.
| bool Byn.Awrtc.AWebRtcCall.IsMute | ( | ) |
Indicates if the sending audio is muted via the SetMute method.
Note: If the OS or hardware mutes the audio or the audio source simply returns silence this method will not return true!
Implements Byn.Awrtc.ICall.
|
virtual |
| void Byn.Awrtc.AWebRtcCall.Send | ( | byte[] | data, |
| bool | reliable ) |
Sends data to all connections using a set channel.
| data | |
| reliable |
Implements Byn.Awrtc.ICall.
| bool Byn.Awrtc.AWebRtcCall.Send | ( | byte[] | data, |
| bool | reliable, | ||
| ConnectionId | id ) |
Implements send method as defined in the interface.
| data | |
| reliable | |
| id |
Implements Byn.Awrtc.ICall.
| void Byn.Awrtc.AWebRtcCall.Send | ( | string | message | ) |
| void Byn.Awrtc.AWebRtcCall.Send | ( | string | message, |
| bool | reliable ) |
Sends a text message to all connected peers.
| message | Any text message |
| reliable | Set false for sending messages unreliably |
Implements Byn.Awrtc.ICall.
| bool Byn.Awrtc.AWebRtcCall.Send | ( | string | message, |
| bool | reliable, | ||
| ConnectionId | id ) |
Send a string to a specific receiver using a set channel.
| message | |
| reliable | |
| id |
Implements Byn.Awrtc.ICall.
| void Byn.Awrtc.AWebRtcCall.SetMute | ( | bool | val | ) |
| void Byn.Awrtc.AWebRtcCall.SetVolume | ( | double | volume, |
| ConnectionId | remoteUserId ) |
Sets the volume. 0 = silent, 1 = full volume. Values outside this range might result in undefined behavior (platform dependent).
| volume | Value between 0 and 1. |
| remoteUserId | ConnectionId this value applies to. |
Implements Byn.Awrtc.ICall.
|
virtual |
Stops the call from accepting any new connections. This is for use in conference mode only.
StopListening is always safe to call.
Implements Byn.Awrtc.ICall.
|
protected |
Will send out data to the user.
| args |
|
virtual |
Updates the call. Should be called around 30 times per second to move data from browser / native webrtc to this call object (and the used thread)
Implements Byn.Awrtc.ICall.
|
get |
Gets the current listening state of the call. Inactive - if we don't allow incoming connections / wait for calls. RequestingAddress - if we are waiting for a server response weather can can use a specific address Listening - if we are listening on an address and waiting for a connection.
Note this component reflects the state when the Update method was last called.
|
getset |
Set to true to block delivery of local frames to increase performance.
Implements Byn.Awrtc.ICall.