Skip to main content

PlaybackLifecycle

Struct PlaybackLifecycle 

Source
pub struct PlaybackLifecycle { /* private fields */ }

Implementations§

Source§

impl PlaybackLifecycle

Source

pub fn new(options: PlaybackOptions) -> Self

Source

pub fn status(&self) -> &PlaybackStatus

Source

pub fn snapshot(&self) -> &PlaybackSnapshot

Source

pub fn source(&self) -> &PlaybackSourceLifecycle

Source

pub fn transport(&self) -> PlaybackTransport

Source

pub fn readiness(&self) -> PlaybackReadiness

Source

pub fn network_activity(&self) -> PlaybackNetworkActivity

Source

pub fn play_failure(&self) -> Option<&PlaybackPlayFailure>

Source

pub fn bounded(&self) -> Option<&BoundedPlaybackSnapshot>

Source

pub fn start_bounded_once( &mut self, range: WaveformSelection, duration_secs: f64, ) -> Result<(), PlaybackCommandError>

Begin one Bounded Playback run after validating its authoritative timeline.

Source

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.

Source

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.

Source

pub fn bounded_seeking(&mut self)

Source

pub fn bounded_activating(&mut self)

Source

pub fn bounded_active(&mut self)

Source

pub fn bounded_paused(&mut self)

Source

pub fn bounded_retargeting(&mut self)

Source

pub fn bounded_wrapping(&mut self)

Source

pub fn bounded_completed(&mut self)

Source

pub fn bounded_failed(&mut self, failure: BoundedPlaybackFailure)

Source

pub fn cancel_bounded(&mut self)

Source

pub fn bounded_cancelled(&mut self)

Source

pub fn selected_alternative(&self) -> Option<&PlaybackSourceAlternative>

Source

pub fn source_failure(&self) -> Option<&PlaybackSourceFailure>

Source

pub fn repeat(&self) -> bool

Source

pub fn set_repeat(&mut self, repeat: bool)

Source

pub fn toggle_repeat(&mut self)

Source

pub fn muted(&self) -> bool

Source

pub fn set_muted(&mut self, muted: bool)

Source

pub fn toggle_muted(&mut self)

Source

pub fn audibility_level(&self) -> PlaybackAudibilityLevel

Source

pub fn set_audibility_level( &mut self, level: f64, ) -> Result<(), PlaybackCommandError>

Source

pub fn audibility_capability(&self) -> PlaybackAudibilityCapability

Source

pub fn graph_state(&self) -> PlaybackGraphState

Source

pub fn graph_preparing(&mut self)

Source

pub fn graph_awaiting_source(&mut self)

Source

pub fn direct_audibility(&mut self)

Source

pub fn graph_suspended(&mut self)

Source

pub fn graph_running(&mut self)

Source

pub fn graph_interaction_required(&mut self, error: AudioError)

Source

pub fn graph_unavailable(&mut self)

Source

pub fn loading(&mut self)

Source

pub fn dormant(&mut self)

Source

pub fn loaded(&mut self)

Source

pub fn metadata_loaded(&mut self)

Source

pub fn url_playable(&mut self, alternative: PlaybackSourceAlternative)

Source

pub fn request_play(&mut self) -> Result<(), PlaybackCommandError>

Source

pub fn playing(&mut self)

Source

pub fn waiting(&mut self)

Source

pub fn playable(&mut self)

Source

pub fn network_observed(&mut self, activity: PlaybackNetworkActivity)

Source

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.

Source

pub fn paused(&mut self)

Source

pub fn stop(&mut self) -> Result<(), PlaybackCommandError>

Return a loaded source to its ready, idle state.

Source

pub fn ended(&mut self)

Source

pub fn play_rejected(&mut self, failure: PlaybackPlayFailure)

Source

pub fn seeked(&mut self, position: f64, duration: f64)

Source

pub fn failed(&mut self, error: AudioError)

Source

pub fn source_failed(&mut self, failure: PlaybackSourceFailure)

Source

pub fn unload(&mut self)

Trait Implementations§

Source§

impl Debug for PlaybackLifecycle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PlaybackLifecycle

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> InitializeFromFunction<T> for T

Source§

fn initialize_from_function(f: fn() -> T) -> T

Create an instance of this type from an initialization function
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Ret> SpawnIfAsync<(), Ret> for Ret

Source§

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
Source§

impl<T, O> SuperFrom<T> for O
where O: From<T>,

Source§

fn super_from(input: T) -> O

Convert from a type to another type.
Source§

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

Source§

fn super_into(self) -> O

Convert from a type to another type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more