package brr

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

Media streams.

module Constraints : sig ... end

Media stream constraints.

type t

The type for MediaStream objects.

val create : unit -> t

create () is a stream without tracks.

val of_stream : t -> t

of_stream s is a new stream which shares its tracks with s.

val of_tracks : Track.t list -> t

of_tracks ts is a stream with tracks ts.

val as_target : t -> Brr.Ev.target

as_target s is s as an event target.

val id : t -> Jstr.t

id s is a unique identifier for s.

val active : t -> bool

active s is true if s is active.

val get_audio_tracks : t -> Track.t list

get_audio_tracks s is the list of audio tracks of s.

val get_video_tracks : t -> Track.t list

get_video_tracks s is the list of video tracks of s.

val get_tracks : t -> Track.t list

get_tracks s is the list of tracks of s.

val get_track_by_id : t -> Jstr.t -> Track.t option

get_track_by_id s id finds the track identified by id (if any).

val add_track : t -> Track.t -> unit

add_track s t adds track t so s. If t was already in s nothing happens.

val remove_track : t -> Track.t -> unit

remove_track s t removes track t from s. If t was not in s nothing happens.

val clone : t -> t

clone s clones the tracks of s and s itself. It has the same parameters except for id.

Events

module Ev : sig ... end

Stream events

OCaml

Innovation. Community. Security.