app-media
app-media copied to clipboard
app-media-stream fails to stop camera access when 'active' property set to false.
Description
app-media-stream fails to stop camera access when 'active' property set to false.
Expected outcome
When app-media-stream.active is set to false, all media tracks should be stopped and Chrome should no longer indicate that website is accessing camera.
Actual outcome
Chrome indicates that website is accessing camera (recording red dot in tab in desktop or notification on mobile) until tab is killed or page is refreshed.
Steps to reproduce
- Add app-media-stream to page with some video constraints and active = true.
- Browser indicates that website is accessing camera.
- Set active = false
- Browser still indicates that website is accessing camera.
Browsers Affected
Only tested on latest stable Chrome.
- [x] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10
I had simlar issue. Before i set active to false just run stop track:
if (this.stream != null) {
this.stream.getTracks().forEach(function (track) {
track.stop();
});
}
this.active= false;
Same issue with microphone access.
@spiderix workaround solves it for me!