Interface ITrackCollectionBase
A collection of tracks and the properties and methods for using and manipulating them.
Inherited Members
Namespace: StrixMusic.Sdk.BaseModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface ITrackCollectionBase : IPlayableCollectionBase, IPlayableCollectionItem, IPlayableBase, IImageCollectionBase, IUrlCollectionBase, ICollectionBase, ICollectionItemBase
Properties
| Improve this Doc View SourceIsPauseTrackCollectionAsyncAvailable
If true, PauseTrackCollectionAsync(CancellationToken) can be used.
Declaration
bool IsPauseTrackCollectionAsyncAvailable { get; }
Property Value
Type | Description |
---|---|
bool |
IsPlayTrackCollectionAsyncAvailable
If true, PlayTrackCollectionAsync(CancellationToken) can be used.
Declaration
bool IsPlayTrackCollectionAsyncAvailable { get; }
Property Value
Type | Description |
---|---|
bool |
TotalTrackCount
The total number of available Tracks.
Declaration
int TotalTrackCount { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Improve this Doc View SourceIsAddTrackAvailableAsync(int, CancellationToken)
Checks if the backend supports adding an ITrackBase at a specific index.
Declaration
Task<bool> IsAddTrackAvailableAsync(int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | index | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<bool> | A Task representing the asynchronous operation. If value is true, a new ITrackBase can be added. |
IsRemoveTrackAvailableAsync(int, CancellationToken)
Checks if the backend supports removing an ITrackBase at a specific index.
Declaration
Task<bool> IsRemoveTrackAvailableAsync(int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | index | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<bool> | A Task representing the asynchronous operation. If value is true, the ITrackBase can be removed. |
PauseTrackCollectionAsync(CancellationToken)
Attempts to pause the Track collection.
Declaration
Task PauseTrackCollectionAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
PlayTrackCollectionAsync(CancellationToken)
Attempts to play the Track collection, or resumes playback if already playing.
Declaration
Task PlayTrackCollectionAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
RemoveTrackAsync(int, CancellationToken)
Removes the track from the collection on the backend.
Declaration
Task RemoveTrackAsync(int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the track to remove. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
Events
| Improve this Doc View SourceIsPauseTrackCollectionAsyncAvailableChanged
Raised when IsPauseTrackCollectionAsyncAvailable changes.
Declaration
event EventHandler<bool>? IsPauseTrackCollectionAsyncAvailableChanged
Event Type
Type | Description |
---|---|
EventHandler<bool> |
IsPlayTrackCollectionAsyncAvailableChanged
Raised when IsPlayTrackCollectionAsyncAvailable changes.
Declaration
event EventHandler<bool>? IsPlayTrackCollectionAsyncAvailableChanged
Event Type
Type | Description |
---|---|
EventHandler<bool> |
TracksCountChanged
Fires when the merged TotalTrackCount changes.
Declaration
event EventHandler<int>? TracksCountChanged
Event Type
Type | Description |
---|---|
EventHandler<int> |