The IMConnect interface is responsible for creating and managing connections (channels) and signaling within the WebRTC 2.0 architecture of the Medialooks SDK. It is implemented by MConnectClass objects. It's a part of the logic that is required to manage bi-directional video communication using the Medialooks MConnectClass (IMConnect), IMCChannel, and IMCChannelSGN.
Enum_Create
Creates an enumeration session for enumerating the existing channels.
Syntax
void Enum_Create(
string _bsEnumURL,
string _bsRemoteProps,
string _bsHints,
IMCChannelCallback _pCallback,
out IMCChannelSGN _ppMChannelSGN
)| Parameter | Description |
|---|---|
| _bsEnumURL |
Signaling server URL or connection endpoint. This is typically a URI in one of the following formats:
Example: "https://videosdk.medialooks.com:8080/Room/TestPC_enum" |
| _bsRemoteProps |
Remote peer properties in the string format with remote connection or ICE configuration parameters. Example: "username=test_user password=12345" |
| _bsHints | Optional JSON hints with extra initialization hints (mode, timeout, debug, etc.). |
| _pCallback | Pointer to the callback interface for asynchronous events. |
| _ppMChannelSGN | Output pointer that receives the created signaling channel MChannelSGN object. |
Example:
MConnectClass m_objServer = new MConnectClass();
m_objServer.Enum_Create("https://videosdk.medialooks.com:8080/Room999/Peer888_enum", "", " ", null, out IMCChannelSGN server_manager);Channel_Create
Creates a new connection channel which can be enumerated by Enum_Create method.
Syntax
void Channel_Create(
string _bsChannelUPI,
string _bsRemoteProps,
string _bsHints,
IMCChannelCallback _pCallback,
out MCChannel _ppMChannel
)| Parameter | Description |
|---|---|
| _bsChannelUPI |
Unique Peer Identifier. |
| _bsRemoteProps |
Remote peer properties. For example, specify if the channel is secured or not. Example: "secured='true'" |
| _bsHints | Hints for the channel creation |
| _pCallback | Callback interface for channel events |
| _ppMChannel | Output MCChannel object |
Example:
MConnectClass m_objServer = new MConnectClass();
String URL = "https://videosdk.medialooks.com:8080/Room6455/Streamer2744";
m_objServer.Channel_Create(URL, "username=test_user password=12345", "", null, out var chlPublisher);Channel_Connect
Connects to a specified channel if there are existing channels which can be enumerated by Enum_Create method.
Syntax
void Channel_Connect(
string _bsChannelUPI,
string _bsRemoteProps,
string _bsHints,
IMCChannelCallback _pCallback,
out MCChannel _ppMChannel
)| Parameter | Description |
|---|---|
| _bsChannelUPI | Unique Peer Identifier |
| _bsRemoteProps | Remote peer properties |
| _bsHints | Hints for the channel creation |
| _pCallback | Callback interface for channel events |
| _ppMChannel | Output MCChannel object |
Example:
String URL = "https://videosdk.medialooks.com:8080/Room6455/Streamer2744";
m_objServer.Channel_Connect(URL, "username=test_user password=12345", "", null, out var chReceiver);