feat: add mute and unmute functionality to player service; update CompactPlayer and Player components to utilize new methods
This commit is contained in:
@@ -27,6 +27,7 @@ export interface PlayerState {
|
||||
status: PlayerStatus
|
||||
mode: PlayerMode
|
||||
volume: number
|
||||
previous_volume: number
|
||||
position: number
|
||||
duration?: number
|
||||
index?: number
|
||||
@@ -107,6 +108,20 @@ export class PlayerService {
|
||||
return apiClient.post<MessageResponse>('/api/v1/player/volume', { volume })
|
||||
}
|
||||
|
||||
/**
|
||||
* Mute playback
|
||||
*/
|
||||
async mute(): Promise<MessageResponse> {
|
||||
return apiClient.post<MessageResponse>('/api/v1/player/mute')
|
||||
}
|
||||
|
||||
/**
|
||||
* Unmute playback
|
||||
*/
|
||||
async unmute(): Promise<MessageResponse> {
|
||||
return apiClient.post<MessageResponse>('/api/v1/player/unmute')
|
||||
}
|
||||
|
||||
/**
|
||||
* Set playback mode
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user