pub struct PlaybackLifecycle { /* private fields */ }Implementations§
Source§impl PlaybackLifecycle
impl PlaybackLifecycle
pub fn new(options: PlaybackOptions) -> Self
pub fn status(&self) -> &PlaybackStatus
pub fn snapshot(&self) -> &PlaybackSnapshot
pub fn source(&self) -> &PlaybackSourceLifecycle
pub fn transport(&self) -> PlaybackTransport
pub fn readiness(&self) -> PlaybackReadiness
pub fn network_activity(&self) -> PlaybackNetworkActivity
pub fn play_failure(&self) -> Option<&PlaybackPlayFailure>
pub fn bounded(&self) -> Option<&BoundedPlaybackSnapshot>
Sourcepub fn start_bounded_once(
&mut self,
range: WaveformSelection,
duration_secs: f64,
) -> Result<(), PlaybackCommandError>
pub fn start_bounded_once( &mut self, range: WaveformSelection, duration_secs: f64, ) -> Result<(), PlaybackCommandError>
Begin one Bounded Playback run after validating its authoritative timeline.
Sourcepub fn start_bounded_loop(
&mut self,
range: WaveformSelection,
duration_secs: f64,
) -> Result<(), PlaybackCommandError>
pub fn start_bounded_loop( &mut self, range: WaveformSelection, duration_secs: f64, ) -> Result<(), PlaybackCommandError>
Begin one repeating Bounded Playback run after validating its authoritative timeline.
Sourcepub fn retarget_bounded(
&mut self,
range: WaveformSelection,
duration_secs: f64,
current_position: f64,
) -> Result<BoundedPlaybackRetarget, PlaybackCommandError>
pub fn retarget_bounded( &mut self, range: WaveformSelection, duration_secs: f64, current_position: f64, ) -> Result<BoundedPlaybackRetarget, PlaybackCommandError>
Atomically replace the range of an enforcing Bounded Playback operation.
Returns whether the platform owner can preserve current_position or
must pause and seek. Out-of-range retargets enter
BoundedPlaybackPhase::Retargeting before optionally resuming.
pub fn bounded_seeking(&mut self)
pub fn bounded_activating(&mut self)
pub fn bounded_active(&mut self)
pub fn bounded_paused(&mut self)
pub fn bounded_retargeting(&mut self)
pub fn bounded_wrapping(&mut self)
pub fn bounded_completed(&mut self)
pub fn bounded_failed(&mut self, failure: BoundedPlaybackFailure)
pub fn cancel_bounded(&mut self)
pub fn bounded_cancelled(&mut self)
pub fn selected_alternative(&self) -> Option<&PlaybackSourceAlternative>
pub fn source_failure(&self) -> Option<&PlaybackSourceFailure>
pub fn repeat(&self) -> bool
pub fn set_repeat(&mut self, repeat: bool)
pub fn toggle_repeat(&mut self)
pub fn muted(&self) -> bool
pub fn set_muted(&mut self, muted: bool)
pub fn toggle_muted(&mut self)
pub fn audibility_level(&self) -> PlaybackAudibilityLevel
pub fn set_audibility_level( &mut self, level: f64, ) -> Result<(), PlaybackCommandError>
pub fn audibility_capability(&self) -> PlaybackAudibilityCapability
pub fn graph_state(&self) -> PlaybackGraphState
pub fn graph_preparing(&mut self)
pub fn graph_awaiting_source(&mut self)
pub fn direct_audibility(&mut self)
pub fn graph_suspended(&mut self)
pub fn graph_running(&mut self)
pub fn graph_interaction_required(&mut self, error: AudioError)
pub fn loading(&mut self)
pub fn dormant(&mut self)
pub fn loaded(&mut self)
pub fn metadata_loaded(&mut self)
pub fn url_playable(&mut self, alternative: PlaybackSourceAlternative)
pub fn request_play(&mut self) -> Result<(), PlaybackCommandError>
pub fn playing(&mut self)
pub fn waiting(&mut self)
pub fn playable(&mut self)
pub fn network_observed(&mut self, activity: PlaybackNetworkActivity)
Sourcepub fn ranges_changed(
&mut self,
buffered: impl IntoIterator<Item = PlaybackTimeRange>,
seekable: impl IntoIterator<Item = PlaybackTimeRange>,
)
pub fn ranges_changed( &mut self, buffered: impl IntoIterator<Item = PlaybackTimeRange>, seekable: impl IntoIterator<Item = PlaybackTimeRange>, )
Replace buffered and seekable observations for the current source attempt.
Ranges are sorted and overlapping or touching ranges are merged. A later observation replaces the whole snapshot, so either collection may shrink.
pub fn paused(&mut self)
Sourcepub fn stop(&mut self) -> Result<(), PlaybackCommandError>
pub fn stop(&mut self) -> Result<(), PlaybackCommandError>
Return a loaded source to its ready, idle state.
pub fn ended(&mut self)
pub fn play_rejected(&mut self, failure: PlaybackPlayFailure)
pub fn seeked(&mut self, position: f64, duration: f64)
pub fn failed(&mut self, error: AudioError)
pub fn source_failed(&mut self, failure: PlaybackSourceFailure)
pub fn unload(&mut self)
Trait Implementations§
Source§impl Debug for PlaybackLifecycle
impl Debug for PlaybackLifecycle
Auto Trait Implementations§
impl Freeze for PlaybackLifecycle
impl RefUnwindSafe for PlaybackLifecycle
impl Send for PlaybackLifecycle
impl Sync for PlaybackLifecycle
impl Unpin for PlaybackLifecycle
impl UnsafeUnpin for PlaybackLifecycle
impl UnwindSafe for PlaybackLifecycle
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
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.