Socket
Socket
Sign inDemoInstall

@api.video/media-recorder

Package Overview
Dependencies
2
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

4

CHANGELOG.md
# Changelog
All changes to this project will be documented in this file.
## [1.0.5] - 2022-05-31
- Add `getMediaRecorderState()` method
- Fix `stop()` method when the recorder is not started
## [1.0.4] - 2022-05-24

@@ -5,0 +9,0 @@ - Prevent last uploaded part to be empty

3

dist/src/index.d.ts
import { ProgressiveUploaderOptionsWithUploadToken, ProgressiveUploaderOptionsWithAccessToken, VideoUploadResponse } from "@api.video/video-uploader";
export { ProgressiveUploaderOptionsWithAccessToken, ProgressiveUploaderOptionsWithUploadToken } from "@api.video/video-uploader";
export { ProgressiveUploaderOptionsWithAccessToken, ProgressiveUploaderOptionsWithUploadToken, VideoUploadResponse } from "@api.video/video-uploader";
export interface Options {

@@ -15,2 +15,3 @@ title?: string;

}): void;
getMediaRecorderState(): RecordingState;
stop(): Promise<VideoUploadResponse>;

@@ -17,0 +18,0 @@ pause(): void;

{
"name": "@api.video/media-recorder",
"version": "1.0.4",
"version": "1.0.5",
"description": "api.video media recorder - upload video from your webcam with ease",

@@ -5,0 +5,0 @@ "repository": {

@@ -29,3 +29,4 @@ [![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video) &nbsp; [![badge](https://img.shields.io/github/stars/apivideo/api.video-typescript-media-recorder?style=social)](https://github.com/apivideo/api.video-typescript-media-recorder) &nbsp; [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)

- [Options](#options-1)
- [`stop()`](#stop)
- [`stop(): Promise<VideoUploadResponse>`](#stop-promisevideouploadresponse)
- [`getMediaRecorderState(): RecordingState`](#getmediarecorderstate-recordingstate)
- [Full example](#full-example)

@@ -177,6 +178,10 @@

### `stop()`
### `stop(): Promise<VideoUploadResponse>`
The start() method stops the media recording. It upload the last part of content retrieved from the MediaStream (this will start the aggregation of the video parts on the api.video side). It takes no parameter. It returns a Promise that resolves with the newly created video.
### `getMediaRecorderState(): RecordingState`
Return the state of the underlaying [MediaRecorder](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder).
**Example**

@@ -183,0 +188,0 @@

import { ProgressiveUploader, ProgressiveUploaderOptionsWithUploadToken, ProgressiveUploaderOptionsWithAccessToken, VideoUploadResponse } from "@api.video/video-uploader";
export { ProgressiveUploaderOptionsWithAccessToken, ProgressiveUploaderOptionsWithUploadToken } from "@api.video/video-uploader";
export { ProgressiveUploaderOptionsWithAccessToken, ProgressiveUploaderOptionsWithUploadToken, VideoUploadResponse } from "@api.video/video-uploader";

@@ -48,5 +48,9 @@ export interface Options {

public getMediaRecorderState(): RecordingState {
return this.mediaRecorder.state;
}
public stop(): Promise<VideoUploadResponse> {
this.mediaRecorder.stop();
return new Promise((resolve, reject) => {
this.mediaRecorder.stop();
this.onVideoAvailable = (v) => resolve(v)

@@ -53,0 +57,0 @@ })

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc