Click here to Skip to main content
15,917,795 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am creating an application for screen recorder including audio am using this code for that while am using this code i got screen record working as perfectly,but audio is not getting.i tried this in google chrome.please help me someone

C#
var elementToShare;
var canvasRecorder;
var recordAudio;
var session = {
audio: true,
video: true
};



 document.getElementById('startButton').onclick = function () { navigator.getUserMedia(session, function (mediaStream) {
elementToShare = document.getElementById('temps');
canvasRecorder = RecordRTC(elementToShare, {
    type: 'canvas'
});
canvasRecorder.startRecording();
}, function (error) { log(JSON.stringify(error)); });





C#
document.getElementById('FinishButton').onclick = function () {
canvasRecorder.stopRecording(function (audioVideoWebMURL) {window.open(audioVideoWebMURL);var recordedBlob = canvasRecorder.getBlob();canvasRecorder.getDataURL(function (dataURL) { });
canvasRecorder.save({ audio: true, video: true });  }); };
Posted
Updated 4-Sep-15 4:45am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900