/// <summary> /// Set the visual state of the repeat button when the internal shuffle state changes. /// </summary> /// <param name="state">The new state</param> void HandleRepeatStateChanged(MLMusicService.RepeatStateType state) { switch (musicService.RepeatState) { case MLMusicService.RepeatStateType.Off: { repeatButton.Material = repeatOffMaterial; } break; case MLMusicService.RepeatStateType.Song: { repeatButton.Material = repeatSongMaterial; } break; default: case MLMusicService.RepeatStateType.Album: { repeatButton.Material = repeatAlbumMaterial; } break; } }
/// <summary> /// Popagate new repeat state. /// </summary> /// <param name="state">The new state</param> void HandleRepeatStateChanged(MLMusicService.RepeatStateType state) { OnRepeatStateChanged?.Invoke(state); }
/// <summary> /// Changes the RepeatMode to the specified mode. /// </summary> public void ChangeRepeatState(MLMusicService.RepeatStateType state) { #if PLATFORM_LUMIN MLMusicService.RepeatState = state; #endif }
private static void HandleRepeatStateChange(MLMusicService.RepeatStateType state, IntPtr data) { MLThreadDispatch.Call(state, OnRepeatStateChange); }
public static extern MLResult.Code MLMusicServiceGetRepeatState(out MLMusicService.RepeatStateType outState);
public static extern MLResult.Code MLMusicServiceSetRepeat(MLMusicService.RepeatStateType mode);