Module Media.Track
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
ist
as an event target.
val id : t -> Jstr.t
id t
is the unique identifier oft
.
val isolated : t -> bool
isolated t
is the isolation status oft
.
val muted : t -> bool
muted t
istrue
ift
is muted. Useset_enabled
to manually mute and unmute a track. Use eventsmute
andunmute
to monitor mute status.
val ready_state : t -> State.t
ready_state t
is the status of the track. Use eventended
to monitor ready state.
val enabled : t -> bool
enabled t
istrue
if the track is allowed to render the source andfalse
if it's not. Useset_enabled
to control this.
val set_enabled : t -> bool -> unit
set_enabled t b
sets the trackenabled
status tob
. If the track has been disconnected this has no effect.
val get_capabilities : t -> Capabilities.t
get_capabilities t
are the capabilities oft
.
val get_constraints : t -> Constraints.t
get_constraints t
are the constraints oft
.
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 oft
.
Events
module Ev : sig ... end
Track events.