Interface IPlayableBase
Represents an item that can be played.
Inherited Members
Namespace: StrixMusic.Sdk.BaseModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface IPlayableBase : IImageCollectionBase, IUrlCollectionBase, ICollectionBase
Properties
| Improve this Doc View SourceDescription
Provides comments about the item. This may contain markdown content.
Declaration
string? Description { get; }
Property Value
Type | Description |
---|---|
string |
Duration
How long the playable item takes to complete playback.
Declaration
TimeSpan Duration { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
Remarks
If not applicable, use Zero.
Id
The ID of the playable item.
Declaration
string Id { get; }
Property Value
Type | Description |
---|---|
string |
IsChangeDescriptionAsyncAvailable
If true, ChangeDescriptionAsync(string?, CancellationToken) can be used.
Declaration
bool IsChangeDescriptionAsyncAvailable { get; }
Property Value
Type | Description |
---|---|
bool |
IsChangeDurationAsyncAvailable
If true, ChangeDurationAsync(TimeSpan, CancellationToken) can be used.
Declaration
bool IsChangeDurationAsyncAvailable { get; }
Property Value
Type | Description |
---|---|
bool |
IsChangeNameAsyncAvailable
If true, ChangeNameAsync(string, CancellationToken) can be used.
Declaration
bool IsChangeNameAsyncAvailable { get; }
Property Value
Type | Description |
---|---|
bool |
LastPlayed
The last time the item was played. If never played or unknown, value is null.
Declaration
DateTime? LastPlayed { get; }
Property Value
Type | Description |
---|---|
DateTime? |
Name
Name of the playable item.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string |
PlaybackState
Current playback state.
Declaration
PlaybackState PlaybackState { get; }
Property Value
Type | Description |
---|---|
PlaybackState |
Methods
| Improve this Doc View SourceChangeDescriptionAsync(string?, CancellationToken)
Changes the Description for this item.
Declaration
Task ChangeDescriptionAsync(string? description, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | description | The new description for this playable item. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
ChangeDurationAsync(TimeSpan, CancellationToken)
Changes the Duration for this item.
Declaration
Task ChangeDurationAsync(TimeSpan duration, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | duration | The new duration for this playable item. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
ChangeNameAsync(string, CancellationToken)
Changes the Name of this playable item.
Declaration
Task ChangeNameAsync(string name, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | The new name to use. |
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 SourceDescriptionChanged
Raised when Description changes.
Declaration
event EventHandler<string?>? DescriptionChanged
Event Type
Type | Description |
---|---|
EventHandler<string> |
DurationChanged
Raised when Duration changes;
Declaration
event EventHandler<TimeSpan>? DurationChanged
Event Type
Type | Description |
---|---|
EventHandler<TimeSpan> |
IsChangeDescriptionAsyncAvailableChanged
Raised when IsChangeDescriptionAsyncAvailable changes.
Declaration
event EventHandler<bool>? IsChangeDescriptionAsyncAvailableChanged
Event Type
Type | Description |
---|---|
EventHandler<bool> |
IsChangeDurationAsyncAvailableChanged
Raised when IsChangeDurationAsyncAvailable changes.
Declaration
event EventHandler<bool>? IsChangeDurationAsyncAvailableChanged
Event Type
Type | Description |
---|---|
EventHandler<bool> |
IsChangeNameAsyncAvailableChanged
Raised when IsChangeNameAsyncAvailable changes.
Declaration
event EventHandler<bool>? IsChangeNameAsyncAvailableChanged
Event Type
Type | Description |
---|---|
EventHandler<bool> |
LastPlayedChanged
Raised when LastPlayed changes.
Declaration
event EventHandler<DateTime?>? LastPlayedChanged
Event Type
Type | Description |
---|---|
EventHandler<DateTime?> |
NameChanged
Raised when Name changes.
Declaration
event EventHandler<string>? NameChanged
Event Type
Type | Description |
---|---|
EventHandler<string> |
PlaybackStateChanged
Raised when PlaybackState changes.
Declaration
event EventHandler<PlaybackState>? PlaybackStateChanged
Event Type
Type | Description |
---|---|
EventHandler<PlaybackState> |