PeerConnection

open class PeerConnection

Java-land version of the PeerConnection APIs; wraps the C++ API http://www.webrtc.org/reference/native-apis, which in turn is inspired by the JS APIs: http://dev.w3.org/2011/webrtc/editor/webrtc.html and http://www.w3.org/TR/mediacapture-streams/

Constructors

Link copied to clipboard
constructor(factory: NativePeerConnectionFactory)
Wraps a PeerConnection created by the factory.

Types

Link copied to clipboard
Link copied to clipboard
Java version of PeerConnectionInterface.
Link copied to clipboard
Java version of PeerConnectionInterface.
Link copied to clipboard
Java version of PeerConnectionInterface.
Link copied to clipboard
Tracks PeerConnectionInterface::IceConnectionState
Link copied to clipboard
Tracks PeerConnectionInterface::IceGatheringState
Link copied to clipboard
open class IceServer
Java version of PeerConnectionInterface.IceServer.
Link copied to clipboard
Java version of PeerConnectionInterface.
Link copied to clipboard
enum KeyType
Java version of rtc::KeyType
Link copied to clipboard
interface Observer
Java version of PeerConnectionObserver.
Link copied to clipboard
Tracks PeerConnectionInterface::PeerConnectionState
Link copied to clipboard
Java version of webrtc::PortPrunePolicy
Link copied to clipboard
open class RTCConfiguration
Java version of PeerConnectionInterface.
Link copied to clipboard
Java version of PeerConnectionInterface.
Link copied to clipboard
Java version of webrtc::SdpSemantics.
Link copied to clipboard
Tracks PeerConnectionInterface::SignalingState
Link copied to clipboard
Java version of PeerConnectionInterface.
Link copied to clipboard
Tracks PeerConnectionInterface::TlsCertPolicy

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun addIceCandidate(candidate: IceCandidate): Boolean
open fun addIceCandidate(candidate: IceCandidate, observer: AddIceObserver)
Link copied to clipboard
open fun addStream(stream: MediaStream): Boolean
Adds a new MediaStream to be sent on this peer connection.
Link copied to clipboard
Adds a new media stream track to be sent on this peer connection, and returns the newly created RtpSender.
open fun addTrack(track: MediaStreamTrack, streamIds: List<String>): RtpSender
Link copied to clipboard
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun createAnswer(observer: SdpObserver, constraints: MediaConstraints)
Link copied to clipboard
Link copied to clipboard
open fun createOffer(observer: SdpObserver, constraints: MediaConstraints)
Link copied to clipboard
open fun createSender(kind: String, stream_id: String): RtpSender
Creates an RtpSender without a track.
Link copied to clipboard
open fun dispose()
Free native resources associated with this PeerConnection instance.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getStats(receiver: RtpReceiver, callback: RTCStatsCollectorCallback)
open fun getStats(sender: RtpSender, callback: RTCStatsCollectorCallback)
Gets stats using the new stats collection API, see webrtc/api/stats/.
open fun getStats(observer: StatsObserver, @Nullable track: MediaStreamTrack): Boolean
Link copied to clipboard
Link copied to clipboard
open fun removeStream(stream: MediaStream)
Removes the given media stream from this peer connection.
Link copied to clipboard
open fun removeTrack(sender: RtpSender): Boolean
Stops sending media from sender.
Link copied to clipboard
open fun restartIce()
Tells the PeerConnection that ICE should be restarted.
Link copied to clipboard
open fun setAudioPlayout(playout: Boolean)
Enables/disables playout of received audio streams.
Link copied to clipboard
open fun setAudioRecording(recording: Boolean)
Enables/disables recording of transmitted audio streams.
Link copied to clipboard
open fun setBitrate(min: Integer, current: Integer, max: Integer): Boolean
Limits the bandwidth allocated for all RTP streams sent by this PeerConnection.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun startRtcEventLog(file_descriptor: Int, max_size_bytes: Int): Boolean
Starts recording an RTC event log.
Link copied to clipboard
open fun stopRtcEventLog()
Stops recording an RTC event log.