Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.InvalidStateError: An attempt was made to use an object that is not, or is no longer,usable at function below
- ***startRecordingnew()***
- var recordButton, stopButton, recorder;
- window.onload = function () {
- navigator.mediaDevices.getUserMedia({
- audio: true
- })
- .then(function (stream) {
- if (recorder == null) {
- recorder = new MediaRecorder(stream);
- alert(stream)
- recorder.addEventListener('dataavailable', onRecordingReady);
- }
- }).catch(function (err) {
- alert(err)
- });;
- };
- function startRecordingnew() {
- recorder.start();
- }
- function stopRecordingnew() {
- recorder.stop();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement