package brr

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

Module Media.TrackSource

Media stream tracks.

Enumerations and properties

Sourcemodule State : sig ... end

Track state enumeration.

Sourcemodule Kind : sig ... end

Track kind enumeration.

Sourcemodule Prop : sig ... end

Track properties

Tracks

Sourcetype t

The type for MediaStreamTrack objects.

Sourceval as_target : t -> Brr.Ev.target

as_target t is t as an event target.

Sourceval id : t -> Jstr.t

id t is the unique identifier of t.

Sourceval isolated : t -> bool

isolated t is the isolation status of t.

Sourceval kind : t -> Kind.t

kind is the kind of t.

Sourceval label : t -> Jstr.t

label t is the label of t.

Sourceval muted : t -> bool

muted t is true if t is muted. Use set_enabled to manually mute and unmute a track. Use events Ev.mute and Ev.unmute to monitor mute status.

Sourceval ready_state : t -> State.t

ready_state t is the status of the track. Use event Ev.ended to monitor ready state.

Sourceval enabled : t -> bool

enabled t is true if the track is allowed to render the source and false if it's not. Use set_enabled to control this.

Sourceval set_enabled : t -> bool -> unit

set_enabled t b sets the track enabled status to b. If the track has been disconnected this has no effect.

Sourceval get_capabilities : t -> Capabilities.t

get_capabilities t are the capabilities of t.

Sourceval get_constraints : t -> Constraints.t

get_constraints t are the constraints of t.

Sourceval apply_constraints : t -> Constraints.t option -> unit Fut.or_error

apply_contraints t applies the applies the given contraints. Constraints unspecified are restored to their default value. If no contraints are given all contraints are restored to their defaults.

Sourceval get_settings : t -> Settings.t

get_settings t are the settings of t.

Sourceval stop : t -> unit

stop t stops the track.

Sourceval clone : t -> t

clone t creates a copy of t equal to it except for its id.

Events

Sourcemodule Ev : sig ... end

Track events.