Interface ICoreTrackCollection
A collection of tracks and the properties and methods for using and manipulating them.
Inherited Members
Namespace: StrixMusic.Sdk.CoreModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface ICoreTrackCollection : ICorePlayableCollection, ITrackCollectionBase, IPlayableCollectionBase, IPlayableCollectionItem, IPlayableBase, ICollectionItemBase, ICoreImageCollection, IImageCollectionBase, ICoreUrlCollection, ICoreCollection, IUrlCollectionBase, ICollectionBase, ICoreModel
Remarks
This interface should be implemented by a core.
Methods
| Improve this Doc View SourceAddTrackAsync(ICoreTrack, int, CancellationToken)
Adds a new track to the collection on the backend.
Declaration
Task AddTrackAsync(ICoreTrack track, int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ICoreTrack | track | The track to create. |
int | index | the position to insert the track at. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
GetTracksAsync(int, int, CancellationToken)
Gets a requested number of ICoreTracks starting at the given offset in the backend.
Declaration
IAsyncEnumerable<ICoreTrack> GetTracksAsync(int limit, int offset, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | limit | The max number of items to return. |
int | offset | Get items starting at this index. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<ICoreTrack> | IAsyncEnumerable<T> that returns the items as they're retrieved. |
PlayTrackCollectionAsync(ICoreTrack, CancellationToken)
Attempts to play a specific item in the track collection. Restarts playback if already playing.
Declaration
Task PlayTrackCollectionAsync(ICoreTrack track, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ICoreTrack | track | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
Events
| Improve this Doc View SourceTracksChanged
Fires when the items in the backend are changed by something external.
Declaration
event CollectionChangedEventHandler<ICoreTrack>? TracksChanged
Event Type
Type | Description |
---|---|
CollectionChangedEventHandler<ICoreTrack> |