Android SDK API Reference
|
Alternative class as MediaConnection. More...
Inherits io.skyway.Peer.BaseConnection.
Classes | |
enum | MediaEventEnum |
Media event type. More... | |
Public Member Functions | |
void | on (MediaEventEnum event, OnCallback callback) |
Set callbacks for media connection events. More... | |
void | answer (MediaStream stream, AnswerOption option) |
When receiving a call event on a peer, you can call .answer on the media connection provided by the callback to accept the call with MediaStream and options. More... | |
void | answer (MediaStream stream) |
When receiving a call event on a peer, you can call .answer on the media connection provided by the callback to accept the call with MediaStream. More... | |
void | answer () |
When receiving a call event on a peer, you can call .answer on the media connection provided by the callback to accept the call. More... | |
void | close () |
Closes the MediaConnection. More... | |
void | close (boolean forceClose) |
Closes the MediaConnection with the forceClose option. More... | |
void | replaceStream (MediaStream stream) |
Change the MediaStream that is being sent. More... | |
void | getStats (StatsCollectorCallback callback) |
Get statistics of the connection. More... | |
String | peer () |
Get a peer ID. More... | |
String | type () |
Get a connection type. More... | |
String | label () |
Get a connection's label. More... | |
boolean | isOpen () |
Get a connection open status. More... | |
String | connectionId () |
Connection ID. More... | |
String | metadata () |
Metadata string. More... | |
void | finalize () |
final Object | peerConnection () |
boolean | reliable () |
Data channel reliable. More... | |
SerializationEnum | serialization () |
Data channel serialization type. More... | |
Peer | provider () |
Parent Peer object. More... | |
final String | browser () |
final Peer.PeerTypeEnum | serverType () |
Static Public Member Functions | |
static String | getSerialization (SerializationEnum type) |
Convert serialization enum type to string. More... | |
static SerializationEnum | getSerializationEnum (String type) |
Convert string to serialization enum type. More... | |
Alternative class as MediaConnection.
void io.skyway.Peer.MediaConnection.answer | ( | ) |
void io.skyway.Peer.MediaConnection.answer | ( | MediaStream | stream | ) |
When receiving a call event on a peer, you can call .answer on the media connection provided by the callback to accept the call with MediaStream.
stream | MediaStream |
void io.skyway.Peer.MediaConnection.answer | ( | MediaStream | stream, |
AnswerOption | option | ||
) |
When receiving a call event on a peer, you can call .answer on the media connection provided by the callback to accept the call with MediaStream and options.
stream | MediaStream |
option | Answer Options |
|
inherited |
void io.skyway.Peer.MediaConnection.close | ( | ) |
Closes the MediaConnection.
Run the forceClose option as false. May be changed to true from a future version.
void io.skyway.Peer.MediaConnection.close | ( | boolean | forceClose | ) |
Closes the MediaConnection with the forceClose option.
forceClose | Set to true and the connection on remote peer will close immediately. When set to false, the connection on remote peer will close after the end of the ICE reconnect by the browser. |
String io.skyway.Peer.MediaConnection.connectionId | ( | ) |
Connection ID.
|
staticinherited |
Convert serialization enum type to string.
type | serialization enum type |
|
staticinherited |
Convert string to serialization enum type.
type | serialization type string |
void io.skyway.Peer.MediaConnection.getStats | ( | StatsCollectorCallback | callback | ) |
Get statistics of the connection.
callback | Callback. |
boolean io.skyway.Peer.MediaConnection.isOpen | ( | ) |
Get a connection open status.
String io.skyway.Peer.MediaConnection.label | ( | ) |
Get a connection's label.
String io.skyway.Peer.MediaConnection.metadata | ( | ) |
Metadata string.
void io.skyway.Peer.MediaConnection.on | ( | MediaEventEnum | event, |
OnCallback | callback | ||
) |
Set callbacks for media connection events.
event | Media connection event type to watch |
callback | Callback |
String io.skyway.Peer.MediaConnection.peer | ( | ) |
Get a peer ID.
|
inherited |
|
inherited |
|
inherited |
Data channel reliable.
void io.skyway.Peer.MediaConnection.replaceStream | ( | MediaStream | stream | ) |
Change the MediaStream that is being sent.
For example, you can use it to change the camera device or the image quality.
Note: It is not possible to change the state of a MediaStream from not sending to sending.You cannot change the state of MediaStream from not sending to sending and vice versa.
It is also not possible to interchange "MediaStream with either video or audio only" and "MediaStream with both video and audio".
stream | The stream to replace the old stream with. |
|
inherited |
Data channel serialization type.
|
inherited |
String io.skyway.Peer.MediaConnection.type | ( | ) |
Get a connection type.