-
- All Implemented Interfaces:
-
com.glia.androidsdk.internal.EventEmitter
public class ConnectionChannel implements EventEmitter
ConnectionChannel is a wrapper around signaling channel, that ensures that participants can communicate only if their connection ID matches. It is needed as one Medra instance might have several connections during a lifetime.
-
-
Constructor Summary
Constructors Constructor Description ConnectionChannel(EventEmitter channel, Double localId, Double remoteId)
-
Method Summary
Modifier and Type Method Description voidemit(String evenName, JSONObject message)voidemit(String evenName, Double message)synchronized voidon(String eventName, EventEmitter.MessageListener messageListener)synchronized voidoff(String eventName, EventEmitter.MessageListener messageListener)ConnectionChannellocalFiber(double separator)Creates a fiber (sub-channel) that only receives and sends messagesto a remote participant remote fiber with the same separator. ConnectionChannelremoteFiber(double separator)Creates a fiber (sub-channel) that only receives and sends messagesto a remote participant local fiber with the same separator. StringtoString()-
-
Constructor Detail
-
ConnectionChannel
ConnectionChannel(EventEmitter channel, Double localId, Double remoteId)
-
-
Method Detail
-
emit
void emit(String evenName, JSONObject message)
-
on
synchronized void on(String eventName, EventEmitter.MessageListener messageListener)
-
off
synchronized void off(String eventName, EventEmitter.MessageListener messageListener)
-
localFiber
ConnectionChannel localFiber(double separator)
Creates a fiber (sub-channel) that only receives and sends messagesto a remote participant remote fiber with the same separator.Used to send local audio/video to remote participant.
- Parameters:
separator- Shared separator
-
remoteFiber
ConnectionChannel remoteFiber(double separator)
Creates a fiber (sub-channel) that only receives and sends messagesto a remote participant local fiber with the same separator.Used to receive remote audio/video from remote participant.
- Parameters:
separator- Shared separator
-
-
-
-