src/nodejs/jswebrtc

Search:
Group by:

WebRTC for Nim https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API

  • When reading documentation of this module "ICE" means "Interactive Connectivity Establishments".
  • The WebRTC API is very big and very complicated, for simple things maybe try WebSockets ?.
  • The WebRTC API has some parts that are still in Experimental state in the JavaScript side.
  • The WebRTC API is very poorly documented in general from the JavaScript side.

Types

MediaStream = ref object of JsRoot
  active*: bool              ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/active
  id*: cstring               ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/id
  
https://developer.mozilla.org/en-US/docs/Web/API/MediaStream
MediaStreamTrack = ref object of JsRoot
  contentHint*: cstring      ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/contentHint
  enabled*: bool             ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/enabled
  id*: cstring               ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/id
  kind*: cstring             ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/kind
  label*: cstring            ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/label
  muted*: bool               ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/muted
  readyState*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/readyState
  remote*: bool              ## https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/remote
  
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack
MediaTrackConstraints = ref object of JsRoot
  aspectRatio*: SomeNumber or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/aspectRatio
  autoGainControl*: bool     ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/autoGainControl
  channelCount*: int         ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/channelCount
  deviceId*: JsObject        ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/deviceId
  displaySurface*: cstring or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/displaySurface
  echoCancellation*: bool    ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/echoCancellation
  facingMode*: cstring or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/facingMode
  frameRate*: SomeNumber or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/frameRate
  groupId*: cstring or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/groupId
  height*: SomeNumber        ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/height
  latency*: SomeNumber or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/latency
  logicalSurface*: bool or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/logicalSurface
  noiseSuppression*: bool    ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/noiseSuppression
  sampleRate*: SomeNumber    ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/sampleRate
  sampleSize*: SomeNumber    ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/sampleSize
  volume*: SomeNumber or JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/volume
  width*: SomeNumber         ## https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/width
  
https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints
MediaTrackSettings = ref object of JsRoot
  aspectRatio*: SomeNumber or JsObject
  autoGainControl*: bool
  channelCount*: int
  deviceId*: JsObject
  displaySurface*: cstring or JsObject
  echoCancellation*: bool
  facingMode*: cstring or JsObject
  frameRate*: SomeNumber or JsObject
  groupId*: cstring or JsObject
  height*: SomeNumber
  latency*: SomeNumber or JsObject
  logicalSurface*: bool or JsObject
  noiseSuppression*: bool
  sampleRate*: SomeNumber
  sampleSize*: SomeNumber
  volume*: SomeNumber or JsObject
  width*: SomeNumber
