logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class MusicPlayerPlaySongByIdInput

    Input data transfer object for playing a specific song by id in the music player.

    Inheritance
    object
    MusicPlayerPlaySongByIdInput
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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
    In this article
    © 2026 Serenity. All Rights Reserved