Skip to content

Commit

Permalink
Merge pull request #16 from apivideo/make-getsupportedmimetypes-static
Browse files Browse the repository at this point in the history
Make getSupportedMimeTypes static
  • Loading branch information
olivier-lando authored Feb 7, 2023
2 parents fd419bb + 84bc5b3 commit 2b1e904
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -132,7 +132,7 @@ export class ApiVideoMediaRecorder {
this.mediaRecorder.pause();
}

public getSupportedMimeTypes() {
public static getSupportedMimeTypes() {
const VIDEO_TYPES = [
"mp4",
"webm",
Expand Down

0 comments on commit 2b1e904

Please sign in to comment.