Notify user about unsecured context at quickUploader loading

This commit is contained in:
Bubka 2020-09-29 17:54:20 +02:00
parent c23d22e2b3
commit a98e05766b
4 changed files with 8 additions and 0 deletions

View File

@ -170,6 +170,10 @@
if (this.errorName === 'NotAllowedError') { if (this.errorName === 'NotAllowedError') {
this.$notify({ type: 'is-danger', text: this.errorText }) this.$notify({ type: 'is-danger', text: this.errorText })
} }
if (this.errorName === 'InsecureContextError') {
this.$notify({ type: 'is-warning', text: "HTTPS required for camera streaming" })
}
} }
if( !this.errorName && !this.showStream ) { if( !this.errorName && !this.showStream ) {

View File

@ -157,6 +157,7 @@ export default {
"not_readable": "Fail to load scanner. Is the camera already in use?", "not_readable": "Fail to load scanner. Is the camera already in use?",
"no_cam_on_device": "No camera on this device", "no_cam_on_device": "No camera on this device",
"secured_context_required": "Secure context required (HTTPS or localhost)", "secured_context_required": "Secure context required (HTTPS or localhost)",
"https_required": "HTTPS required for camera streaming",
"camera_not_suitable": "Installed cameras are not suitable", "camera_not_suitable": "Installed cameras are not suitable",
"stream_api_not_supported": "Stream API is not supported in this browser" "stream_api_not_supported": "Stream API is not supported in this browser"
}, },
@ -447,6 +448,7 @@ export default {
"not_readable": "Le scanner ne se charge pas. La caméra est-elle déjà utilisée ?", "not_readable": "Le scanner ne se charge pas. La caméra est-elle déjà utilisée ?",
"no_cam_on_device": "Votre équipement ne dispose pas de caméra", "no_cam_on_device": "Votre équipement ne dispose pas de caméra",
"secured_context_required": "Contexte sécurisé requis (HTTPS ou localhost)", "secured_context_required": "Contexte sécurisé requis (HTTPS ou localhost)",
"https_required": "HTTPS requis pour utiliser la caméra",
"camera_not_suitable": "Votre équipement ne dispose pas d'une caméra adaptée", "camera_not_suitable": "Votre équipement ne dispose pas d'une caméra adaptée",
"stream_api_not_supported": "L'API Stream n'est pas supportée par votre navigateur" "stream_api_not_supported": "L'API Stream n'est pas supportée par votre navigateur"
}, },

View File

@ -57,6 +57,7 @@ return [
'not_readable' => 'Fail to load scanner. Is the camera already in use?', 'not_readable' => 'Fail to load scanner. Is the camera already in use?',
'no_cam_on_device' => 'No camera on this device', 'no_cam_on_device' => 'No camera on this device',
'secured_context_required' => 'Secure context required (HTTPS or localhost)', 'secured_context_required' => 'Secure context required (HTTPS or localhost)',
'https_required' => 'HTTPS required for camera streaming',
'camera_not_suitable' => 'Installed cameras are not suitable', 'camera_not_suitable' => 'Installed cameras are not suitable',
'stream_api_not_supported' => 'Stream API is not supported in this browser' 'stream_api_not_supported' => 'Stream API is not supported in this browser'
], ],

View File

@ -57,6 +57,7 @@ return [
'not_readable' => 'Le scanner ne se charge pas. La caméra est-elle déjà utilisée ?', 'not_readable' => 'Le scanner ne se charge pas. La caméra est-elle déjà utilisée ?',
'no_cam_on_device' => 'Votre équipement ne dispose pas de caméra', 'no_cam_on_device' => 'Votre équipement ne dispose pas de caméra',
'secured_context_required' => 'Contexte sécurisé requis (HTTPS ou localhost)', 'secured_context_required' => 'Contexte sécurisé requis (HTTPS ou localhost)',
'https_required' => 'HTTPS requis pour utiliser la caméra',
'camera_not_suitable' => 'Votre équipement ne dispose pas d\'une caméra adaptée', 'camera_not_suitable' => 'Votre équipement ne dispose pas d\'une caméra adaptée',
'stream_api_not_supported' => 'L\'API Stream n\'est pas supportée par votre navigateur' 'stream_api_not_supported' => 'L\'API Stream n\'est pas supportée par votre navigateur'
], ],