Module Media.Recorder
Media recorder.
See the MediaStream Recording API.
Enumerations
module Bitrate_mode : sig ... end
Bitrate mode enumeration.
module Recording_state : sig ... end
Recording state enumeration.
Recorder
val is_type_supported : Jstr.t -> bool
is_type_supported t
istrue
if recording to MIME typet
is supported.
val init : ?type':Jstr.t -> ?audio_bps:int -> ?video_bps:int -> ?bps:int -> ?audio_bitrate_mode:Bitrate_mode.t -> unit -> init
init ()
is a media recorder initialisation object with given parameters.
type t
The type for
MediaRecorder
objects.
val create : ?init:init -> Stream.t -> t
create ~init r
is a recorder fors
. The function raises if thetype'
of theinit
object is not supported.
val state : t -> Recording_state.t
state r
is the recording state ofr
.
val video_bps : t -> int
video_bps r
is the video encoding bit rate ofs
.
val audio_bps : t -> int
audio_bps r
is the audio encoding bit rate ofs
.
val audio_bitrate_mode : t -> Bitrate_mode.t
audio_bps r
is the audio encoding mode ofs
.
val start : t -> timeslice_ms:int option -> (unit, Jv.Error.t) Stdlib.result
start r ~timeslice_ms
startsr
.timeslice_ms
indicates the number of milliseconds to record in each blob. If not specified the whole duration is in a single blob, unlessrequest_data
is invoked to drive the process.
Events
module Ev : sig ... end