|
@@ -22,7 +22,7 @@ export interface PlatformConfigType {
|
|
|
|
|
|
export interface InitConfigType extends DisplayMediaStreamConstraints {
|
|
|
uploadUrl?: string;
|
|
|
- resolution: ResolutionType;
|
|
|
+ resolution?: ResolutionType;
|
|
|
autoDownload?: boolean;
|
|
|
isElectron?: boolean;
|
|
|
platform?: PlatformType;
|
|
@@ -295,6 +295,7 @@ export class BasicSimaqRecorder extends EventEmitter {
|
|
|
this.recordChunks = [];
|
|
|
resolve(blobs);
|
|
|
} catch (error) {
|
|
|
+ this.emit('endRecord', null);
|
|
|
resolve([]);
|
|
|
}
|
|
|
});
|
|
@@ -321,7 +322,7 @@ export class BasicSimaqRecorder extends EventEmitter {
|
|
|
this.stream = new MediaStream([videoTrack, audioTrack]);
|
|
|
}
|
|
|
const mediaRecorder = new MediaRecorder(this.stream, {
|
|
|
- mimeType: 'video/webm;codecs=H264,opus',
|
|
|
+ mimeType: 'video/webm;codecs=vp9,opus',
|
|
|
audioBitsPerSecond: videoConstraints.value.audioBitsPerSecond,
|
|
|
videoBitsPerSecond: videoConstraints.value.videoBitsPerSecond,
|
|
|
});
|
|
@@ -351,7 +352,8 @@ export class BasicSimaqRecorder extends EventEmitter {
|
|
|
document.body.appendChild(a);
|
|
|
a.style.display = 'none';
|
|
|
a.href = url;
|
|
|
- a.download = 'test.mp4';
|
|
|
+ const name = new Date().getTime();
|
|
|
+ a.download = `${name}.mp4`;
|
|
|
a.click();
|
|
|
window.URL.revokeObjectURL(url);
|
|
|
}
|