pub trait PlayerTrait {
Show 21 methods // Required methods fn add_and_play<'life0, 'life1, 'async_trait>( &'life0 mut self, track: &'life1 Track ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn volume(&self) -> u16; fn volume_up(&mut self); fn volume_down(&mut self); fn set_volume(&mut self, volume: u16); fn pause(&mut self); fn resume(&mut self); fn is_paused(&self) -> bool; fn seek(&mut self, secs: i64) -> Result<()>; fn seek_to(&mut self, position: Duration); fn get_progress(&self) -> Option<PlayerProgress>; fn set_speed(&mut self, speed: i32); fn speed_up(&mut self); fn speed_down(&mut self); fn speed(&self) -> i32; fn stop(&mut self); fn gapless(&self) -> bool; fn set_gapless(&mut self, to: bool); fn skip_one(&mut self); fn enqueue_next(&mut self, track: &Track); // Provided method fn position(&self) -> Option<PlayerTimeUnit> { ... }
}

Required Methods§

source

fn add_and_play<'life0, 'life1, 'async_trait>( &'life0 mut self, track: &'life1 Track ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add the given track, skip to it (if not already) and start playing

source

fn volume(&self) -> u16

source

fn volume_up(&mut self)

source

fn volume_down(&mut self)

source

fn set_volume(&mut self, volume: u16)

source

fn pause(&mut self)

source

fn resume(&mut self)

source

fn is_paused(&self) -> bool

source

fn seek(&mut self, secs: i64) -> Result<()>

Seek relatively to the current time

§Errors

Depending on different backend, there could be different errors during seek.

source

fn seek_to(&mut self, position: Duration)

Seek to a absolute position

source

fn get_progress(&self) -> Option<PlayerProgress>

Get current track time position

source

fn set_speed(&mut self, speed: i32)

source

fn speed_up(&mut self)

source

fn speed_down(&mut self)

source

fn speed(&self) -> i32

source

fn stop(&mut self)

source

fn gapless(&self) -> bool

source

fn set_gapless(&mut self, to: bool)

source

fn skip_one(&mut self)

source

fn enqueue_next(&mut self, track: &Track)

Add the given URI to be played, but do not skip currently playing track

Provided Methods§

source

fn position(&self) -> Option<PlayerTimeUnit>

Quickly access the position.

This should ALWAYS match up with PlayerTrait::get_progress’s .position!

Implementors§