Comparing version 4.0.2 to 4.0.3
{ | ||
"name": "recordrtc", | ||
"preferGlobal": true, | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"author": { | ||
@@ -35,4 +35,4 @@ "name": "Muaz Khan", | ||
"homepage": "https://www.webrtc-experiment.com/RecordRTC/", | ||
"_id": "recordrtc@4.0.2", | ||
"_id": "recordrtc@4.0.3", | ||
"_from": "recordrtc@" | ||
} |
@@ -1,2 +0,2 @@ | ||
// Last time updated at August 15, 2014, 08:32:23 | ||
// Last time updated at August 22, 2014, 08:32:23 | ||
@@ -179,21 +179,24 @@ // updates? | ||
save: function (fileName) { | ||
if (!mediaRecorder) return console.warn(WARNING); | ||
if (!mediaRecorder) { | ||
var that = this; | ||
setTimeout(function() { | ||
that.save(fileName); | ||
}, 2000); | ||
return console.warn(WARNING); | ||
} | ||
// bug: should we use "getBlob" instead; to handle aww-snaps! | ||
this.getDataURL(function (dataURL) { | ||
var hyperlink = document.createElement('a'); | ||
hyperlink.href = dataURL; | ||
hyperlink.target = '_blank'; | ||
hyperlink.download = (fileName || (Math.round(Math.random() * 9999999999) + 888888888)) + '.' + mediaRecorder.recordedBlob.type.split('/')[1]; | ||
var hyperlink = document.createElement('a'); | ||
hyperlink.href = URL.createObjectURL(mediaRecorder.recordedBlob); | ||
hyperlink.target = '_blank'; | ||
hyperlink.download = (fileName || (Math.round(Math.random() * 9999999999) + 888888888)) + '.' + mediaRecorder.recordedBlob.type.split('/')[1]; | ||
var evt = new MouseEvent('click', { | ||
view: window, | ||
bubbles: true, | ||
cancelable: true | ||
}); | ||
var evt = new MouseEvent('click', { | ||
view: window, | ||
bubbles: true, | ||
cancelable: true | ||
}); | ||
hyperlink.dispatchEvent(evt); | ||
hyperlink.dispatchEvent(evt); | ||
(window.URL || window.webkitURL).revokeObjectURL(hyperlink.href); | ||
}); | ||
(window.URL || window.webkitURL).revokeObjectURL(hyperlink.href); | ||
}, | ||
@@ -200,0 +203,0 @@ getFromDisk: function (callback) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69876
1293