Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebRTCSocket

Hierarchy

  • WebRTCSocket

Implements

Index

Constructors

constructor

Properties

Private _ee

_ee: EventEmitter<SocketEventSet> = new EventEmitter<SocketEventSet>()

Private _offerAccepted

_offerAccepted: boolean = false

Private _pendingCandidates

_pendingCandidates: (RTCIceCandidate | RTCIceCandidateInit)[] = []

Private _remoteId

_remoteId: any

Private configuration

configuration: RTCConfiguration

Private connection

connection: RTCPeerConnection

Private dataChannel

dataChannel: RTCDataChannel

Private debug

debug: boolean

Private relayClient

relayClient: UhstRelayClient

Private relayMessageStream

relayMessageStream: MessageStream

Private Optional sendUrl

sendUrl: undefined | string

Private token

token: string

Accessors

remoteId

  • get remoteId(): string

Methods

close

  • close(): void

Private configureDataChannel

  • configureDataChannel(): void

Private createConnection

  • createConnection(): RTCPeerConnection

Private handleConnectionStateChange

  • handleConnectionStateChange(ev: Event): void

Private handleIceCandidate

  • handleIceCandidate(ev: RTCPeerConnectionIceEvent): void

handleMessage

  • handleMessage(message: Message): void

Private initClient

  • initClient(hostId: string): Promise<void>

Private initHost

  • initHost(description: RTCSessionDescriptionInit): Promise<void>

off

  • off<EventName>(eventName: EventName, handler: SocketEventSet[EventName]): void

on

  • on<EventName>(eventName: EventName, handler: SocketEventSet[EventName]): void

once

  • once<EventName>(eventName: EventName, handler: SocketEventSet[EventName]): void

Private processIceCandidates

  • processIceCandidates(): void

send

  • send(message: string): Promise<any>
  • send(message: Blob): Promise<any>
  • send(message: ArrayBuffer): Promise<any>
  • send(message: ArrayBufferView): Promise<any>

Generated using TypeDoc