RTCDataChannel = ref object of JsRoot
  binaryType*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/binaryType
  bufferedAmount*: int       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/bufferedAmount
  bufferedAmountLowThreshold*: int ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/bufferedAmountLowThreshold
  id*: uint                  ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/id
  label*: cstring            ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/label
  maxPacketLifeTime*: int    ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/maxPacketLifeTime
  maxRetransmits*: int       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/maxRetransmits
  negotiated*: bool          ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/negotiated
  ordered*: bool             ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/ordered
  protocol*: cstring         ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/protocol
  readyState*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/readyState
  reliable*: bool            ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/reliable
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel
RTCDataChannelEvent = ref object of JsRoot
  channel*: RTCDataChannel   ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelEvent/channel
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelEvent
RTCDtlsTransport = ref object of JsRoot
  iceTransport*: RTCIceTransport ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDtlsTransport/iceTransport
  state*: cstring            ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDtlsTransport/state
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCDtlsTransport
RTCDTMFSender = ref object of JsRoot
  toneBuffer*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFSender/toneBuffer
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFSender
RTCDTMFToneChangeEvent = ref object of JsRoot
  tone*: cstring             ## https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFToneChangeEvent/tone
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFToneChangeEvent
RTCError = ref object of JsRoot
  errorDetail*: cstring      ## https://developer.mozilla.org/en-US/docs/Web/API/RTCError/errorDetail
  receivedAlert*: uint       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCError/receivedAlert
  sctpCauseCode*: uint       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCError/sctpCauseCode
  sdpLineNumber*: uint       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCError/sdpLineNumber
  sentAlert*: uint           ## https://developer.mozilla.org/en-US/docs/Web/API/RTCError/sentAlert
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCError
RTCErrorEvent = ref object of JsRoot
  error*: RTCError           ## https://developer.mozilla.org/en-US/docs/Web/API/RTCErrorEvent/error
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCErrorEvent
RTCIceCandidate = ref object of JsRoot
  address*: cstring          ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/address
  candidate*: cstring        ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/candidate
  component*: cstring        ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/component
  foundation*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/foundation
  port*: uint16              ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/port
  priority*: uint            ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/priority
  protocol*: cstring         ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/protocol
  relatedAddress*: cstring   ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/relatedAddress
  relatedPort*: uint16       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/relatedPort
  sdpMid*: cstring           ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/sdpMid
  sdpMLineIndex*: int        ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/sdpMLineIndex
  tcpType*: cstring          ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/tcpType
  `type`*: cstring           ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/type
  usernameFragment*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/usernameFragment
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate
RTCIceCandidatePair = ref object of JsRoot
  local*: RTCIceCandidate    ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePair/local
  remote*: RTCIceCandidate   ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePair/remote
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePair
RTCIceParameters = ref object of JsRoot
  password*: cstring         ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceParameters/password
  usernameFragment*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceParameters/usernameFragment
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCIceParameters
RTCIceTransport = ref object of JsRoot
  component*: cstring        ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceTransport/component
  gatheringState*: cstring   ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceTransport/gatheringState
  role*: cstring             ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceTransport/role
  state*: cstring            ## https://developer.mozilla.org/en-US/docs/Web/API/RTCIceTransport/state
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCIceTransport
RTCIdentityAssertion = ref object of JsRoot
  idp*: cstring              ## ?
  name*: cstring             ## ?
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCIdentityAssertion
RTCPeerConnection = ref object of JsRoot
  canTrickleIceCandidates*: bool ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/canTrickleIceCandidates
  connectionState*: cstring  ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/connectionState
  currentLocalDescription*: JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/currentLocalDescription
  currentRemoteDescription*: JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/currentRemoteDescription
  iceConnectionState*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/iceConnectionState
  iceGatheringState*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/iceGatheringState
  localDescription*: JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/localDescription
  peerIdentity*: Future[RTCIdentityAssertion] ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/peerIdentity
  pendingLocalDescription*: RTCSessionDescription ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/pendingLocalDescription
  pendingRemoteDescription*: RTCSessionDescription ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/pendingRemoteDescription
  remoteDescription*: RTCSessionDescription ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/remoteDescription
  sctp*: RTCSctpTransport    ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/sctp
  signalingState*: cstring   ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/signalingState
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection
RTCPeerConnectionIceErrorEvent = ref object of JsRoot
  address*: cstring          ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/address
  errorCode*: uint           ## ?
  errorText*: cstring        ## ?
  port*: uint16              ## ?
  url*: cstring              ## ?
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent = ref object of JsRoot
  candidate*: RTCIceCandidate ## https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceEvent/candidate
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceEvent
RTCRtcpParameters = ref object of JsRoot
  cname*: cstring            ## ?
  reducedSize*: bool         ## ?
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtcpParameters
RTCRtpCapabilities = ref object of JsRoot
  codecs*: seq[RTCRtpCodecCapability] ## ?
  headerExtensions*: seq[JsObject] ## ?
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpCapabilities
RTCRtpCodecCapabilities = ref object of JsRoot
RTCRtpCodecCapability = ref object of JsRoot
  channels*: uint            ## ?
  clockRate*: uint           ## ?
  mimetype*: cstring         ## ?
  sdpFmtpLine*: cstring      ## ?
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpCodecCapability
RTCRtpContributingSource = ref object of JsRoot
  audioLevel*: float         ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpContributingSource/audioLevel
  rtpTimestamp*: int         ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpContributingSource/rtpTimestamp
  source*: uint32            ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpContributingSource/source
  timestamp*: Node           ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpContributingSource/timestamp
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpContributingSource
RTCRtpEncodingParameters = ref object of JsRoot
  active*: bool              ## ?
  codecPayloadType*: cstring or int ## ?
  dtx*: cstring              ## ?
  maxBitrate*: uint          ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters/maxBitrate
  maxFramerate*: float       ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters/maxFramerate
  scaleResolutionDownBy*: float ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters/scaleResolutionDownBy
  ptime*: uint               ## ?
  rid*: cstring              ## ?
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters
RTCRtpReceiveParameters = ref object of JsRoot
  codecs*: seq[RTCRtpCodecCapability] ## ?
  headerExtensions*: seq[JsObject] ## ?
  rtcp*: RTCRtcpParameters
