Hierarchy

  • OpenVidu

Constructors

  • Parameters

    • hostname: string

      URL where your OpenVidu deployment is up an running. It must be the full URL (e.g. https://12.34.56.78:1234/)

    • secret: string

      Secret configured in your OpenVidu deployment

    Returns OpenVidu

Properties

activeSessions: Session[] = []

Array of active sessions. This value will remain unchanged since the last time method fetch was called. Exceptions to this rule are:

  • Calling createSession automatically adds the new Session object to the local collection.
  • Calling fetch updates that specific Session status
  • Calling close automatically removes the Session from the list of active Sessions
  • Calling forceDisconnect automatically updates the inner affected connections for that specific Session
  • Calling forceUnpublish also automatically updates the inner affected connections for that specific Session
  • Calling updateConnection automatically updates the inner affected connection for that specific Session
  • Calling startRecording and stopRecording automatically updates the recording status of the Session (recording)

To get the array of active sessions with their current actual value, you must call fetch before consulting property activeSessions

Methods

  • Creates an OpenVidu session. The session identifier will be available at property sessionId

    Returns

    A Promise that is resolved to the Session if success and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    This method will never return an Error with status 409. If a session with the same customSessionId already exists in OpenVidu Server, a fetch operation is performed in the background and the updated Session object is returned.

    Parameters

    Returns Promise<Session>

  • Deletes a Recording. The recording must have status stopped, ready or failed

    Returns

    A Promise that is resolved if the Recording was successfully deleted and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    • recordingId: string

    Returns Promise<Error>

  • Disable all logging except error level

    Returns void

  • Updates every property of every active Session with the current status they have in OpenVidu Server. After calling this method you can access the updated array of active sessions in activeSessions

    Returns

    A promise resolved to true if any Session status has changed with respect to the server, or to false if not. This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client

    Returns Promise<boolean>

  • Gets an existing Recording

    Returns

    A Promise that is resolved to the Recording if it successfully stopped and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    • recordingId: string

      The id property of the Recording you want to retrieve

    Returns Promise<Recording>

  • Lists all existing recordings

    Returns

    A Promise that is resolved to an array with all existing recordings

    Returns Promise<Recording[]>

  • Starts the broadcast of a Session

    Returns

    A Promise that is resolved if the broadcast successfully started and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    • sessionId: string

      The sessionId of the Session you want to start broadcasting

    • broadcastUrl: string

      The URL where to broadcast

    Returns Promise<void>

  • Starts the broadcast of a Session

    Returns

    A Promise that is resolved if the broadcast successfully started and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    Returns Promise<void>

  • Starts the recording of a Session

    Returns

    A Promise that is resolved to the Recording if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    • sessionId: string

      The sessionId of the Session you want to start recording

    Returns Promise<Recording>

  • Starts the recording of a Session

    Returns

    A Promise that is resolved to the Recording if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    • sessionId: string

      The sessionId of the Session you want to start recording

    • name: string

      The name you want to give to the video file. You can access this same value in your clients on recording events (recordingStarted, recordingStopped)

    Returns Promise<Recording>

  • Starts the recording of a Session

    Returns

    A Promise that is resolved to the Recording if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    Returns Promise<Recording>

  • Stops the broadcast of a Session

    Returns

    A Promise that is resolved if the broadcast successfully stopped and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    • sessionId: string

      The sessionId of the Session you want to stop broadcasting

    Returns Promise<void>

  • Stops the recording of a Session

    Returns

    A Promise that is resolved to the Recording if it successfully stopped and rejected with an Error object if not. This Error object has as message property with a status code carrying a specific meaning (see REST API).

    Parameters

    • recordingId: string

      The id property of the Recording you want to stop

    Returns Promise<Recording>

Generated using TypeDoc