@javascriptcommon/react-native-track-player 4.1.18 → 4.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/doublesymmetry/trackplayer/module/MusicEvents.kt +1 -0
- package/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt +2 -1
- package/android/src/main/java/com/lovegaoshi/kotlinaudio/models/Capability.kt +2 -1
- package/android/src/main/res/drawable/shuffle_on_24px.xml +6 -0
- package/ios/RNTrackPlayer/RNTrackPlayer.swift +1 -0
- package/package.json +1 -1
|
@@ -37,6 +37,7 @@ class MusicEvents(private val reactContext: ReactContext) : BroadcastReceiver()
|
|
|
37
37
|
const val BUTTON_DUCK = "remote-duck"
|
|
38
38
|
const val BUTTON_BROWSE = "remote-browse"
|
|
39
39
|
const val BUTTON_CUSTOM_ACTION = "remote-custom-action"
|
|
40
|
+
const val BUTTON_SHUFFLE = "remote-shuffle"
|
|
40
41
|
|
|
41
42
|
// Playback Events
|
|
42
43
|
const val PLAYBACK_PLAY_WHEN_READY_CHANGED = "playback-play-when-ready-changed"
|
|
@@ -406,7 +406,8 @@ class MusicService : HeadlessJsMediaService() {
|
|
|
406
406
|
|
|
407
407
|
player.alwaysPauseOnInterruption = androidOptions?.getBoolean(PAUSE_ON_INTERRUPTION_KEY) ?: false
|
|
408
408
|
val newShuffleState = androidOptions?.getBoolean(SHUFFLE_KEY) ?: false
|
|
409
|
-
player.shuffleMode
|
|
409
|
+
// Don't set player.shuffleMode - shuffle is managed by JS layer through queue reordering
|
|
410
|
+
// Only track shuffleState for notification icon display
|
|
410
411
|
shuffleState = newShuffleState
|
|
411
412
|
|
|
412
413
|
// Update heart state if provided
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<vector android:autoMirrored="true" android:height="24dp"
|
|
2
|
+
android:viewportHeight="960" android:viewportWidth="960"
|
|
3
|
+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
4
|
+
<path android:fillColor="@android:color/white" android:pathData="M560,800L560,720L664,720L537,593L594,536L720,662L720,560L800,560L800,800L560,800ZM216,800L160,744L664,240L560,240L560,160L800,160L800,400L720,400L720,296L216,800ZM367,423L160,216L216,160L423,367L367,423Z"/>
|
|
5
|
+
<path android:fillColor="@android:color/white" android:pathData="M480,890m-60,0a60,60 0,1 1,120 0a60,60 0,1 1,-120 0"/>
|
|
6
|
+
</vector>
|
|
@@ -1055,6 +1055,7 @@ extension RNTrackPlayer {
|
|
|
1055
1055
|
"CAPABILITY_LIKE": Capability.like.rawValue,
|
|
1056
1056
|
"CAPABILITY_DISLIKE": Capability.dislike.rawValue,
|
|
1057
1057
|
"CAPABILITY_BOOKMARK": Capability.bookmark.rawValue,
|
|
1058
|
+
"CAPABILITY_SHUFFLE": "NOOP",
|
|
1058
1059
|
|
|
1059
1060
|
"REPEAT_OFF": RepeatMode.off.rawValue,
|
|
1060
1061
|
"REPEAT_TRACK": RepeatMode.track.rawValue,
|
package/package.json
CHANGED