Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made fixes so Opera can use MediaRecorder as well #125

Merged
merged 1 commit into from
Apr 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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