diff --git a/openvidu-browser/package.json b/openvidu-browser/package.json index 0d891a19..961533cc 100644 --- a/openvidu-browser/package.json +++ b/openvidu-browser/package.json @@ -4,7 +4,7 @@ "freeice": "2.2.2", "hark": "1.2.3", "jsnlog": "2.30.0", - "mime-types": "2.1.34", + "mime": "3.0.0", "platform": "1.3.6", "semver": "7.3.5", "uuid": "8.3.2", @@ -16,7 +16,6 @@ "devDependencies": { "@types/node": "17.0.8", "@types/platform": "1.3.4", - "@types/mime-types": "2.1.1", "browserify": "17.0.0", "grunt": "1.4.1", "grunt-cli": "1.4.3", diff --git a/openvidu-browser/src/OpenVidu/LocalRecorder.ts b/openvidu-browser/src/OpenVidu/LocalRecorder.ts index feb85073..23badb5f 100644 --- a/openvidu-browser/src/OpenVidu/LocalRecorder.ts +++ b/openvidu-browser/src/OpenVidu/LocalRecorder.ts @@ -19,7 +19,7 @@ import { Stream } from './Stream'; import { LocalRecorderState } from '../OpenViduInternal/Enums/LocalRecorderState'; import { OpenViduLogger } from '../OpenViduInternal/Logger/OpenViduLogger'; import { PlatformUtils } from '../OpenViduInternal/Utils/Platform'; -import * as mime from 'mime-types'; +import Mime = require('mime/lite'); /** * @hidden @@ -262,7 +262,7 @@ export class LocalRecorder { const url = window.URL.createObjectURL(this.blob); a.href = url; - a.download = this.id + '.' + mime.extension(this.blob!.type); + a.download = this.id + '.' + Mime.getExtension(this.blob!.type); a.click(); window.URL.revokeObjectURL(url); @@ -347,7 +347,7 @@ export class LocalRecorder { } 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 = () => { if (http.readyState === 4) {