Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebSocketTransport

WebSocket Transport for Janus API

export

Hierarchy

Index

Constructors

constructor

  • new WebSocketTransport(janus_websocket_url?: string, janus_protocol?: string): WebSocketTransport
  • Creates an instance of WebSocketTransport.

    memberof

    WebSocketTransport

    Parameters

    • Optional janus_websocket_url: string

      Janus API WebSocket URL

    • Optional janus_protocol: string

      Janus Protocol to use, could be 'janus-admin-protocol' or 'janus-protocol'

    Returns WebSocketTransport

Methods

dispose

  • dispose(): Promise<void>
  • Cleanup, important in order to prevent connection and memory leaks

    Returns Promise<void>

isAdminEndpoint

  • isAdminEndpoint(): boolean
  • True if this transport is pointing to Admin API

    Returns boolean

request

  • Executes a request against Janus API

    template

    ResponseT response type

    Type parameters

    • ResponseT

    Parameters

    Returns Promise<ResponseT>

waitForReady

  • waitForReady(): Promise<boolean>
  • Waits for the Transport to be ready

    Returns Promise<boolean>

Generated using TypeDoc