Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RecordingEvent

Defines the following events:

  • recordingStarted: dispatched by Session
  • recordingStopped: dispatched by Session

Hierarchy

Index

Properties

cancelable

cancelable: boolean

Whether the event has a default behavior that may be prevented by calling Event.preventDefault

id

id: string

The recording ID generated in openvidu-server

Optional name

name: undefined | string

The recording name you supplied to openvidu-server. For example, to name your recording file MY_RECORDING:

  • With API REST: POST to /api/recordings/start passing JSON body {"session":"sessionId","name":"MY_RECORDING"}
  • With openvidu-java-client: OpenVidu.startRecording(sessionId, "MY_RECORDING") or OpenVidu.startRecording(sessionId, new RecordingProperties.Builder().name("MY_RECORDING").build())
  • With openvidu-node-client: OpenVidu.startRecording(sessionId, "MY_RECORDING") or OpenVidu.startRecording(sessionId, {name: "MY_RECORDING"})

If no name is supplied, this property will be undefined and the recorded file will be named after property id

Optional reason

reason: undefined | string

For 'recordingStopped' event:

  • "recordingStoppedByServer": the recording has been gracefully stopped by the application
  • "sessionClosedByServer": the Session has been closed by the application
  • "automaticStop": see Automatic stop of recordings
  • "mediaServerDisconnect": OpenVidu Media Server has crashed or lost its connection. A new media server instance is active and the recording has been stopped (no media streams are available in the new media server)

For 'recordingStarted' empty string

target

The object that dispatched the event

type

type: string

The type of event. This is the same string you pass as first parameter when calling method on() of any object implementing EventDispatcher interface

Methods

isDefaultPrevented

  • isDefaultPrevented(): boolean

preventDefault

  • preventDefault(): void
  • Prevents the default behavior of the event. The following events have a default behavior:

    • sessionDisconnected: dispatched by Session object, automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and also deletes any HTML video element associated to each Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as targetElement in method Session.subscribe or by calling Subscriber.createVideoElement). For every video removed, each Subscriber object will also dispatch a videoElementDestroyed event.

    • streamDestroyed:

      • If dispatched by a Publisher (you have unpublished): automatically stops all media tracks and deletes any HTML video element associated to it (only those created by OpenVidu Browser, either by passing a valid parameter as targetElement in method OpenVidu.initPublisher or by calling Publisher.createVideoElement). For every video removed, the Publisher object will also dispatch a videoElementDestroyed event.
      • If dispatched by Session (other user has unpublished): automatically unsubscribes the proper Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and also deletes any HTML video element associated to that Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as targetElement in method Session.subscribe or by calling Subscriber.createVideoElement). For every video removed, the Subscriber object will also dispatch a videoElementDestroyed event.

    Returns void

Generated using TypeDoc