Options
All
  • Public
  • Public/Protected
  • All
Menu

Webphone Lib

Index

Type aliases

IMediaOutput

IMediaOutput: IMediaDevice

InternalSession

InternalSession: Session & object

MediaDeviceId

MediaDeviceId: string | undefined

Type

Type<T>: object

Type parameters

  • T

Type declaration

UAFactory

UAFactory: function

Type declaration

    • (options: UserAgentOptions): UserAgent
    • Parameters

      • options: UserAgentOptions

      Returns UserAgent

Variables

Const Autoplay

Autoplay: AutoplaySingleton = new AutoplaySingleton()

Const Client

Client: ClientCtor = (function(clientOptions: IClientOptions) {const uaFactory = (options: UserAgentOptions) => {return new UserAgent(options);};const transportFactory = (factory: UAFactory, options: IClientOptions) => {return new ReconnectableTransport(factory, options);};const impl = new ClientImpl(uaFactory, transportFactory, clientOptions);createFrozenProxy(this, impl, ['attendedTransfer','connect','createPublisher','defaultMedia','disconnect','getSession','getSessions','invite','isConnected','on','once','reconfigure','removeAllListeners','removeListener','resubscribe','subscribe','unsubscribe']);} as any) as ClientCtor

Const Media

Media: MediaSingleton = new MediaSingleton()

Const audioContext

audioContext: AudioContext = createAudioContext()

Const hour

hour: number = 60 * minute

Const isChrome

isChrome: boolean = browserUa.indexOf('chrome') !== -1 && !isSafari && !isFirefox

Const isFirefox

isFirefox: boolean = browserUa.indexOf('firefox') !== -1 && browserUa.indexOf('chrome') < 0

Const isLocalhost

isLocalhost: boolean = ['127.0.0.1', 'localhost'].includes(window.location.hostname)

Const isSafari

isSafari: boolean = browserUa.indexOf('safari') !== -1 && browserUa.indexOf('chrome') < 0

Const log

log: Logger = new Logger('info')

Const millisecond

millisecond: 1 = 1

Const minute

minute: number = 60 * second

Const second

second: number = 1000 * millisecond

Functions

calculateMOS

  • calculateMOS(__namedParameters: object): number
  • Parameters

    • __namedParameters: object

    Returns number

    MOS value in range 0.0 (very bad) to 5.0 (very good)

checkAudioConnected

  • checkAudioConnected(session: UserAgentSession, __namedParameters: object): Promise<void>
  • Parameters

    • session: UserAgentSession
    • __namedParameters: object

    Returns Promise<void>

checkRequired

  • checkRequired(): boolean

clamp

  • clamp(value: number, min: number, max: number): number
  • Parameters

    • value: number
    • min: number
    • max: number

    Returns number

    Clamped value.

eqSet

  • eqSet<T>(a: Set<T>, b: Set<T>): boolean
  • Type parameters

    • T

    Parameters

    • a: Set<T>
    • b: Set<T>

    Returns boolean

fetchStream

  • fetchStream(url: string): Promise<function>
  • Parameters

    • url: string

    Returns Promise<function>

increaseTimeout

  • increaseTimeout(retry: any): any & object
  • Parameters

    • retry: any

    Returns any & object

    } The updated retry object.

isPrivateIP

  • isPrivateIP(ip: string): boolean

jitter

  • jitter(interval: number, percentage: number): number
  • Parameters

    • interval: number
    • percentage: number

    Returns number

    The calculated jitter in ms.

sessionDescriptionHandlerFactory

  • sessionDescriptionHandlerFactory(session: any, options: any): SessionDescriptionHandler

statusFromDialog

stripPrivateIps

  • stripPrivateIps(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>

Object literals

Const webaudio

webaudio: object

audioContext

audioContext: boolean = 'AudioContext' in window || 'webkitAudioContext' in window

getUserMedia

getUserMedia: boolean = mediaDevices && 'getUserMedia' in window.navigator.mediaDevices

mediaDevices

mediaDevices: boolean

setSinkId

setSinkId: boolean = 'Audio' in window && 'setSinkId' in new (window as any).Audio()

Const webrtc

webrtc: object

connectionstatechange

connectionstatechange: boolean = peerConnection && 'onconnectionstatechange' in RTCPeerConnection.prototype

peerConnection

peerConnection: boolean

Generated using TypeDoc