From 84bc5b33b090ab3c0883eb76c39e53f52638c3ee Mon Sep 17 00:00:00 2001 From: Olivier Lando Date: Tue, 7 Feb 2023 11:55:20 +0100 Subject: [PATCH] Make getSupportedMimeTypes static --- CHANGELOG.md | 3 +++ package-lock.json | 4 ++-- package.json | 2 +- src/index.ts | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ce1938..1dc2641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to this project will be documented in this file. +## [1.0.10] - 2023-02-07 +- Make `getSupportedMimeTypes` static + ## [1.0.9] - 2023-02-07 - Add `mimeType` and `generateFileOnStop` options diff --git a/package-lock.json b/package-lock.json index fa03b30..ae883dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@api.video/media-recorder", - "version": "1.0.9", + "version": "1.0.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@api.video/media-recorder", - "version": "1.0.9", + "version": "1.0.10", "license": "MIT", "dependencies": { "@api.video/video-uploader": "^1.1.3", diff --git a/package.json b/package.json index d554b0a..82a27e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@api.video/media-recorder", - "version": "1.0.9", + "version": "1.0.10", "description": "api.video media recorder - upload video from your webcam with ease", "repository": { "type": "git", diff --git a/src/index.ts b/src/index.ts index bcc6588..f62e0c0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,7 +36,7 @@ export class ApiVideoMediaRecorder { this.generateFileOnStop = options.generateFileOnStop || false; const findBestMimeType = () => { - const supportedTypes = this.getSupportedMimeTypes(); + const supportedTypes = ApiVideoMediaRecorder.getSupportedMimeTypes(); if (supportedTypes.length === 0) { throw new Error("No compatible supported video mime type"); } @@ -132,7 +132,7 @@ export class ApiVideoMediaRecorder { this.mediaRecorder.pause(); } - public getSupportedMimeTypes() { + public static getSupportedMimeTypes() { const VIDEO_TYPES = [ "mp4", "webm",