fix: say why the microphone is unavailable, instead of freezing the button
`navigator.mediaDevices` only exists in a secure context — HTTPS, or localhost. Over plain http on a LAN address the property is undefined, so `_startRecording` threw on its first line, the catch wrote one console line and returned, and `_recording` stayed false: the button sat there unchanged with nothing to read anywhere a user would look. The unavailable cases are now named before the attempt rather than guessed at afterwards — insecure context, unsupported browser, denied permission, anything else — and surfaced in the chat through `_pushError`, which every chat surface already shares. The button is deliberately still rendered when the context is insecure: hiding it would read as "transcription is not configured", which is the wrong diagnosis to hand someone. Adds docs/voice.md, since "why doesn't the microphone work" is a question the assistant will be asked and the answer is entirely outside Skald.
This commit is contained in:
@@ -80,6 +80,10 @@ export default {
|
||||
'chat.rejected_by_user': 'Refusé par l\'utilisateur.',
|
||||
'chat.truncated': 'Réponse tronquée par la limite de tokens (↓{tokens} tok).',
|
||||
'chat.not_connected': 'Non connecté — reconnexion en cours. Votre message est resté dans le champ : appuyez de nouveau sur Entrée dans un instant.',
|
||||
'chat.mic.insecure': 'Votre navigateur n\'autorise le microphone que sur une connexion sécurisée. Ouvrez Skald sur http://localhost (depuis la machine elle-même) ou placez-le derrière HTTPS.',
|
||||
'chat.mic.unsupported': 'Ce navigateur ne prend pas en charge l\'enregistrement vocal.',
|
||||
'chat.mic.denied': 'Accès au microphone refusé. Autorisez-le pour ce site dans les réglages du navigateur, puis réessayez.',
|
||||
'chat.mic.failed': 'Impossible de démarrer l\'enregistrement : {error}',
|
||||
|
||||
// ── Copilot render ─────────────────────────────────────────────────────────
|
||||
'copilot.open_in_viewer': 'Ouvrir dans le visualiseur',
|
||||
|
||||
Reference in New Issue
Block a user