ReferenceHTTP API
mediaPlayer
The mediaPlayer router: 19 methods of the media-player capability, with tier, scope, input and output.
Capability media-player · scope device · mode singleton · source packages/types/src/capabilities/media-player.cap.ts:150.
Every method is called at /trpc/mediaPlayer.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
turnOn | mutation | protected | create | yes |
turnOff | mutation | protected | create | yes |
volumeUp | mutation | protected | create | yes |
volumeDown | mutation | protected | create | yes |
channelUp | mutation | protected | create | yes |
channelDown | mutation | protected | create | yes |
play | mutation | protected | create | yes |
pause | mutation | protected | create | yes |
stop | mutation | protected | create | yes |
next | mutation | protected | create | yes |
previous | mutation | protected | create | yes |
setVolume | mutation | protected | create | yes |
setMute | mutation | protected | create | yes |
setShuffle | mutation | protected | create | yes |
setRepeat | mutation | protected | create | yes |
selectSource | mutation | protected | create | yes |
seek | mutation | protected | create | yes |
playMedia | mutation | protected | create | yes |
mediaPlayer.getStatus
- Kind: query —
GET /trpc/mediaPlayer.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.getStatuson your hub
Input
{ deviceId: number }Output
MediaPlayerStatusSchemaShapes: MediaPlayerStatusSchema
mediaPlayer.turnOn
- Kind: mutation —
POST /trpc/mediaPlayer.turnOn - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.turnOnon your hub
Input
{ deviceId: number }Output
voidmediaPlayer.turnOff
- Kind: mutation —
POST /trpc/mediaPlayer.turnOff - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.turnOffon your hub
Input
{ deviceId: number }Output
voidmediaPlayer.volumeUp
- Kind: mutation —
POST /trpc/mediaPlayer.volumeUp - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.volumeUpon your hub
Input
{ deviceId: number; steps?: number = 1 }Output
voidmediaPlayer.volumeDown
- Kind: mutation —
POST /trpc/mediaPlayer.volumeDown - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.volumeDownon your hub
Input
{ deviceId: number; steps?: number = 1 }Output
voidmediaPlayer.channelUp
- Kind: mutation —
POST /trpc/mediaPlayer.channelUp - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.channelUpon your hub
Input
{ deviceId: number; steps?: number = 1 }Output
voidmediaPlayer.channelDown
- Kind: mutation —
POST /trpc/mediaPlayer.channelDown - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.channelDownon your hub
Input
{ deviceId: number; steps?: number = 1 }Output
voidmediaPlayer.play
- Kind: mutation —
POST /trpc/mediaPlayer.play - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.playon your hub
Input
{ deviceId: number }Output
voidmediaPlayer.pause
- Kind: mutation —
POST /trpc/mediaPlayer.pause - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.pauseon your hub
Input
{ deviceId: number }Output
voidmediaPlayer.stop
- Kind: mutation —
POST /trpc/mediaPlayer.stop - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.stopon your hub
Input
{ deviceId: number }Output
voidmediaPlayer.next
- Kind: mutation —
POST /trpc/mediaPlayer.next - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.nexton your hub
Input
{ deviceId: number }Output
voidmediaPlayer.previous
- Kind: mutation —
POST /trpc/mediaPlayer.previous - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.previouson your hub
Input
{ deviceId: number }Output
voidmediaPlayer.setVolume
- Kind: mutation —
POST /trpc/mediaPlayer.setVolume - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.setVolumeon your hub
Input
{ deviceId: number; volumeLevel: number }Output
voidmediaPlayer.setMute
- Kind: mutation —
POST /trpc/mediaPlayer.setMute - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.setMuteon your hub
Input
{ deviceId: number; muted: boolean }Output
voidmediaPlayer.setShuffle
- Kind: mutation —
POST /trpc/mediaPlayer.setShuffle - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.setShuffleon your hub
Input
{ deviceId: number; shuffle: boolean }Output
voidmediaPlayer.setRepeat
- Kind: mutation —
POST /trpc/mediaPlayer.setRepeat - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.setRepeaton your hub
Input
{ deviceId: number; repeat: MediaPlayerRepeatSchema }Output
voidShapes: MediaPlayerRepeatSchema
mediaPlayer.selectSource
- Kind: mutation —
POST /trpc/mediaPlayer.selectSource - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.selectSourceon your hub
Input
{ deviceId: number; source: string }Output
voidmediaPlayer.seek
- Kind: mutation —
POST /trpc/mediaPlayer.seek - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.seekon your hub
Input
{ deviceId: number; position: number }Output
voidmediaPlayer.playMedia
- Kind: mutation —
POST /trpc/mediaPlayer.playMedia - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitymedia-player, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=mediaPlayer.playMediaon your hub
Input
{ deviceId: number; mediaId: string; mediaType: string }Output
void