Track

Trait Track 

Source
pub trait Track: WithAttribute {
    // Provided methods
    fn kind(self, kind: Kind) -> Self::Output<Kind> { ... }
    fn kind_subtitles(self) -> Self::Output<Kind> { ... }
    fn kind_captions(self) -> Self::Output<Kind> { ... }
    fn kind_descriptions(self) -> Self::Output<Kind> { ... }
    fn kind_chapters(self) -> Self::Output<Kind> { ... }
    fn kind_metadata(self) -> Self::Output<Kind> { ... }
    fn src(self, src: impl Into<Cow<'static, str>>) -> Self::Output<Src> { ... }
    fn src_lang(
        self,
        src_lang: impl Into<Cow<'static, str>>,
    ) -> Self::Output<SrcLang> { ... }
    fn label(self, value: impl Into<Cow<'static, str>>) -> Self::Output<Label> { ... }
    fn default(self) -> Self::Output<Default> { ... }
    fn with_default(self, default: bool) -> Self::Output<Default> { ... }
}
Expand description

The track element allows authors to specify explicit external timed text tracks for media (super::audio, super::video) elements. It does not represent anything on its own.

Provided Methods§

Source

fn kind(self, kind: Kind) -> Self::Output<Kind>

The type of text track.

Source

fn kind_subtitles(self) -> Self::Output<Kind>

Source

fn kind_captions(self) -> Self::Output<Kind>

Source

fn kind_descriptions(self) -> Self::Output<Kind>

Source

fn kind_chapters(self) -> Self::Output<Kind>

Source

fn kind_metadata(self) -> Self::Output<Kind>

Source

fn src(self, src: impl Into<Cow<'static, str>>) -> Self::Output<Src>

Address of the resource.

Source

fn src_lang( self, src_lang: impl Into<Cow<'static, str>>, ) -> Self::Output<SrcLang>

Language of the text track.

Source

fn label(self, value: impl Into<Cow<'static, str>>) -> Self::Output<Label>

User-visible label.

Source

fn default(self) -> Self::Output<Default>

Enable the track if no other text track is more suitable.

Source

fn with_default(self, default: bool) -> Self::Output<Default>

Enable the track if no other text track is more suitable.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A: Attributes, V: 'static> Track for Html<Track, A, V>