Easy recording of Stream objects straightaway from the browser.

> WARNING: Performing browser local recording of remote streams may cause some troubles. A long waiting time may be required after calling LocalRecorder.stop() in this case

### Hierarchy

- LocalRecorder

## Index

### Properties

- state

### Methods

- clean
- download
- getBlob
- pause
- preview
- record
- resume
- stop
- uploadAsBinary
- uploadAsMultipartfile

## Properties

### state

state: LocalRecorderState

- Defined in OpenVidu/LocalRecorder.ts:34

## Methods

### clean

- clean(): void

- - Defined in OpenVidu/LocalRecorder.ts:226

  Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets state to `READY` so the recording can start again

  #### Returns void

### download

- download(): void

- - Defined in OpenVidu/LocalRecorder.ts:245

  Downloads the recorded video through the browser. state property must be `FINISHED`

  #### Returns void

### getBlob

- getBlob(): Blob

- - Defined in OpenVidu/LocalRecorder.ts:266

  Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. state property must be `FINISHED`

  #### Returns Blob

### pause

- pause(): Promise<any>

- - Defined in OpenVidu/LocalRecorder.ts:158

  Pauses the recording of the Stream. state property must be `RECORDING`. After method succeeds is set to `PAUSED`

  #### Returns Promise<any>

  A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully paused and rejected with an Error object if not

### preview

- preview(parentElement: any): HTMLVideoElement

- - Defined in OpenVidu/LocalRecorder.ts:194

  Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. state property must be `FINISHED`

  #### Parameters

  - ##### parentElement: any

  #### Returns HTMLVideoElement

### record

- record(): Promise<any>

- - Defined in OpenVidu/LocalRecorder.ts:60

  Starts the recording of the Stream. state property must be `READY`. After method succeeds is set to `RECORDING`

  #### Returns Promise<any>

  A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully started and rejected with an Error object if not

### resume

- resume(): Promise<any>

- - Defined in OpenVidu/LocalRecorder.ts:176

  Resumes the recording of the Stream. state property must be `PAUSED`. After method succeeds is set to `RECORDING`

  #### Returns Promise<any>

  A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully resumed and rejected with an Error object if not

### stop

- stop(): Promise<any>

- - Defined in OpenVidu/LocalRecorder.ts:136

  Ends the recording of the Stream. state property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED`

  #### Returns Promise<any>

  A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully stopped and rejected with an Error object if not

### uploadAsBinary

- uploadAsBinary(endpoint: string, headers?: any): Promise<any>

- - Defined in OpenVidu/LocalRecorder.ts:285

  Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. state property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:

      var headers = {
       "Cookie": "$Version=1; Skin=new;",
       "Authorization":"Basic QWxhZGpbjpuIHNlctZQ=="
      }

  #### Parameters

  - ##### endpoint: string

  - ##### Optional headers: any

  #### Returns Promise<any>

  A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not

### uploadAsMultipartfile

- uploadAsMultipartfile(endpoint: string, headers?: any): Promise<any>

- - Defined in OpenVidu/LocalRecorder.ts:325

  Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. state property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:

      var headers = {
       "Cookie": "$Version=1; Skin=new;",
       "Authorization":"Basic QWxhZGpbjpuIHNlctZQ=="
      }

  #### Parameters

  - ##### endpoint: string

  - ##### Optional headers: any

  #### Returns Promise<any>

  A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not:

Generated using TypeDoc