package brr

  1. Overview
  2. Docs
On This Page
  1. Events
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Media.DevicesSource

Media device enumeration.

Sourcetype t

The type for MediaDevices objects.

Sourceval of_navigator : Brr.Navigator.t -> t

of_navigator n provides access to media devices of n.

Sourceval as_target : t -> Brr.Ev.target

as_target m is m as an event target.

Sourceval enumerate : t -> Device.Info.t list Fut.or_error

enumerate m determines a list of connected media devices. Monitor changes by listening Ev.devicechange on m.

Sourceval get_supported_constraints : t -> Supported_constraints.t

get_supported_constraints m determines the media constraints the user agent understands.

get_user_media m c prompts the user to use a media input which can produce a media stream constrained by c. These errors can occur. In particular Jv.Error.Not_allowed and Jv.Error.Not_found should be reported to the user in a friendly way. In some browsers this call has to done in a user interface event handler.

Sourceval get_display_media : t -> Stream.Constraints.t -> Stream.t Fut.or_error

get_display_media m c prompts the user to select and grant permission to capture the contents of a display as a media stream. A video track is unconditionally returned even if c says otherwise. In some browsers this call has to done in a user interface event handler.

See this MDN article for more details.

Events

Sourcemodule Ev : sig ... end

Device events.