import request from '@/utils/request'

// 暂停播放
export function pause(data) {
    return request({
        url: '/api/Speaker/pause',
        method: 'post',
        data: data
    })
}

// 播放音频
export function play(data) {
    return request({
        url: '/api/Speaker/play',
        method: 'post',
        data: data
    })
}

// 恢复播放
export function resume(data) {
    return request({
        url: '/api/Speaker/resume',
        method: 'post',
        data: data
    })
}

// 获取扬声器状态
export function status(query) {
    return request({
        url: '/api/Speaker/status',
        method: 'get',
        params: query
    })
}

// 停止播放
export function stop(data) {
    return request({
        url: '/api/Speaker/stop',
        method: 'post',
        data: data
    })
}

// 获取音量
export function getVolume(query) {
    return request({
        url: '/api/Speaker/volume',
        method: 'get',
        params: query
    })
}

// 设置音量
export function setVolume(data) {
    return request({
        url: '/api/Speaker/volume',
        method: 'post',
        data: data
    })
}

// 设置音量
export function getAll() {
    return request({
        url: '/api/Speaker/getAll',
        method: 'get',
    })
}