package brr

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

Media stream tracks.

Enumerations and properties

module State : sig ... end

Track state enumeration.

module Kind : sig ... end

Track kind enumeration.

module Prop : sig ... end

Track properties

Tracks

type t

The type for MediaStreamTrack objects.

val as_target : t -> Brr.Ev.target

as_target t is t as an event target.

val id : t -> Jstr.t

id t is the unique identifier of t.

val isolated : t -> bool

isolated t is the isolation status of t.

val kind : t -> Kind.t

kind is the kind of t.

val label : t -> Jstr.t

label t is the label of t.

val 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.

val ready_state : t -> State.t

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

val 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.

val 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.

val get_capabilities : t -> Capabilities.t

get_capabilities t are the capabilities of t.

val get_constraints : t -> Constraints.t

get_constraints t are the constraints of t.

val 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.

val get_settings : t -> Settings.t

get_settings t are the settings of t.

val stop : t -> unit

stop t stops the track.

val clone : t -> t

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

Events

module Ev : sig ... end

Track events.

OCaml

Innovation. Community. Security.