mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: replace mime-types with mime dependency
parent
8976cba6ce
commit
925a51482d
|
@ -4,7 +4,7 @@
|
||||||
"freeice": "2.2.2",
|
"freeice": "2.2.2",
|
||||||
"hark": "1.2.3",
|
"hark": "1.2.3",
|
||||||
"jsnlog": "2.30.0",
|
"jsnlog": "2.30.0",
|
||||||
"mime-types": "2.1.34",
|
"mime": "3.0.0",
|
||||||
"platform": "1.3.6",
|
"platform": "1.3.6",
|
||||||
"semver": "7.3.5",
|
"semver": "7.3.5",
|
||||||
"uuid": "8.3.2",
|
"uuid": "8.3.2",
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "17.0.8",
|
"@types/node": "17.0.8",
|
||||||
"@types/platform": "1.3.4",
|
"@types/platform": "1.3.4",
|
||||||
"@types/mime-types": "2.1.1",
|
|
||||||
"browserify": "17.0.0",
|
"browserify": "17.0.0",
|
||||||
"grunt": "1.4.1",
|
"grunt": "1.4.1",
|
||||||
"grunt-cli": "1.4.3",
|
"grunt-cli": "1.4.3",
|
||||||
|
|
|
@ -19,7 +19,7 @@ import { Stream } from './Stream';
|
||||||
import { LocalRecorderState } from '../OpenViduInternal/Enums/LocalRecorderState';
|
import { LocalRecorderState } from '../OpenViduInternal/Enums/LocalRecorderState';
|
||||||
import { OpenViduLogger } from '../OpenViduInternal/Logger/OpenViduLogger';
|
import { OpenViduLogger } from '../OpenViduInternal/Logger/OpenViduLogger';
|
||||||
import { PlatformUtils } from '../OpenViduInternal/Utils/Platform';
|
import { PlatformUtils } from '../OpenViduInternal/Utils/Platform';
|
||||||
import * as mime from 'mime-types';
|
import Mime = require('mime/lite');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
|
@ -262,7 +262,7 @@ export class LocalRecorder {
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(<any>this.blob);
|
const url = window.URL.createObjectURL(<any>this.blob);
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = this.id + '.' + mime.extension(this.blob!.type);
|
a.download = this.id + '.' + Mime.getExtension(this.blob!.type);
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ export class LocalRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
const sendable = new FormData();
|
const sendable = new FormData();
|
||||||
sendable.append('file', this.blob!, this.id + '.' + mime.extension(this.blob!.type));
|
sendable.append('file', this.blob!, this.id + '.' + Mime.getExtension(this.blob!.type));
|
||||||
|
|
||||||
http.onreadystatechange = () => {
|
http.onreadystatechange = () => {
|
||||||
if (http.readyState === 4) {
|
if (http.readyState === 4) {
|
||||||
|
|
Loading…
Reference in New Issue