Chrome-Extensions/screen-recording/README.md
<a target="_blank" href="https://chrome.google.com/webstore/detail/recordrtc/ndcljioonkecdnaaihodjgiliohngojp"></a>
<a target="_blank" href="https://chrome.google.com/webstore/detail/recordrtc/ndcljioonkecdnaaihodjgiliohngojp"></a>
Live Demo: simple-demos/RecordRTC_Extension.html
You can call this chrome extension directly from your own website as well!
if(typeof RecordRTC_Extension === 'undefined') {
alert('RecordRTC chrome extension is either disabled or not installed.');
}
var recorder = new RecordRTC_Extension();
recorder.startRecording(recorder.getSupoortedFormats()[7], function() {
setTimeout(function() {
recorder.stopRecording(function(blob) {
console.log(blob.size, blob);
var url = URL.createObjectURL(blob);
video.src = url;
});
}, 3000);
});
For simple code:
var recorder = new RecordRTC_Extension();
recorder.startRecording({
enableScreen: true,
enableMicrophone: true,
enableSpeakers: true
});
btnStopRecording.onclick = function() {
recorder.stopRecording(function(blob) {
console.log(blob.size, blob);
var url = URL.createObjectURL(blob);
video.src = url;
});
};
getSupoortedFormatsYou can pass any of the following on startRecording method:
const getSupoortedFormats = [{
enableScreen: true
}, {
enableScreen: true,
enableMicrophone: true
}, {
enableScreen: true,
enableSpeakers: true
}, {
enableScreen: true,
enableMicrophone: true,
enableSpeakers: true
}, {
enableTabCaptureAPI: true
}, {
enableTabCaptureAPI: true,
enableTabCaptureAPIAudioOnly: true
}, {
enableScreen: true,
enableCamera: true
}, {
enableMicrophone: true,
enableCamera: true
}, {
enableMicrophone: true,
enableSpeakers: true
}, {
enableMicrophone: true
}, {
enableSpeakers: true
}];
new RecordRTC_Extension().startRecording. First paramter is named as recording-formats and last parameter is named as recording-start-callback.stopRecording method. Callback contains two arguments. First argument is Blob object and second argument is error string.Chrome-Extensions are released under MIT license . Copyright (c) Muaz Khan.