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 0.0.1 to 1.0.1

CONTRIBUTING.md

7

CHANGELOG.md
# Changelog
All changes to this project will be documented in this file.
## [1.0.1] - 2021-11-25
- Bump dependancies
## [1.0.0] - 2021-11-16
- Bump dependancies
- Readme update
## [0.0.1] - 2021-11-01
- First version

8

package.json
{
"name": "@api.video/media-recorder",
"version": "0.0.1",
"version": "1.0.1",
"description": "api.video media recorder - upload video from your webcam with ease",

@@ -27,7 +27,7 @@ "repository": {

"@types/jsdom": "^16.2.6",
"@types/mocha": "^8.2.0",
"@types/mocha": "^9.0.0",
"chai": "^4.2.0",
"jsdom": "^16.4.0",
"jsdom-global": "^3.0.2",
"mocha": "^8.2.1",
"mocha": "^9.1.3",
"ts-loader": "^8.0.3",

@@ -42,5 +42,5 @@ "ts-node": "^9.1.1",

"dependencies": {
"@api.video/video-uploader": "^0.0.6",
"@api.video/video-uploader": "^1.0.2",
"core-js": "^3.8.3"
}
}

@@ -1,22 +0,43 @@

[![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video)
[![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video)   [![badge](https://img.shields.io/github/stars/apivideo/api.video-typescript-media-recorder?style=social)](https://github.com/apivideo/api.video-typescript-media-recorder)   [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)
![](https://github.com/apivideo/API_OAS_file/blob/master/apivideo_banner.png)
<h1 align="center">api.video media recorder</h1>
[![badge](https://img.shields.io/github/stars/apivideo/php-api-client?style=social)](https://github.com/apivideo/php-api-client)
![npm](https://img.shields.io/npm/v/@api.video/media-recorder) ![ts](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label)
[![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)
![](https://github.com/apivideo/API_OAS_file/blob/master/apivideo_banner.png)
[api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
[api.video](https://api.video) is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
# Table of contents
- [Table of contents](#table-of-contents)
- [Project description](#project-description)
- [Getting started](#getting-started)
- [Installation](#installation)
- [Installation method #1: requirejs](#installation-method-1-requirejs)
- [Installation method #2: typescript](#installation-method-2-typescript)
- [Simple include in a javascript project](#simple-include-in-a-javascript-project)
- [Documentation](#documentation)
- [Instanciation](#instanciation)
- [Options](#options)
- [Using a delegated upload token (recommended):](#using-a-delegated-upload-token-recommended)
- [Using an access token (discouraged):](#using-an-access-token-discouraged)
- [Common options](#common-options)
- [Example](#example)
- [Methods](#methods)
- [`start()`](#start)
- [`stop()`](#stop)
- [Full example](#full-example)
# api.video typescript media recorder
![npm](https://img.shields.io/npm/v/@api.video/media-recorder) ![ts](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label)
# Project description
Typescript library to easily upload data from a [MediaStream](https://developer.mozilla.org/fr/docs/Web/API/MediaStream) to api.video.
It can be used to upload a video to api.video from the user's webcam with ease, as well as from a screen recording.
# Installation
# Getting started
## Installation method #1: requirejs
## Installation
### Installation method #1: requirejs
If you use requirejs you can add the library as a dependency to your project with

@@ -39,3 +60,3 @@

## Installation method #2: typescript
### Installation method #2: typescript

@@ -60,3 +81,3 @@ If you use Typescript you can add the library as a dependency to your project with

## Simple include in a javascript project
### Simple include in a javascript project

@@ -85,11 +106,11 @@ Include the library in your HTML file like so:

# Documentation
## Instanciation
# Instanciation
### Options
## Options
The media recorder object is instanciated using a [MediaStream](https://developer.mozilla.org/fr/docs/Web/API/MediaStream) and an `options` object. Options to provide depend on the way you want to authenticate to the API: either using a delegated upload token (recommanded), or using a usual access token.
### Using a delegated upload token (recommended):
#### Using a delegated upload token (recommended):

@@ -105,3 +126,3 @@ Using delegated upload tokens for authentication is best options when uploading from the client side. To know more about delegated upload token, read the dedicated article on api.video's blog: [Delegated Uploads](https://api.video/blog/tutorials/delegated-uploads).

### Using an access token (discouraged):
#### Using an access token (discouraged):

@@ -118,3 +139,3 @@ **Warning**: be aware that exposing your access token client-side can lead to huge security issues. Use this method only if you know what you're doing :).

### Common options
#### Common options

@@ -128,3 +149,3 @@

## Example
### Example

@@ -138,9 +159,9 @@ ```javascript

# Methods
## Methods
## `start()`
### `start()`
The start() method starts the upload of the content retrieved from the MediaStream. It takes no parameter.
### Example
**Example**

@@ -153,7 +174,7 @@ ```javascript

## `stop()`
### `stop()`
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.
### Example
**Example**

@@ -160,0 +181,0 @@ ```javascript

Sorry, the diff of this file is not supported yet

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