1

How to remove audio video call icon from firefox and chrome in getusermedia.

var constraints = {
                        video: {
                            mandatory: {}
                         },
                        audio: {
                            mandatory: {}
                        }
                    };
navigator.getUserMedia_ = (navigator.getUserMedia
                                || navigator.mozGetUserMedia
                                || navigator.msGetUserMedia);
                        console.log(constraints);
                        navigator.getUserMedia_(constraints, function onSuccess(stream) {
                        }, function onFail(onFail) {
                            if(utilityService.getLocalStorage("user") === 'first')
                            {
                                $ngBootbox.alert('Media Device not connected.').then(function() {
                                    clearTimeout(userNotAvail);
                                    $state.go("profile.conversations");
                                });
                            }
                            else
                            {
                                $scope.secondUserCameraStatus = false;
                                console.log($scope.secondUserCameraStatus);
                            }
                        });

I have pass constraints (audio+video) and browser have accessed my camera and headphone and it is showing audio+video icons in top of bar so how can i remove these icons. Thank you.

Mustafa bw
  • 1,290
  • 3
  • 12
  • 21
  • Are you asking how to stop accessing the user's camera, or how to remove the indicator that warns the user that camera access is in progress? – jib Dec 11 '15 at 19:03
  • asking for remove the indicator of camera access progress – Mustafa bw Dec 13 '15 at 15:14

1 Answers1

4

Not possible, thankfully. In all browsers today, indicators warn users any time they potentially could be recorded, and the indicators stay on until the user navigates away, or until the website stops all camera and microphone streams it is accessing, whichever is sooner. To stop a stream, do:

stream.getTracks().forEach(track => track.stop());

I personally find this quite reassuring, as I don't like to be recorded without my knowledge. If a website could circumvent the indicators, then the indicators would have no value, and users would wonder whether websites they previously granted camera+mic access to, are still observing them.

While some cameras have hardware indicator lights, not all do, and even those that do don't turn on for microphone-only access.

jib
  • 40,579
  • 17
  • 100
  • 158