Skip to content

Commit

Permalink
Fixed: #54 "edge: error when just running the script"
Browse files Browse the repository at this point in the history
  • Loading branch information
muaz-khan committed Oct 27, 2015
1 parent 76658e7 commit 37441b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
11 changes: 4 additions & 7 deletions RecordRTC.js
@@ -1,4 +1,4 @@
// Last time updated at Monday, October 26th, 2015, 4:28:24 PM
// Last time updated at Tuesday, October 27th, 2015, 4:33:33 PM

// links:
// Open-Sourced: https://github.com/muaz-khan/RecordRTC
Expand Down Expand Up @@ -1187,9 +1187,6 @@ if (typeof URL === 'undefined' && typeof webkitURL !== 'undefined') {
URL = webkitURL;
}

/*global navigator:true */
var navigator = window.navigator;

if (typeof navigator !== 'undefined') {
if (typeof navigator.webkitGetUserMedia !== 'undefined') {
navigator.getUserMedia = navigator.webkitGetUserMedia;
Expand All @@ -1199,9 +1196,9 @@ if (typeof navigator !== 'undefined') {
navigator.getUserMedia = navigator.mozGetUserMedia;
}
} else {
navigator = {
getUserMedia: function() {}
};
// if you're using NPM or solutions where "navigator" is NOT available,
// just define it globally before loading RecordRTC.js script.
throw 'Please make sure to define a global variable named as "navigator"';
}

var isEdge = navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveBlob || !!navigator.msSaveOrOpenBlob);
Expand Down

0 comments on commit 37441b2

Please sign in to comment.