Media.Recorder
Media recorder.
See the MediaStream Recording API.
module Bitrate_mode : sig ... end
Bitrate mode enumeration.
module Recording_state : sig ... end
Recording state enumeration.
val is_type_supported : Jstr.t -> bool
is_type_supported t
is true
if recording to MIME type t
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.
The type for MediaRecorder
objects.
val state : t -> Recording_state.t
state r
is the recording state of r
.
val video_bps : t -> int
video_bps r
is the video encoding bit rate of s
.
val audio_bps : t -> int
audio_bps r
is the audio encoding bit rate of s
.
val audio_bitrate_mode : t -> Bitrate_mode.t
audio_bps r
is the audio encoding mode of s
.
val start : t -> timeslice_ms:int option -> (unit, Jv.Error.t) Stdlib.result
start r ~timeslice_ms
starts r
. timeslice_ms
indicates the number of milliseconds to record in each blob. If not specified the whole duration is in a single blob, unless request_data
is invoked to drive the process.
module Ev : sig ... end