pub struct AudioAttributes {
pub src: Option<Uri>,
pub fetch_timeout: Option<TimeDesignation>,
pub fetch_hint: FetchHint,
pub max_age: Option<usize>,
pub max_stale: Option<usize>,
pub clip_begin: TimeDesignation,
pub clip_end: Option<TimeDesignation>,
pub repeat_count: NonZeroUsize,
pub repeat_dur: Option<TimeDesignation>,
pub sound_level: f32,
pub speed: f32,
}
Expand description
The audio element supports the insertion of recorded audio files and the insertion of other audio formats in conjunction with synthesized speech output. The audio element may be empty. If the audio element is not empty then the contents should be the marked-up text to be spoken if the audio document is not available. The alternate content may include text, speech markup, desc elements, or other audio elements. The alternate content may also be used when rendering the document to non-audible output and for accessibility (see the desc element).
“Speech Synthesis Markup Language (SSML) Version 1.1” Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved.
Fields§
§src: Option<Uri>
The URI of a document with an appropriate media type. If absent, the audio element behaves as if src were present with a legal URI but the document could not be fetched.
fetch_timeout: Option<TimeDesignation>
The timeout for fetches.
fetch_hint: FetchHint
This tells the synthesis processor whether or not it can attempt to optimize rendering by pre-fetching audio. The value is either safe to say that audio is only fetched when it is needed, never before; or prefetch to permit, but not require the processor to pre-fetch the audio.
max_age: Option<usize>
Indicates that the document is willing to use content whose age is no greater than the specified time (cf. ‘max-age’ in HTTP 1.1). The document is not willing to use stale content, unless maxstale is also provided.
max_stale: Option<usize>
Indicates that the document is willing to use content that has exceeded its expiration time (cf. ‘max-stale’ in HTTP 1.1). If maxstale is assigned a value, then the document is willing to accept content that has exceeded its expiration time by no more than the specified amount of time.
clip_begin: TimeDesignation
offset from start of media to begin rendering. This offset is measured in normal media playback time from the beginning of the media.
clip_end: Option<TimeDesignation>
offset from start of media to end rendering. This offset is measured in normal media playback time from the beginning of the media.
repeat_count: NonZeroUsize
number of iterations of media to render. A fractional value describes a portion of the rendered media.
repeat_dur: Option<TimeDesignation>
total duration for repeatedly rendering media. This duration is measured in normal media playback time from the beginning of the media.
sound_level: f32
Sound level in decibels
speed: f32
Speed in a percentage where 1.0 corresponds to 100%
Trait Implementations§
Source§impl Clone for AudioAttributes
impl Clone for AudioAttributes
Source§fn clone(&self) -> AudioAttributes
fn clone(&self) -> AudioAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more