TrackHandle: add metadata field (#25)

* Adds metadata field to TrackHandle.

Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
This commit is contained in:
baguette
2020-12-04 08:43:35 -05:00
committed by GitHub
parent 94157b12bc
commit 57df3fe53a
2 changed files with 26 additions and 4 deletions

View File

@@ -366,7 +366,8 @@ impl Track {
pub fn create_player(source: Input) -> (Track, TrackHandle) {
let (tx, rx) = mpsc::unbounded_channel();
let can_seek = source.is_seekable();
let handle = TrackHandle::new(tx, can_seek, Uuid::new_v4());
let metadata = source.metadata.clone();
let handle = TrackHandle::new(tx, can_seek, Uuid::new_v4(), metadata);
let player = Track::new_raw(source, rx, handle.clone());