close webcam if users don't allow access

This commit is contained in:
Georg Fischer 2016-08-10 20:12:44 +02:00
parent 1a291349ac
commit 53a7f7a49a

View File

@ -90,8 +90,10 @@ define(
function userMediaFailed () { function userMediaFailed () {
if ( stream ) { if ( stream ) {
stopStream(); stopStream();
publishers.error.dispatch( 'webcam.error.access' );
} }
closeVideo();
publishers.error.dispatch( 'webcam.error.access' );
} }
function closeVideo () { function closeVideo () {