libre-url2audio-lib

Crates.iolibre-url2audio-lib
lib.rslibre-url2audio-lib
version0.1.7
sourcesrc
created_at2024-06-06 08:16:08.12756
updated_at2024-07-08 08:03:31.494306
descriptionsimple-to-use lib for playing audio streams
homepagehttps://github.com/zchira/libre-url2audio-lib
repositoryhttps://github.com/zchira/libre-url2audio-lib
max_upload_size
id1263497
size84,042
(zchira)

documentation

README

Crate Badge Docs Badge

deprecation

Moved here: https://github.com/zchira/url2audio

libre-url2audio-lib

Simple to use rust library for playing audio streams.

How to use?

// create Player instance 
let mut p = Player::new();

// open audio stream from url:
// example: https://something.from.the.web/xyz.mpr
let res = p.open(src);

println!("duration: {}", p.duration());
sleep(std::time::Duration::from_secs(3));

// pause playback
p.pause();

sleep(std::time::Duration::from_secs(3));
// resume playback
p.play();
println!("Resume at: {}", p.current_position());

sleep(std::time::Duration::from_secs(3));
// seek
p.seek(600.0);

sleep(std::time::Duration::from_secs(5));
Commit count: 48

cargo fmt