Class MusicPlayerPlaySongByIdInput
Input data transfer object for playing a specific song by id in the music player.
Inherited Members
Namespace: Serenity.MusicPlayer.Application.DTO
Assembly: Serenity.MusicPlayer.Application.dll
Syntax
public class MusicPlayerPlaySongByIdInput
Constructors
MusicPlayerPlaySongByIdInput(string, string, bool, MusicPlayerTransitionType, float)
Initializes a new instance of the MusicPlayerPlaySongByIdInput class.
Declaration
public MusicPlayerPlaySongByIdInput(string serviceId, string musicTrackId, bool loop, MusicPlayerTransitionType transitionType = 0, float transitionDuration = 0.5)
Parameters
| Type | Name | Description |
|---|---|---|
| string | serviceId | The ID of the service requesting the play song action. |
| string | musicTrackId | The ID of the music track to play. |
| bool | loop | Whether the track should loop when it finishes. |
| MusicPlayerTransitionType | transitionType | Transition strategy applied when moving from the current track to this one. Defaults to CUT. |
| float | transitionDuration | Duration of the transition in seconds. Only applied to fade-based transitions. |
Fields
DEFAULT_TRANSITION_DURATION
Default transition duration in seconds applied when none is provided.
Declaration
public const float DEFAULT_TRANSITION_DURATION = 0.5
Field Value
| Type | Description |
|---|---|
| float |
Loop
Declaration
public bool Loop
Field Value
| Type | Description |
|---|---|
| bool |
MusicTrackId
Declaration
public string MusicTrackId
Field Value
| Type | Description |
|---|---|
| string |
ServiceId
Declaration
public string ServiceId
Field Value
| Type | Description |
|---|---|
| string |
TransitionDuration
Declaration
public float TransitionDuration
Field Value
| Type | Description |
|---|---|
| float |
TransitionType
Declaration
public MusicPlayerTransitionType TransitionType
Field Value
| Type | Description |
|---|---|
| MusicPlayerTransitionType |