Dominevo
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.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
turnOnmutationprotectedcreateyes
turnOffmutationprotectedcreateyes
volumeUpmutationprotectedcreateyes
volumeDownmutationprotectedcreateyes
channelUpmutationprotectedcreateyes
channelDownmutationprotectedcreateyes
playmutationprotectedcreateyes
pausemutationprotectedcreateyes
stopmutationprotectedcreateyes
nextmutationprotectedcreateyes
previousmutationprotectedcreateyes
setVolumemutationprotectedcreateyes
setMutemutationprotectedcreateyes
setShufflemutationprotectedcreateyes
setRepeatmutationprotectedcreateyes
selectSourcemutationprotectedcreateyes
seekmutationprotectedcreateyes
playMediamutationprotectedcreateyes

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: view on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.getStatus on your hub

Input

{ deviceId: number }

Output

MediaPlayerStatusSchema

Shapes: MediaPlayerStatusSchema

mediaPlayer.turnOn

  • Kind: mutation — POST /trpc/mediaPlayer.turnOn
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.turnOn on your hub

Input

{ deviceId: number }

Output

void

mediaPlayer.turnOff

  • Kind: mutation — POST /trpc/mediaPlayer.turnOff
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.turnOff on your hub

Input

{ deviceId: number }

Output

void

mediaPlayer.volumeUp

  • Kind: mutation — POST /trpc/mediaPlayer.volumeUp
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.volumeUp on your hub

Input

{ deviceId: number; steps?: number = 1 }

Output

void

mediaPlayer.volumeDown

  • Kind: mutation — POST /trpc/mediaPlayer.volumeDown
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.volumeDown on your hub

Input

{ deviceId: number; steps?: number = 1 }

Output

void

mediaPlayer.channelUp

  • Kind: mutation — POST /trpc/mediaPlayer.channelUp
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.channelUp on your hub

Input

{ deviceId: number; steps?: number = 1 }

Output

void

mediaPlayer.channelDown

  • Kind: mutation — POST /trpc/mediaPlayer.channelDown
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.channelDown on your hub

Input

{ deviceId: number; steps?: number = 1 }

Output

void

mediaPlayer.play

  • Kind: mutation — POST /trpc/mediaPlayer.play
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.play on your hub

Input

{ deviceId: number }

Output

void

mediaPlayer.pause

  • Kind: mutation — POST /trpc/mediaPlayer.pause
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.pause on your hub

Input

{ deviceId: number }

Output

void

mediaPlayer.stop

  • Kind: mutation — POST /trpc/mediaPlayer.stop
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.stop on your hub

Input

{ deviceId: number }

Output

void

mediaPlayer.next

  • Kind: mutation — POST /trpc/mediaPlayer.next
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.next on your hub

Input

{ deviceId: number }

Output

void

mediaPlayer.previous

  • Kind: mutation — POST /trpc/mediaPlayer.previous
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.previous on your hub

Input

{ deviceId: number }

Output

void

mediaPlayer.setVolume

  • Kind: mutation — POST /trpc/mediaPlayer.setVolume
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.setVolume on your hub

Input

{ deviceId: number; volumeLevel: number }

Output

void

mediaPlayer.setMute

  • Kind: mutation — POST /trpc/mediaPlayer.setMute
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.setMute on your hub

Input

{ deviceId: number; muted: boolean }

Output

void

mediaPlayer.setShuffle

  • Kind: mutation — POST /trpc/mediaPlayer.setShuffle
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.setShuffle on your hub

Input

{ deviceId: number; shuffle: boolean }

Output

void

mediaPlayer.setRepeat

  • Kind: mutation — POST /trpc/mediaPlayer.setRepeat
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.setRepeat on your hub

Input

{ deviceId: number; repeat: MediaPlayerRepeatSchema }

Output

void

Shapes: MediaPlayerRepeatSchema

mediaPlayer.selectSource

  • Kind: mutation — POST /trpc/mediaPlayer.selectSource
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.selectSource on your hub

Input

{ deviceId: number; source: string }

Output

void

mediaPlayer.seek

  • Kind: mutation — POST /trpc/mediaPlayer.seek
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.seek on your hub

Input

{ deviceId: number; position: number }

Output

void

mediaPlayer.playMedia

  • Kind: mutation — POST /trpc/mediaPlayer.playMedia
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability media-player, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=mediaPlayer.playMedia on your hub

Input

{ deviceId: number; mediaId: string; mediaType: string }

Output

void