<abstract> new P2PChannel(p2pElementProxy, request)
Parameters:
Name | Type | Description |
---|---|---|
p2pElementProxy |
olympe.net.api.P2PChannel | |
request |
olympe.net.P2PChannelRequest |
Members
-
<static> Type :number
-
types of p2p channel
Type:
- number
Properties:
Name Type Default Description DATA
number 1 MEDIA_STREAM
number 2
Methods
-
close()
-
Close the channel
-
getLocalId()
-
Returns:
the id of the local client
- Type
- string
-
<protected> getP2PProxyElement()
-
Returns:
The proxy element from the UI thread
-
getRemoteId()
-
Returns:
the id of the remote client
- Type
- string
-
isOpen()
-
Returns:
true if the channel is opened, false otherwise.
- Type
- boolean
-
open()
-
Open the channel itself
-
setCloseHandler(callback)
-
Sets the "close" event handler
Parameters:
Name Type Description callback
olympe.net.P2PChannel.CloseHandler -
setOpenHandler(callback)
-
Sets the "open" event handler
Parameters:
Name Type Description callback
olympe.net.P2PChannel.OpenHandler -
setSignalingCallbackHandler(callback)
-
Set the handler for signaling_callback events
Parameters:
Name Type Description callback
olympe.net.P2PChannel.SignalingCallbackHandler -
setup(operation)
-
Handle the signaling negotiation phases of the channel.
Parameters:
Name Type Description operation
olympe.net.SignalingOperation
Type Definitions
-
CloseHandler()
-
CloseHandler(remoteId)
-
OpenHandler()
-
OpenHandler(remoteId)
-
SignalingCallbackHandler()
-