Skip to content

Commit

Permalink
Merge pull request muaz-khan#125 from stoneman1/master
Browse files Browse the repository at this point in the history
Made fixes so Opera can use MediaRecorder as well
  • Loading branch information
muaz-khan committed Apr 27, 2016
2 parents 859f07d + 93f1522 commit 797cfc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions dev/GetRecorderType.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ function GetRecorderType(mediaStream, config) {
recorder = CanvasRecorder;
}

// todo: enable below block when MediaRecorder in Chrome gets out of flags; and it also supports audio recording.
if (isMediaRecorderCompatible() && isChrome && recorder !== CanvasRecorder && recorder !== GifRecorder && typeof MediaRecorder !== 'undefined' && 'requestData' in MediaRecorder.prototype) {
if (isMediaRecorderCompatible() && recorder !== CanvasRecorder && recorder !== GifRecorder && typeof MediaRecorder !== 'undefined' && 'requestData' in MediaRecorder.prototype) {
if (mediaStream.getVideoTracks().length) {
recorder = MediaStreamRecorder;
}
Expand Down
6 changes: 1 addition & 5 deletions dev/isMediaRecorderCompatible.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ function isMediaRecorderCompatible() {
return true;
}

if (!isChrome) {
return false;
}

var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var fullVersion = '' + parseFloat(navigator.appVersion);
var majorVersion = parseInt(navigator.appVersion, 10);
var nameOffset, verOffset, ix;

if (isChrome) {
if (isChrome || isOpera) {
verOffset = nAgt.indexOf('Chrome');
fullVersion = nAgt.substring(verOffset + 7);
}
Expand Down

0 comments on commit 797cfc2

Please sign in to comment.