Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] How to remove the recording icon after clicking stop(); ? #76

Closed
davidsadan opened this issue Mar 17, 2016 · 3 comments
Closed

Comments

@davidsadan
Copy link

I am using the MediaStreamRecorder.js library for audio capture with Javascript. Almost everything is ok. The only problem I am finding is that when I click on Stop to stop recording the red recording icon is still up there, on the tab. Anyone know how I remove this icon when you click Stop?

Example in jsFiddle: https://jsfiddle.net/davidsadan/wazb1jks

Here is the print of how it is when I click Stop

zka12

@muaz-khan
Copy link
Member

Please check this: https://jsfiddle.net/wazb1jks/3/

navigator.getUserMedia(mediaConstraints, function(stream) {
    window.streamReference = stream;
    onMediaSuccess(stream);
}, onMediaError);

function stopStream() {
    if (!window.streamReference) return;

    window.streamReference.getAudioTracks().forEach(function(track) {
        track.stop();
    });

    window.streamReference.getVideoTracks().forEach(function(track) {
        track.stop();
    });

    window.streamReference = null;
}

@davidsadan davidsadan changed the title How to remove the recording icon after clicking stop(); ? [SOLVED] How to remove the recording icon after clicking stop(); ? Mar 18, 2016
@davidsadan
Copy link
Author

Thanks. 👍

@davidsadan
Copy link
Author

Very Thanks, Muaz :)

Regards.

2016-03-18 5:43 GMT-03:00 Muaz Khan notifications@github.com:

Please check this: https://jsfiddle.net/wazb1jks/3/

navigator.getUserMedia(mediaConstraints, function(stream) {
window.streamReference = stream;
onMediaSuccess(stream);
}, onMediaError);
function stopStream() {
if (!window.streamReference) return;

window.streamReference.getAudioTracks().forEach(function(track) {
    track.stop();
});

window.streamReference.getVideoTracks().forEach(function(track) {
    track.stop();
});

window.streamReference = null;

}


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#76 (comment)

Atenciosamente,

[image: --]

David Damasceno
[image: https://]about.me/daviddamasceno
https://about.me/daviddamasceno?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants