Options
All
  • Public
  • Public/Protected
  • All
Menu

Player output to video

⚠️ The VideoRecorder works only on the platforms which supports MediaRecorder API.

If you'd like to use the VideoRecorder on environments which don't support the MediaRecorder API, consider using a global polyfill.

Hierarchy

  • MediaRecorder
  • MediaRecorderSSR
    • VideoRecorder

Index

Constructors

constructor

  • Parameters

    • player: Player
    • options: MediaRecorderOptions

    Returns VideoRecorder

Properties

Readonly audioBitrateMode

audioBitrateMode: BitrateMode

Readonly audioBitsPerSecond

audioBitsPerSecond: number

Readonly mimeType

mimeType: string

ondataavailable

ondataavailable: null | ((event: BlobEvent) => any)

onerror

onerror: null | ((event: Event) => any)

onpause

onpause: null | ((event: Event) => any)

onresume

onresume: null | ((event: Event) => any)

onstart

onstart: null | ((event: Event) => any)

onstop

onstop: null | ((event: Event) => any)

Readonly state

state: "paused" | "inactive" | "recording"

Readonly stream

stream: MediaStream

Readonly videoBitsPerSecond

videoBitsPerSecond: number

Methods

addEventListener

  • addEventListener<K>(type: K, listener: (ev: MediaRecorderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
  • addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
  • Type parameters

    • K: keyof MediaRecorderEventMap

    Parameters

    • type: K
    • listener: (ev: MediaRecorderEventMap[K]) => any
        • (ev: MediaRecorderEventMap[K]): any
        • Parameters

          • ev: MediaRecorderEventMap[K]

          Returns any

    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

pause

  • pause(): void
  • Pauses video recording

    Returns void

removeEventListener

  • removeEventListener<K>(type: K, listener: (ev: MediaRecorderEventMap[K]) => any, options?: boolean | EventListenerOptions): void
  • removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
  • Type parameters

    • K: keyof MediaRecorderEventMap

    Parameters

    • type: K
    • listener: (ev: MediaRecorderEventMap[K]) => any
        • (ev: MediaRecorderEventMap[K]): any
        • Parameters

          • ev: MediaRecorderEventMap[K]

          Returns any

    • Optional options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

requestData

  • requestData(): void
  • Returns void

resume

  • resume(): void
  • Resumes video recording after a pause

    Returns void

start

  • start(): void
  • Start video recording

    Returns void

stop

  • stop(): Promise<Blob>
  • Stops video recording

    Returns Promise<Blob>

    The recorder video

Static isTypeSupported

  • isTypeSupported(type: string): boolean
  • Parameters

    • type: string

    Returns boolean