pub trait HTMLMediaElementMethods<D: DomTypes> {
Show 45 methods
// Required methods
fn GetError(&self) -> Option<Root<Dom<MediaError>>>;
fn Src(&self) -> USVString;
fn SetSrc(&self, value: USVString);
fn GetSrcObject(&self) -> Option<MediaStreamOrBlob>;
fn SetSrcObject(&self, value: Option<MediaStreamOrBlob>, _can_gc: CanGc);
fn CurrentSrc(&self) -> USVString;
fn GetCrossOrigin(&self) -> Option<DOMString>;
fn SetCrossOrigin(&self, value: Option<DOMString>, _can_gc: CanGc);
fn NetworkState(&self) -> u16;
fn Preload(&self) -> DOMString;
fn SetPreload(&self, value: DOMString);
fn Buffered(&self) -> Root<Dom<TimeRanges>>;
fn Load(&self, _can_gc: CanGc);
fn CanPlayType(&self, type_: DOMString) -> CanPlayTypeResult;
fn ReadyState(&self) -> u16;
fn Seeking(&self) -> bool;
fn CurrentTime(&self) -> Finite<f64>;
fn SetCurrentTime(&self, value: Finite<f64>);
fn FastSeek(&self, time: Finite<f64>);
fn Duration(&self) -> f64;
fn Paused(&self) -> bool;
fn GetDefaultPlaybackRate(&self) -> Result<Finite<f64>, Error>;
fn SetDefaultPlaybackRate(&self, value: Finite<f64>) -> Result<(), Error>;
fn GetPlaybackRate(&self) -> Result<Finite<f64>, Error>;
fn SetPlaybackRate(&self, value: Finite<f64>) -> Result<(), Error>;
fn Played(&self) -> Root<Dom<TimeRanges>>;
fn Ended(&self) -> bool;
fn Autoplay(&self) -> bool;
fn SetAutoplay(&self, value: bool);
fn Loop(&self) -> bool;
fn SetLoop(&self, value: bool);
fn Play(&self, _comp: InRealm<'_>, _can_gc: CanGc) -> Rc<Promise>;
fn Pause(&self, _can_gc: CanGc);
fn Controls(&self) -> bool;
fn SetControls(&self, value: bool);
fn GetVolume(&self) -> Result<Finite<f64>, Error>;
fn SetVolume(&self, value: Finite<f64>) -> Result<(), Error>;
fn Muted(&self) -> bool;
fn SetMuted(&self, value: bool);
fn DefaultMuted(&self) -> bool;
fn SetDefaultMuted(&self, value: bool);
fn AudioTracks(&self) -> Root<Dom<AudioTrackList>>;
fn VideoTracks(&self) -> Root<Dom<VideoTrackList>>;
fn TextTracks(&self) -> Root<Dom<TextTrackList>>;
fn AddTextTrack(
&self,
kind: TextTrackKind,
label: DOMString,
language: DOMString,
) -> Root<Dom<TextTrack>>;
}