pub struct AudioPlayerController { /* private fields */ }Implementations§
Source§impl AudioPlayerController
impl AudioPlayerController
pub fn status(self) -> ReadSignal<PlaybackStatus>
pub fn snapshot(self) -> ReadSignal<PlaybackSnapshot>
pub fn position(self) -> ReadSignal<Duration>
pub fn duration(self) -> ReadSignal<Duration>
pub fn rate(self) -> ReadSignal<f64>
Sourcepub fn analyser(self) -> ReadSignal<Option<AudioAnalyser>>
pub fn analyser(self) -> ReadSignal<Option<AudioAnalyser>>
The stable source-neutral Analyser for this graph-backed owner, once created.
pub fn repeat(self) -> bool
pub fn muted(self) -> bool
pub fn audibility_level(self) -> PlaybackAudibilityLevel
pub fn audibility_capability(self) -> PlaybackAudibilityCapability
pub fn play(self) -> Result<(), PlaybackCommandError>
pub fn pause(self) -> Result<(), PlaybackCommandError>
Sourcepub fn stop(self) -> Result<(), PlaybackCommandError>
pub fn stop(self) -> Result<(), PlaybackCommandError>
Stop Playback atomically and reset its observable position.
pub fn seek(self, position: Duration)
pub fn skip(self, seconds: f64)
Sourcepub fn play_bounded_once(
self,
selection: WaveformSelection,
) -> Result<(), PlaybackCommandError>
pub fn play_bounded_once( self, selection: WaveformSelection, ) -> Result<(), PlaybackCommandError>
Pause-seek to a Waveform Selection and play it once.
The selection is validated against the current source’s authoritative
browser duration. Use Self::snapshot to observe the bounded lifecycle.
Sourcepub fn play_bounded_loop(
self,
selection: WaveformSelection,
) -> Result<(), PlaybackCommandError>
pub fn play_bounded_loop( self, selection: WaveformSelection, ) -> Result<(), PlaybackCommandError>
Pause-seek to a Waveform Selection and repeatedly play it.
Loop wraps wait for a correlated seek to the range start before Playback resumes. Audible wrapping is best effort and is not gapless.
Sourcepub fn retarget_bounded_playback(
self,
selection: WaveformSelection,
) -> Result<(), PlaybackCommandError>
pub fn retarget_bounded_playback( self, selection: WaveformSelection, ) -> Result<(), PlaybackCommandError>
Atomically retarget an enforcing Bounded Playback operation.
The current position is preserved when it remains in range. Otherwise, Playback pause-seeks to the replacement start before optionally resuming.
Sourcepub fn cancel_bounded_playback(self)
pub fn cancel_bounded_playback(self)
Stop enforcing the current bounded range without clearing application selection state.
pub fn set_rate(self, rate: f64) -> Result<(), PlaybackCommandError>
Sourcepub fn set_repeat(self, repeat: bool)
pub fn set_repeat(self, repeat: bool)
Set the whole-source repeat preference.
Sourcepub fn toggle_repeat(self)
pub fn toggle_repeat(self)
Toggle the whole-source repeat preference.
Sourcepub fn set_muted(self, muted: bool)
pub fn set_muted(self, muted: bool)
Set mute without changing transport, position, or the audibility level preference.
Sourcepub fn toggle_muted(self)
pub fn toggle_muted(self)
Toggle mute without changing transport, position, or the audibility level preference.
Sourcepub fn set_audibility_level(
self,
level: f64,
) -> Result<(), PlaybackCommandError>
pub fn set_audibility_level( self, level: f64, ) -> Result<(), PlaybackCommandError>
Set the normalized audibility preference in the inclusive range 0.0..=1.0.
Consult Self::audibility_capability before presenting this value as effective
output gain. Direct media-element control is best effort on some browsers.
Trait Implementations§
Source§impl Clone for AudioPlayerController
impl Clone for AudioPlayerController
Source§fn clone(&self) -> AudioPlayerController
fn clone(&self) -> AudioPlayerController
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more