ソースを参照

rn: fix not showing a prompt when permissions have been denied

This only shows up if we cannot prompt again, like when turning permissions off
in the Settings app in iOS.
master
Saúl Ibarra Corretgé 6年前
コミット
1e18af2d1a
1個のファイルの変更1行の追加22行の削除
  1. 1
    22
      react/features/base/tracks/actions.js

+ 1
- 22
react/features/base/tracks/actions.js ファイルの表示

@@ -579,30 +579,9 @@ function _onCreateLocalTracksRejected({ gum }, device) {
579 579
             const { error } = gum;
580 580
 
581 581
             if (error) {
582
-                // FIXME For whatever reason (which is probably an
583
-                // implementation fault), react-native-webrtc will give the
584
-                // error in one of the following formats depending on whether it
585
-                // is attached to a remote debugger or not. (The remote debugger
586
-                // scenario suggests that react-native-webrtc is at fault
587
-                // because the remote debugger is Google Chrome and then its
588
-                // JavaScript engine will define DOMException. I suspect I wrote
589
-                // react-native-webrtc to return the error in the alternative
590
-                // format if DOMException is not defined.)
591
-                let trackPermissionError;
592
-
593
-                switch (error.name) {
594
-                case 'DOMException':
595
-                    trackPermissionError = error.message === 'NotAllowedError';
596
-                    break;
597
-
598
-                case 'NotAllowedError':
599
-                    trackPermissionError = error instanceof DOMException;
600
-                    break;
601
-                }
602
-
603 582
                 dispatch({
604 583
                     type: TRACK_CREATE_ERROR,
605
-                    permissionDenied: trackPermissionError,
584
+                    permissionDenied: error.name === 'SecurityError',
606 585
                     trackType: device
607 586
                 });
608 587
             }

読み込み中…
キャンセル
保存