Expose iPhone playback controls
This commit is contained in:
@@ -105,10 +105,22 @@ public struct PlaybackQueue: Hashable, Sendable {
|
||||
queuedTrackIDs preferredQueuedTrackIDs: [String]? = nil
|
||||
) {
|
||||
isShuffleEnabled = isEnabled
|
||||
let nextQueuedTrackIDs: [String]?
|
||||
|
||||
if isEnabled {
|
||||
nextQueuedTrackIDs = preferredQueuedTrackIDs
|
||||
?? Self.makeShuffledTrackIDs(
|
||||
from: catalogTrackIDs,
|
||||
currentTrackID: currentTrackID
|
||||
)
|
||||
} else {
|
||||
nextQueuedTrackIDs = preferredQueuedTrackIDs
|
||||
}
|
||||
|
||||
replaceTrackIDs(
|
||||
catalogTrackIDs,
|
||||
currentTrackID: currentTrackID,
|
||||
queuedTrackIDs: preferredQueuedTrackIDs
|
||||
queuedTrackIDs: nextQueuedTrackIDs
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ public enum PlaybackRepeatMode: String, Codable, CaseIterable, Hashable, Sendabl
|
||||
public var nextMode: PlaybackRepeatMode {
|
||||
switch self {
|
||||
case .off:
|
||||
.all
|
||||
case .all:
|
||||
.one
|
||||
case .one:
|
||||
.all
|
||||
case .all:
|
||||
.off
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user