Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/spotify

src/exports/set-volume.ts

13 lines · 481 B · TypeScript
import { setVolume } from '../lib/spotify-api.ts'
import type { SetVolumeParams } from '../lib/export-types.ts'

/**
 * Set playback volume on the active or named Spotify device (0–100).
 * Supports `dryRun: true`.
 * @example
 * import setVolume from 'kody:@kody/spotify/set-volume'
 * await setVolume({ volumePercent: 50, deviceName: 'Living Room', dryRun: true })
 */
export default async function spotifySetVolume(params: SetVolumeParams) {
	return await setVolume(params)
}