
jsMain.webrtc.RTCPeerConnection.kt Maven / Gradle / Ivy
// Automatically generated - do not modify!
package webrtc
import js.core.ReadonlyArray
import js.core.Void
import web.crypto.Algorithm
import web.events.Event
import web.events.EventHandler
import web.events.EventTarget
import web.media.streams.MediaStream
import web.media.streams.MediaStreamTrack
import kotlin.js.Promise
external class RTCPeerConnection(
configuration: RTCConfiguration = definedExternally,
) : EventTarget {
val canTrickleIceCandidates: Boolean?
val connectionState: RTCPeerConnectionState
val currentLocalDescription: RTCSessionDescription?
val currentRemoteDescription: RTCSessionDescription?
val iceConnectionState: RTCIceConnectionState
val iceGatheringState: RTCIceGatheringState
val localDescription: RTCSessionDescription?
var onconnectionstatechange: EventHandler?
var ondatachannel: EventHandler?
var onicecandidate: EventHandler?
var onicecandidateerror: EventHandler?
var oniceconnectionstatechange: EventHandler?
var onicegatheringstatechange: EventHandler?
var onnegotiationneeded: EventHandler?
var onsignalingstatechange: EventHandler?
var ontrack: EventHandler?
val pendingLocalDescription: RTCSessionDescription?
val pendingRemoteDescription: RTCSessionDescription?
val remoteDescription: RTCSessionDescription?
val sctp: RTCSctpTransport?
val signalingState: RTCSignalingState
fun addIceCandidate(candidate: RTCIceCandidateInit = definedExternally): Promise
fun addTrack(
track: MediaStreamTrack,
vararg streams: MediaStream,
): RTCRtpSender
fun addTransceiver(
trackOrKind: MediaStreamTrack,
init: RTCRtpTransceiverInit = definedExternally,
): RTCRtpTransceiver
fun addTransceiver(
trackOrKind: String,
init: RTCRtpTransceiverInit = definedExternally,
): RTCRtpTransceiver
fun close()
fun createAnswer(options: RTCAnswerOptions = definedExternally): Promise
fun createDataChannel(
label: String,
dataChannelDict: RTCDataChannelInit = definedExternally,
): RTCDataChannel
fun createOffer(options: RTCOfferOptions = definedExternally): Promise
fun getConfiguration(): RTCConfiguration
fun getReceivers(): ReadonlyArray
fun getSenders(): ReadonlyArray
fun getStats(selector: MediaStreamTrack? = definedExternally): Promise
fun getTransceivers(): ReadonlyArray
fun removeTrack(sender: RTCRtpSender)
fun restartIce()
fun setConfiguration(configuration: RTCConfiguration = definedExternally)
fun setLocalDescription(description: RTCLocalSessionDescriptionInit = definedExternally): Promise
fun setRemoteDescription(description: RTCSessionDescriptionInit): Promise
companion object {
fun generateCertificate(keygenAlgorithm: Algorithm): Promise
fun generateCertificate(keygenAlgorithm: String): Promise
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy