diff --git a/src/kmediasession/android/org/kde/kasts/MediaNotification.java b/src/kmediasession/android/org/kde/kasts/MediaNotification.java index 386e8e0d..1a690cf7 100644 --- a/src/kmediasession/android/org/kde/kasts/MediaNotification.java +++ b/src/kmediasession/android/org/kde/kasts/MediaNotification.java @@ -2,12 +2,24 @@ package org.kde.kasts; import android.util.Log; import androidx.media3.common.SimpleBasePlayer; +import androidx.media3.common.Player; class Receiver extends BroadcastReceiver { } class KastsPlayer extends SimpleBasePlayer { + @Override + public SimpleBasePlayer.State getState() { + SimpleBasePlayer.State.Builder builder = new SimpleBasePlayer.State.Builder(); + + Player.Commands.Builder commandsBuilder = new Player.Commands.Builder(); + commandsBuilder.add(Player.COMMAND_PLAY_PAUSE); + builder.setAvailableCommands(commandsBuilder.build()); + builder.setContentPositionMs(1234); + builder.setPlaybackState(Player.State.STATE_READY); + return builder.build(); + } } public class MediaNotification {