Interface BrowserBehavior

interface BrowserBehavior {
    deviceName(): string;
    hasChromiumWebRTC(): boolean;
    hasFirefoxWebRTC(): boolean;
    isSupported(): boolean;
    majorVersion(): number;
    name(): string;
    osName(): string;
    osVersion(): string;
    requiresBundlePolicy(): RTCBundlePolicy;
    requiresCheckForSdpConnectionAttributes(): boolean;
    requiresIceCandidateGatheringTimeoutWorkaround(): boolean;
    requiresNoExactMediaStreamConstraints(): boolean;
    supportedVideoCodecs(): Promise<string[]>;
    supportsCanvasCapturedStreamPlayback(): boolean;
    supportsSetSinkId(): boolean;
    supportString(): string;
    updateWithHighEntropyValues(alwaysOverride: true): Promise<void>;
    version(): string;
}

Hierarchy (View Summary)

Implemented by

Methods

  • Returns the device name/model. Returns empty string if not available.

    Returns string

  • Returns whether the browser has a Chromium WebRTC implementation

    Returns boolean

  • Returns whether the browser has a Firefox WebRTC implementation

    Returns boolean

  • Returns whether the browser is supported

    Returns boolean

  • Returns the major version of the detected browser

    Returns number

  • Returns the browser name

    Returns string

  • Returns the operating system name. Returns empty string if not available.

    Returns string

  • Returns the operating system version. Returns empty string if not available.

    Returns string

  • Returns the bundle policy for the browser

    Returns RTCBundlePolicy

  • Returns whether it is needed to check connection attributes in SDP

    Returns boolean

  • Returns whether the browser requires an ICE connection gathering timeout workaround

    Returns boolean

  • Returns whether the keyword "exact" should be omitted in a MediaStreamConstraints object

    Returns boolean

  • Returns the supported codecs

    Returns Promise<string[]>

  • Returns whether browser supports the playback of canvas-captured stream.

    Returns boolean

  • Returns whether browser supports setSinkId operation

    Returns boolean

  • Returns the browser support string

    Returns string

  • Updates internal values using the User-Agent Client Hints API. If the API is not available, resolves without making changes.

    Parameters

    • alwaysOverride: true

      indicates if the values should be updated even if they were already set. Examples of value changes:

      • osName: "Mac OS" → "macOS"
      • osVersion: "10.15" → "15.7.1"
      • browserName: "Chrome" → "Google Chrome"
      • browserVersion: "120.0.0.0" → "120.0.6099.129"

    Returns Promise<void>

    Promise that resolves when update is complete

  • Returns the version string of the detected browser

    Returns string