Media.ElThe HTML media element interface.
Warning. This binding is incomplete, the modules El.Audio_track, El.Video_track, El.Text_track are mostly empty.
module Error : sig ... endMedia errors
module Can_play : sig ... endCan play enum.
module Have : sig ... endReady state codes.
module Network : sig ... endNetwork state codes.
module Cors : sig ... endCORS settings
module Provider : sig ... endMedia providers.
module Audio_track : sig ... endAudio tracks (incomplete).
module Video_track : sig ... endVideo tracks (incomplete).
module Text_track : sig ... endText tracks (incomplete).
module Time_ranges : sig ... endTime ranges.
The type for elements satifying the HTMLMediaElement interface.
of_el e is the media interface of e. This throws a JavaScript error if e is not a Brr.El.audio or Brr.El.video element.
src m is the URI source of the played media.
val src_object : t -> Provider.t optionsrc_object m s is the source object of m.
val set_src_object : t -> Provider.t option -> unitset_src_object m o sets the src_object of m to o.
current_src m is the current source of m.
cross_origin m is the CORS setting of m.
set_cross_origin m c sets the cross_origin of m to c.
network_state m is the network state of m.
val buffered : t -> Time_ranges.tbuffered m are the ranges of media that are buffered:
val can_play_type : t -> Jstr.t -> Can_play.tcan_play_type m t indicates if m can play t.
val seeking : t -> boolseeking m indicates m is seeking a new position.
val current_time_s : t -> floatcurrent_time m is the current time of m.
val set_current_time_s : t -> float -> unitset_current_time_s m t sets the current_time_s of m to t.
val default_playback_rate : t -> floatdefault_playback_rate m is the default playback rate of m.
val set_default_playback_rate : t -> float -> unitset_default_playback_rate m sets the default_playback_rate of m.
val playback_rate : t -> floatplayback_rate m is the playback rate of m.
val set_playback_rate : t -> float -> unitset_playback_rate m sets the playback_rate of m.
val played : t -> Time_ranges.tplayed m are the ranges that have been played.
val seekable : t -> Time_ranges.tseekable m indicates the time ranges that are seekable.
val play : t -> unit Fut.or_errorplay m plays m.
val default_muted : t -> booldefault_muted m is the default muted state.
val set_default_muted : t -> bool -> unitset_default_muted m b sets the default_muted of m to b.
val audio_track_list : t -> Audio_track.List.taudio_track_list m are the audio tracks of m.
val video_track_list : t -> Video_track.List.tvideo_track_list m are the video tracks of m.
val text_track_list : t -> Text_track.List.ttext_trac_list m are the text tracks of m.
capture_tream m is a media stream for m.