Version 1.4 - Translations, Like toasts Queue redesign.
This commit is contained in:
@@ -146,6 +146,20 @@ final class MAService {
|
||||
)
|
||||
}
|
||||
|
||||
/// Seek to a position in the current track (seconds)
|
||||
func seek(playerId: String, position: Double) async throws {
|
||||
let seconds = Int(max(0, position))
|
||||
logger.debug("Seeking to \(seconds)s on player \(playerId)")
|
||||
let response = try await webSocketClient.sendCommand(
|
||||
"players/cmd/seek",
|
||||
args: [
|
||||
"player_id": playerId,
|
||||
"position": seconds
|
||||
]
|
||||
)
|
||||
logger.debug("Seek response: errorCode=\(String(describing: response.errorCode)) details=\(String(describing: response.details))")
|
||||
}
|
||||
|
||||
/// Set volume (0-100)
|
||||
func setVolume(playerId: String, level: Int) async throws {
|
||||
let clampedLevel = max(0, min(100, level))
|
||||
|
||||
Reference in New Issue
Block a user