/* ── Browser API extensions ── */

export {}

declare global {
  interface Navigator {
    mediaCapabilities?: {
      decodingInfo(configuration: unknown): Promise<unknown>
    }
  }

  interface VideoPlaybackQuality {
    droppedVideoFrames: number
  }

  interface HTMLVideoElement {
    getVideoPlaybackQuality?(): VideoPlaybackQuality
    audioTracks?: { length: number; [i: number]: { enabled: boolean; language?: string } }
    mozPreservesPitch?: boolean
    webkitPreservesPitch?: boolean
  }

  interface Document {
    pictureInPictureElement?: Element | null
    exitPictureInPicture?(): Promise<void>
  }

  interface Window {
    webkitAudioContext?: typeof AudioContext
    SubtitlesOctopus?: unknown
  }
}
