Interface IUnityMusicPlayerRuntime
Unity-layer intention interface for the music player runtime. Exposes Unity-specific operations that are NOT on IMusicPlayerService (direct access to the Unity UnityEngine.AudioSource driving the current track). Allows Unity-side consumers (e.g. the custom editor) to reach the audio source without casting to the concrete service type.
Namespace: Serenity.MusicPlayer.Infrastructure.Interfaces
Assembly: Serenity.UnityMusicPlayer.Infrastructure.dll
Syntax
public interface IUnityMusicPlayerRuntime
Methods
GetCurrentTrackAudioSource()
Gets the Unity AudioSource component for the currently playing track.
Provides access to the AudioSource for advanced audio control and monitoring.
Returns null if no track is currently playing.
Declaration
AudioSource GetCurrentTrackAudioSource()
Returns
| Type | Description |
|---|---|
| AudioSource | The AudioSource component of the current track, or null if none is playing. |