#[repr(C)]pub struct Caption {
pub url: String,
pub label: String,
pub language: String,
pub default_on: bool,
}Expand description
One subtitle/caption track for a Widget::Video. url points at a WebVTT (.vtt) file,
language is a BCP-47 tag (e.g. "en"), label is the human-readable menu entry, and
default_on selects it by default. Sidecar tracks work on web (<track>) and Android
(Media3 subtitle configuration); on iOS only captions already embedded in an HLS manifest are
selectable (AVPlayer can’t attach a sidecar VTT to an MP4 — a documented v1 gap).
Fields§
§url: String§label: String§language: String§default_on: boolTrait Implementations§
Source§impl<'de> Deserialize<'de> for Caption
impl<'de> Deserialize<'de> for Caption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Caption
Auto Trait Implementations§
impl Freeze for Caption
impl RefUnwindSafe for Caption
impl Send for Caption
impl Sync for Caption
impl Unpin for Caption
impl UnsafeUnpin for Caption
impl UnwindSafe for Caption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more