RTCRtpReceiver = ref object of JsRoot
  track*: MediaStreamTrack   ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/track
  transport*: RTCDtlsTransport ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/transport
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver
RTCRtpSender = ref object of JsRoot
  dtmf*: RTCDTMFSender       ## ?
  track*: MediaStreamTrack   ## ?
  transport*: RTCDtlsTransport ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/transport
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender
RTCRtpSendParameters = ref object of JsRoot
  encodings*: seq[RTCRtpEncodingParameters] ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSendParameters/encodings
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSendParameters
RTCRtpTransceiver = ref object of JsRoot
  currentDirection*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/currentDirection
  direction*: cstring        ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/direction
  mid*: cstring              ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/mid
  receiver*: RTCRtpReceiver  ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/receiver
  sender*: RTCRtpSender      ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/sender
  stopped*: bool             ## https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stopped
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver
RTCSctpTransport = ref object of JsRoot
  state*: cstring            ## https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport/state
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport
RTCSessionDescription = ref object of JsRoot
  sdp*: cstring              ## https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/sdp
  `type`*: cstring           ## https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/type
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription
RTCTrackEvent = ref object of JsRoot
  receiver*: RTCRtpTransceiver ## https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/receiver
  streams*: seq[MediaStream] ## https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/streams
  track*: MediaStreamTrack   ## https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/track
  transceiver*: RTCRtpTransceiver ## https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/transceiver
  
https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent

Procs

func addIceCandidate(self: RTCPeerConnection; candidate: RTCIceCandidate): Future[
    void] {.importcpp, ...raises: [], tags: [], forbids: [].}
