nicmr / fidelitas

Rust network audio player and web client using actix and crossbeam multithreading, websockets, libvlc, and an Elm frontend.
GNU General Public License v3.0
0 stars 0 forks source link

Send media length to frontend #45

Open nicmr opened 4 years ago

nicmr commented 4 years ago

Frontends require the track length to display track length and progress bars.

Cannot done for all tracks in advance because the information is only computed by libvlc when the track is played.

Solution: https://docs.rs/vlc-rs/0.3.0/vlc/sys/fn.libvlc_media_player_get_length.html Unfortunately not yet wrapped by the rust wrapper for libvlc so it's unsafe :/

Remaining issues: cannot compute total playlist / album length

nicmr commented 4 years ago

mostly implemented as of d1743d46f4aef4a0eb935ec6b9fdd7f7c8e3dbaa there's still a small issue remaining with the track length being 0 until the page is refreshed, which is probably caused by calling the function to determine the track length before the media has finished loading. will fix in the next days.