Implement track preloading
Will preload the next track close to the end of the currently playing track. Should make playback of queued tracks a little smoother.
This commit is contained in:
@@ -842,6 +842,10 @@ impl Spotify {
|
||||
self.send_worker(WorkerCommand::SetVolume(Self::log_scale(volume)));
|
||||
}
|
||||
|
||||
pub fn preload(&self, track: &Playable) {
|
||||
self.send_worker(WorkerCommand::Preload(track.clone()));
|
||||
}
|
||||
|
||||
pub fn shutdown(&self) {
|
||||
self.send_worker(WorkerCommand::Shutdown);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user