Tracks: Add TypeMap to Handles.
Adds a shared TypeMap per TrackHandle. This should greatly simplify the user experience for attaching additional per-track state which the driver does not care for.
This commit is contained in:
@@ -382,9 +382,12 @@ pub fn create_player(source: Input) -> (Track, TrackHandle) {
|
||||
create_player_with_uuid(source, Uuid::new_v4())
|
||||
}
|
||||
|
||||
/// Refer to the documentation for [`create_player`] however, allows for a custom uuid to be inserted into the Track and Handle
|
||||
/// Creates a [`Track`] and [`TrackHandle`] as in [`create_player`], allowing
|
||||
/// a custom UUID to be set.
|
||||
///
|
||||
/// [`create_player`]: create_player
|
||||
/// [`Track`]: Track
|
||||
/// [`TrackHandle`]: TrackHandle
|
||||
pub fn create_player_with_uuid(source: Input, uuid: Uuid) -> (Track, TrackHandle) {
|
||||
let (tx, rx) = mpsc::unbounded_channel();
|
||||
let can_seek = source.is_seekable();
|
||||
|
||||
Reference in New Issue
Block a user