Skip to content

Commit

Permalink
#615, @thijstriemstra plz test on firefox, still using TRY-CATCH though
Browse files Browse the repository at this point in the history
  • Loading branch information
muaz-khan committed May 17, 2020
1 parent 56af2e4 commit 1fd3e03
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -74,8 +74,8 @@ navigator.mediaDevices.getUserMedia({
<!-- recommended -->
<script src="https://www.WebRTC-Experiment.com/RecordRTC.js"></script>

<!-- use 5.6.0 or any other version on cdnjs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/RecordRTC/5.6.0/RecordRTC.js"></script>
<!-- use 5.6.1 or any other version on cdnjs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/RecordRTC/5.6.1/RecordRTC.js"></script>

<!-- NPM i.e. "npm install recordrtc" -->
<script src="node_modules/recordrtc/RecordRTC.js"></script>
Expand Down
20 changes: 12 additions & 8 deletions RecordRTC.js
@@ -1,9 +1,9 @@
'use strict';

// Last time updated: 2020-05-16 3:19:43 PM UTC
// Last time updated: 2020-05-17 5:04:38 PM UTC

// ________________
// RecordRTC v5.6.0
// RecordRTC v5.6.1

// Open-Sourced: https://github.com/muaz-khan/RecordRTC

Expand Down Expand Up @@ -781,7 +781,7 @@ function RecordRTC(mediaStream, config) {
* @example
* alert(recorder.version);
*/
version: '5.6.0'
version: '5.6.1'
};

if (!this) {
Expand All @@ -799,7 +799,7 @@ function RecordRTC(mediaStream, config) {
return returnObject;
}

RecordRTC.version = '5.6.0';
RecordRTC.version = '5.6.1';

if (typeof module !== 'undefined' /* && !!module.exports*/ ) {
module.exports = RecordRTC;
Expand Down Expand Up @@ -5924,7 +5924,7 @@ function RecordRTCPromisesHandler(mediaStream, options) {
* @example
* alert(recorder.version);
*/
this.version = '5.6.0';
this.version = '5.6.1';
}

if (typeof RecordRTC !== 'undefined') {
Expand Down Expand Up @@ -6005,9 +6005,13 @@ function WebAssemblyRecorder(stream, config) {
}

ctx.drawImage(video, 0, 0);
controller.enqueue(
ctx.getImageData(0, 0, config.width, config.height)
);
if (controller._controlledReadableStream.state !== 'closed') {
try {
controller.enqueue(
ctx.getImageData(0, 0, config.width, config.height)
);
} catch (e) {}
}
}, frameTimeout);
};
video.play();
Expand Down
10 changes: 5 additions & 5 deletions RecordRTC.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "recordrtc",
"version": "5.6.0",
"version": "5.6.1",
"authors": [
{
"name": "Muaz Khan",
Expand Down
10 changes: 7 additions & 3 deletions dev/WebAssemblyRecorder.js
Expand Up @@ -72,9 +72,13 @@ function WebAssemblyRecorder(stream, config) {
}

ctx.drawImage(video, 0, 0);
controller.enqueue(
ctx.getImageData(0, 0, config.width, config.height)
);
if (controller._controlledReadableStream.state !== 'closed') {
try {
controller.enqueue(
ctx.getImageData(0, 0, config.width, config.height)
);
} catch (e) {}
}
}, frameTimeout);
};
video.play();
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "recordrtc",
"preferGlobal": false,
"version": "5.6.0",
"version": "5.6.1",
"author": {
"name": "Muaz Khan",
"email": "muazkh@gmail.com",
Expand Down
4 changes: 3 additions & 1 deletion simple-demos/WebAssemblyRecorder.html
Expand Up @@ -10,7 +10,7 @@
}
</style>

<h1>WebAssembly Recorder using RecordRTC</h1>
<h1>WebAssembly Recorder using RecordRTC <span id="version"></span></h1>
<button id="start">Start Recording</button>
<button id="stop" disabled>Stop Recording</button>
<br><br>
Expand All @@ -22,6 +22,8 @@ <h1>WebAssembly Recorder using RecordRTC</h1>
<script src="/RecordRTC.js"></script>

<script>
document.getElementById('version').innerHTML = RecordRTC.version;

var recorder;

document.getElementById('start').onclick = function() {
Expand Down

0 comments on commit 1fd3e03

Please sign in to comment.