Banuba WebAR JavaScript API Reference
    Preparing search index...

    Class VideoRecorder

    Player output to video

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

    Hierarchy

    • MediaRecorder
    • MediaRecorderSSR
      • VideoRecorder
    Index

    Constructors

    • Parameters

      • player: Player
      • options: MediaRecorderOptions

      Returns VideoRecorder

    Properties

    audioBitsPerSecond: number

    The audioBitsPerSecond read-only property of the MediaRecorder interface returns the audio encoding bit rate in use.

    MDN Reference

    mimeType: string

    The mimeType read-only property of the MediaRecorder interface returns the MIME media type that was specified when creating the MediaRecorder object, or, if none was specified, which was chosen by the browser.

    MDN Reference

    ondataavailable: ((this: MediaRecorder, ev: BlobEvent) => any) | null
    onerror: ((this: MediaRecorder, ev: ErrorEvent) => any) | null
    onpause: ((this: MediaRecorder, ev: Event) => any) | null
    onresume: ((this: MediaRecorder, ev: Event) => any) | null
    onstart: ((this: MediaRecorder, ev: Event) => any) | null
    onstop: ((this: MediaRecorder, ev: Event) => any) | null
    state: RecordingState

    The state read-only property of the MediaRecorder interface returns the current state of the current MediaRecorder object.

    MDN Reference

    stream: MediaStream

    The stream read-only property of the MediaRecorder interface returns the stream that was passed into the MediaRecorder.MediaRecorder constructor when the MediaRecorder was created.

    MDN Reference

    videoBitsPerSecond: number

    The videoBitsPerSecond read-only property of the MediaRecorder interface returns the video encoding bit rate in use.

    MDN Reference

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Type Parameters

      • K extends keyof MediaRecorderEventMap

      Parameters

      • type: K
      • listener: (this: MediaRecorder, ev: MediaRecorderEventMap[K]) => any
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Pauses video recording

      Returns void

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Type Parameters

      • K extends keyof MediaRecorderEventMap

      Parameters

      • type: K
      • listener: (this: MediaRecorder, ev: MediaRecorderEventMap[K]) => any
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • The requestData() method of the MediaRecorder interface is used to raise a MediaRecorder.dataavailable_event event containing a called.

      MDN Reference

      Returns void

    • Resumes video recording after a pause

      Returns void

    • Start video recording

      Returns void

    • Stops video recording

      Returns Promise<Blob>

      The recorder video

    • The isTypeSupported() static method of the MediaRecorder interface returns a Boolean which is true if the MIME media type specified is one the user agent should be able to successfully record.

      MDN Reference

      Parameters

      • type: string

      Returns boolean