Interface ICorePlaylistCollection
A collection of ICorePlaylistCollectionItems and the properties and methods for using and manipulating them.
Inherited Members
Namespace: StrixMusic.Sdk.CoreModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface ICorePlaylistCollection : ICorePlayableCollection, IPlayableCollectionBase, IPlaylistCollectionBase, ICoreImageCollection, ICoreUrlCollection, ICoreCollection, ICorePlaylistCollectionItem, IPlaylistCollectionItemBase, IPlayableCollectionItem, IPlayableBase, IImageCollectionBase, IUrlCollectionBase, ICollectionBase, ICollectionItemBase, ICoreModel
Remarks
This interface should be implemented by a core.
Methods
| Improve this Doc View SourceAddPlaylistItemAsync(ICorePlaylistCollectionItem, int, CancellationToken)
Adds a new playlist to the collection on the backend.
Declaration
Task AddPlaylistItemAsync(ICorePlaylistCollectionItem playlist, int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ICorePlaylistCollectionItem | playlist | The playlist to create. |
int | index | the position to insert the playlist 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. |
GetPlaylistItemsAsync(int, int, CancellationToken)
Gets a requested number of IPlaylistCollectionItemBases starting at the given offset in the backend.
Declaration
IAsyncEnumerable<ICorePlaylistCollectionItem> GetPlaylistItemsAsync(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<ICorePlaylistCollectionItem> | IAsyncEnumerable<T> that returns the items as they're retrieved. |
PlayPlaylistCollectionAsync(ICorePlaylistCollectionItem, CancellationToken)
Attempts to play a specific item in the playlist collection. Restarts playback if already playing.
Declaration
Task PlayPlaylistCollectionAsync(ICorePlaylistCollectionItem playlistItem, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ICorePlaylistCollectionItem | playlistItem | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
Events
| Improve this Doc View SourcePlaylistItemsChanged
Fires when the items in the backend are changed by something external.
Declaration
event CollectionChangedEventHandler<ICorePlaylistCollectionItem>? PlaylistItemsChanged
Event Type
Type | Description |
---|---|
CollectionChangedEventHandler<ICorePlaylistCollectionItem> |