Usecase: detect

detect

Detect


new detect()

Detection module

Returns:
Type
Promise.<ListDetections>
Example
usecases.detect()
    .then((detections) => {
        console.log(detections.detectBrowserCompatibility); // true
    })

Methods


detectBrowserCompatibility(browsers)

Detects if the browser is or not compatible with VideoRTC.js

Parameters:
Name Type Description
browsers object
Returns:
Type
boolean
Example
detections.detectBrowserCompatibility({chrome: true, firefox: true, opera: false, safari: false});

detectCamera()

Detects information about the local cameras connected

Returns:

{hasCamera: Boolean, videoDevices: Array, domainCameraPermissions: Boolean}

Type
object
Example
detections.detectCamera(); // {hasCamera: true, videoDevices: [], domainCameraPermissions: true}

detectMicrophone()

Detects information about the local microphones connected

Returns:

{hasMicrophone: Boolean, audioInputDevices: Array, domainMicrophonePermissions: Boolean}

Type
object
Example
detections.detectMicrophone(); // {hasMicrophone: true, audioInputDevices: [], domainMicrophonePermissions: true}

detectSpeakers()

Detects information about the speakers connected

Returns:

{hasSpeakers: Boolean, audioOutputDevices: Array}

Type
object
Example
detections.detectSpeakers(); // {hasSpeakers: true, audioOutputDevices: []}

getDetectionInfo()

Returns a detailed DetectRTC object with local browser features

Returns:

DetectRTC object

Type
object
Example
detections.getDetectionInfo();