func addIceCandidate(self: RTCPeerConnection; candidate: RTCIceCandidate;
                     successCallback, failureCallback: auto): Future[void] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func addIceCandidate(self: RTCPeerConnection; candidate: RTCIceCandidate;
                     successCallback: auto): Future[void] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func addStream(self: RTCPeerConnection; mediaStream: MediaStream) {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func addTrack(self: MediaStream; track: MediaStreamTrack) {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func addTrack(self: RTCPeerConnection; track: MediaStreamTrack): RTCRtpSender {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func addTrack(self: RTCPeerConnection; track: MediaStreamTrack;
              streams: MediaStream): RTCRtpSender {.varargs, importcpp,
    ...raises: [], tags: [], forbids: [].}
func addTransceiver(self: RTCPeerConnection; trackOrKind: MediaStreamTrack): RTCRtpTransceiver {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func addTransceiver(self: RTCPeerConnection; trackOrKind: MediaStreamTrack;
                    init: auto): RTCRtpTransceiver {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func applyConstraints(self: MediaStreamTrack): Future[void] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func applyConstraints(self: MediaStreamTrack; constraints: MediaTrackConstraints): Future[
    void] {.importcpp, ...raises: [], tags: [], forbids: [].}
func clone(self: MediaStream): MediaStream {.importcpp, ...raises: [], tags: [],
    forbids: [].}
func clone(self: MediaStreamTrack): MediaStreamTrack {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func close(self: RTCPeerConnection or RTCDataChannel) {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func createAnswer(self: RTCPeerConnection): Future[void] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func createAnswer(self: RTCPeerConnection; options: JsObject): Future[void] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func createAnswer(self: RTCPeerConnection;
                  successCallback, failureCallback: auto): Future[void] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func createAnswer(self: RTCPeerConnection;
                  successCallback, failureCallback: auto; options: JsObject): Future[
    void] {.importcpp, ...raises: [], tags: [], forbids: [].}
func createDataChannel(self: RTCPeerConnection; label: cstring): RTCDataChannel {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func createDataChannel(self: RTCPeerConnection; label: cstring;
                       options: JsObject): RTCDataChannel {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func createOffer(self: RTCPeerConnection): Future[void] {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func createOffer(self: RTCPeerConnection; options: JsObject): Future[void] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func createOffer(self: RTCPeerConnection; successCallback, failureCallback: auto): Future[
    void] {.importcpp, ...raises: [], tags: [], forbids: [].}
func createOffer(self: RTCPeerConnection;
                 successCallback, failureCallback: auto; options: JsObject): Future[
    void] {.importcpp, ...raises: [], tags: [], forbids: [].}
func generateCertificate(self: RTCPeerConnection; keygenAlgorithm: cstring): RTCCertificate {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getAudioTracks(self: MediaStream): seq[MediaStreamTrack] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getCapabilities(self: MediaStreamTrack): JsObject {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func getCapabilities(self: RTCRtpSender or RTCRtpReceiver; kind: cstring): RTCRtpCapabilities {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getConfiguration(self: RTCPeerConnection): JsObject {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getConstraints(self: MediaStreamTrack): MediaTrackConstraints {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getContributingSources(self: RTCRtpReceiver): seq[RTCRtpContributingSource] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getIdentityAssertion(self: RTCPeerConnection): Future[cstring] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getLocalCandidates(self: RTCIceTransport): seq[RTCIceCandidate] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getLocalParameters(self: RTCIceTransport): RTCIceParameters {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getParameters(self: RTCRtpReceiver): RTCRtpReceiveParameters {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getParameters(self: RTCRtpSender): RTCRtpSendParameters {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getRemoteCandidates(self: RTCIceTransport): seq[RTCIceCandidate] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getRemoteParameters(self: RTCIceTransport): RTCIceParameters {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getSelectedCandidatePair(self: RTCIceTransport): RTCIceCandidatePair {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getSenders(self: RTCPeerConnection): seq[RTCRtpSender] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getSettings(self: MediaStreamTrack): MediaTrackSettings {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getStats(self: RTCPeerConnection or RTCRtpReceiver): Future[RTCStatsReport] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getStats(self: RTCPeerConnection; selector: MediaStreamTrack): Future[
    RTCStatsReport] {.importcpp, ...raises: [], tags: [], forbids: [].}
func getStats(self: RTCRtpSender): Future[RTCStatsReport] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getStream(self: RTCPeerConnection; id: cstring): MediaStream {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getSynchronizationSources(self: RTCRtpReceiver): seq[JsObject] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getTrackById(self: MediaStream; id: cstring): MediaStreamTrack {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getTracks(self: MediaStream): seq[MediaStreamTrack] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func getTransceivers(self: RTCPeerConnection): seq[RTCRtpTransceiver] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func getVideoTracks(self: MediaStream): seq[MediaStreamTrack] {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func insertDTMF(self: RTCDTMFSender; tones: cstring) {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func insertDTMF(self: RTCDTMFSender; tones: cstring; duration: 40 .. 6000) {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func insertDTMF(self: RTCDTMFSender; tones: cstring; duration: 40 .. 6000;
                interToneGap: 30 .. int.high) {.importcpp, ...raises: [], tags: [],
    forbids: [].}
func newMediaStream(): MediaStream {.importjs: "(new MediaStream())",
                                     ...raises: [], tags: [], forbids: [].}
func newMediaStream(stream: MediaStream): MediaStream {.
    importjs: "(new MediaStream(#))", ...raises: [], tags: [], forbids: [].}
func newMediaStream(tracks: seq[MediaStreamTrack]): MediaStream {.
    importjs: "(new MediaStream(#))", ...raises: [], tags: [], forbids: [].}
func newMediaTrackConstraints(): MediaTrackConstraints {.
    importjs: "(new MediaTrackConstraints())", ...raises: [], tags: [], forbids: [].}
func newMediaTrackSettings(): MediaTrackSettings {.
    importjs: "(new MediaTrackSettings())", ...raises: [], tags: [], forbids: [].}
func newRTCCertificate(): RTCCertificate {.importjs: "(new RTCCertificate())",
    ...raises: [], tags: [], forbids: [].}
func newRTCDataChannel(): RTCDataChannel {.importjs: "(new RTCDataChannel())",
    ...raises: [], tags: [], forbids: [].}
func newRTCDataChannelEvent(tipe: cstring; options: JsObject): RTCDataChannelEvent {.
    importjs: "(new RTCDataChannelEvent(#, #))", ...raises: [], tags: [],
    forbids: [].}
func newRTCDtlsTransport(): RTCDtlsTransport {.
    importjs: "(new RTCDtlsTransport())", ...raises: [], tags: [], forbids: [].}
func newRTCDTMFSender(): RTCDTMFSender {.importjs: "(new RTCDTMFSender())",
    ...raises: [], tags: [], forbids: [].}
func newRTCDTMFToneChangeEvent(tipe: cstring): RTCDTMFToneChangeEvent {.
    importjs: "(new RTCDTMFToneChangeEvent(#))", ...raises: [], tags: [],
    forbids: [].}
func newRTCDTMFToneChangeEvent(tipe: cstring; options: JsObject): RTCDTMFToneChangeEvent {.
    importjs: "(new RTCDTMFToneChangeEvent(#, #))", ...raises: [], tags: [],
    forbids: [].}
func newRTCError(): RTCError {.importjs: "(new RTCError())", ...raises: [],
                               tags: [], forbids: [].}
func newRTCErrorEvent(): RTCErrorEvent {.importjs: "(new RTCErrorEvent())",
    ...raises: [], tags: [], forbids: [].}
func newRTCIceCandidate(): RTCIceCandidate {.
    importjs: "(new RTCIceCandidate())", ...raises: [], tags: [], forbids: [].}
func newRTCIceCandidate(candidateInfo: JsObject): RTCIceCandidate {.
    importjs: "(new RTCIceCandidate(#))", ...raises: [], tags: [], forbids: [].}
func newRTCIceCandidatePair(): RTCIceCandidatePair {.
    importjs: "(new RTCIceCandidatePair())", ...raises: [], tags: [], forbids: [].}
func newRTCIceParameters(): RTCIceParameters {.
    importjs: "(new RTCIceParameters())", ...raises: [], tags: [], forbids: [].}
func newRTCIceTransport(): RTCIceTransport {.
    importjs: "(new RTCIceTransport())", ...raises: [], tags: [], forbids: [].}
func newRTCIdentityAssertion(): RTCIdentityAssertion {.
    importjs: "(new RTCIdentityAssertion())", ...raises: [], tags: [], forbids: [].}
func newRTCPeerConnection(): RTCPeerConnection {.
    importjs: "(new RTCPeerConnection(@))", ...raises: [], tags: [], forbids: [].}
func newRTCPeerConnection(configuration: JsObject): RTCPeerConnection {.
    importjs: "(new RTCPeerConnection(#))", ...raises: [], tags: [], forbids: [].}
func newRTCPeerConnectionIceErrorEvent(): RTCPeerConnectionIceErrorEvent {.
    importjs: "(new RTCPeerConnectionIceErrorEvent())", ...raises: [], tags: [],
    forbids: [].}
func newRTCPeerConnectionIceEvent(tipe: cstring): RTCPeerConnectionIceEvent {.importjs: "(new RTCPeerConnectionIceEvent(#, {candidate: null, url: null}))",
    ...raises: [], tags: [], forbids: [].}
func newRTCPeerConnectionIceEvent(tipe: cstring; options: JsObject): RTCPeerConnectionIceEvent {.
    importjs: "(new RTCPeerConnectionIceEvent(#, #))", ...raises: [], tags: [],
    forbids: [].}
func newRTCRtcpParameters(): RTCRtcpParameters {.
    importjs: "(new RTCRtcpParameters())", ...raises: [], tags: [], forbids: [].}
func newRTCRtpCapabilities(): RTCRtpCapabilities {.
    importjs: "(new RTCRtpCapabilities())", ...raises: [], tags: [], forbids: [].}
func newRTCRtpCodecCapabilities(): RTCRtpCodecCapabilities {.
    importjs: "(new RTCRtpCodecCapabilities())", ...raises: [], tags: [],
    forbids: [].}
func newRTCRtpCodecCapability(): RTCRtpCodecCapability {.
    importjs: "(new RTCRtpCodecCapability())", ...raises: [], tags: [], forbids: [].}
func newRTCRtpContributingSource(): RTCRtpContributingSource {.
    importjs: "(new RTCRtpContributingSource())", ...raises: [], tags: [],
    forbids: [].}
func newRTCRtpEncodingParameters(): RTCRtpEncodingParameters {.
    importjs: "(new RTCRtpEncodingParameters())", ...raises: [], tags: [],
    forbids: [].}
func newRTCRtpReceiveParameters(): RTCRtpReceiveParameters {.
    importjs: "(new RTCRtpReceiveParameters())", ...raises: [], tags: [],
    forbids: [].}
func newRTCRtpReceiver(): RTCRtpReceiver {.importjs: "(new RTCRtpReceiver())",
    ...raises: [], tags: [], forbids: [].}
func newRTCRtpSender(): RTCRtpSender {.importjs: "(new RTCRtpSender())",
                                       ...raises: [], tags: [], forbids: [].}
func newRTCRtpSendParameters(): RTCRtpSendParameters {.
    importjs: "(new RTCRtpSendParameters())", ...raises: [], tags: [], forbids: [].}
func newRTCRtpTransceiver(): RTCRtpTransceiver {.
    importjs: "(new RTCRtpTransceiver())", ...raises: [], tags: [], forbids: [].}
func newRTCSctpTransport(): RTCSctpTransport {.
    importjs: "(new RTCSctpTransport())", ...raises: [], tags: [], forbids: [].}
func newRTCSessionDescription(): RTCSessionDescription {.
    importjs: "(new RTCSessionDescription())", ...raises: [], tags: [], forbids: [].}
func newRTCSessionDescription(options: JsObject): RTCSessionDescription {.
    importjs: "(new RTCSessionDescription(#))", ...raises: [], tags: [],
    forbids: [].}
func newRTCStatsReport(): RTCStatsReport {.importjs: "(new RTCStatsReport())",
    ...raises: [], tags: [], forbids: [].}
func newRTCTrackEvent(tipe: cstring; options: JsObject): RTCTrackEvent {.
    importjs: "(new RTCTrackEvent(#, #))", ...raises: [], tags: [], forbids: [].}
func removeStream(self: RTCPeerConnection; mediaStream: MediaStream) {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func removeTrack(self: RTCPeerConnection; sender: RTCRtpSender) {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func replaceTrack(self: RTCRtpSender; newTrack: MediaStreamTrack): Future[
    MediaStreamTrack] {.importcpp, ...raises: [], tags: [], forbids: [].}
func restartIce(self: RTCPeerConnection) {.importcpp, ...raises: [], tags: [],
    forbids: [].}
func send(self: RTCDataChannel; data: string or Blob) {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func setCodecPreferences(self: RTCRtpReceiver;
                         codecs: seq[RTCRtpCodecCapability]) {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func setConfiguration(self: RTCPeerConnection; configuration: JsObject) {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func setIdentityProvider(self: RTCPeerConnection;
                         domainname, protocol, username: cstring) {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func setIdentityProvider(self: RTCPeerConnection; domainname, protocol: cstring) {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func setIdentityProvider(self: RTCPeerConnection; domainname: cstring) {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func setLocalDescription(self: RTCPeerConnection;
                         sessionDescription: RTCSessionDescription;
                         successCallback, errorCallback: auto): Future[cstring] {.
    importcpp, ...raises: [], tags: [], forbids: [].}
func setParameters(self: RTCRtpSender; parameters: RTCRtpSendParameters): Future[
    void] {.importcpp, ...raises: [], tags: [], forbids: [].}
func setRemoteDescription(self: RTCPeerConnection;
                          sessionDescription: RTCSessionDescription): Future[
    cstring] {.importcpp, ...raises: [], tags: [], forbids: [].}
func setStreams(self: RTCRtpSender) {.importcpp, ...raises: [], tags: [],
                                      forbids: [].}
func setStreams(self: RTCRtpSender; mediaStreams: MediaStream) {.importcpp,
    ...raises: [], tags: [], forbids: [].}
func stop(self: RTCRtpReceiver or MediaStreamTrack) {.importcpp, ...raises: [],
    tags: [], forbids: [].}
func toJSON(self: RTCSessionDescription or RTCIceCandidate): JsObject {.
    importcpp, ...raises: [], tags: [], forbids: [].}