Skip to content

Commit

Permalink
[mirotalkbro] - #10 add abortError and SecurityError handling
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jan 20, 2025
1 parent e5c99c1 commit 9cc27e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion public/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function handleMediaStreamError(error) {
break;
case 'NotReadableError':
case 'TrackStartError':
errorMessage = 'Already in use';
errorMessage = 'Device is already in use';
break;
case 'OverconstrainedError':
case 'ConstraintNotSatisfiedError':
Expand All @@ -132,6 +132,12 @@ function handleMediaStreamError(error) {
case 'PermissionDeniedError':
errorMessage = 'Permission denied in browser';
break;
case 'AbortError':
errorMessage = 'Operation aborted unexpectedly';
break;
case 'SecurityError':
errorMessage = 'Security error: Check your connection or browser settings';
break;
default:
errorMessage = "Can't get stream, make sure you are in a secure TLS context (HTTPS) and try again";
shouldHandleGetUserMediaError = false;
Expand Down

0 comments on commit 9cc27e4

Please sign in to comment.