Skip to main content

Media Info

type MediaType =
| 'image'
| 'music'
| 'unknown'
| 'video'

type MediaPlaybackStatus =
| 'changing'
| 'closed'
| 'opened'
| 'paused'
| 'playing'
| 'stopped'

type MediaPlaybackRepeatMode =
| 'list'
| 'none'
| 'track'

type MediaInfoPayload = {
type: MediaType
title: string
album: string
cover?: ImageContentPayload
trackCount: number
trackNumber: number
artist: string
genres: string[]
status: MediaPlaybackStatus
repeatMode: MediaPlaybackRepeatMode
shuffle: boolean
rate: number
duration: number
position: number
}

This data is sent when the currently playing media changes or the progress of the current media changes.

info

The cover is usually a data URL.