phaibel 4.0.44 → 4.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -378,6 +378,11 @@
378
378
  var mediaStream = null;
379
379
 
380
380
  function startRecording() {
381
+ if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
382
+ setStatus('');
383
+ showCaption('<div class="unsupported-msg">Microphone requires HTTPS. Access this page via <strong>https://</strong> or use a tunnel like ngrok.<br><br><code>ngrok http 3737</code></div>', 'caption-error');
384
+ return;
385
+ }
381
386
  audioChunks = [];
382
387
  navigator.mediaDevices.getUserMedia({ audio: true }).then(function(stream) {
383
388
  mediaStream = stream;
@@ -443,12 +448,8 @@
443
448
  reader.readAsDataURL(blob);
444
449
  }
445
450
 
446
- // Check for MediaRecorder support
447
- if (!navigator.mediaDevices || !window.MediaRecorder) {
448
- talkBtn.disabled = true;
449
- setStatus('Audio recording not supported');
450
- captionEl.innerHTML = '<div class="unsupported-msg">Audio recording is not supported in this browser.</div>';
451
- }
451
+ // Note: navigator.mediaDevices may be undefined on non-secure contexts (HTTP over LAN).
452
+ // We don't disable the button upfront — instead we show a helpful error when they tap Talk.
452
453
 
453
454
  // ── Talk button ───────────────────────────────────────
454
455
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phaibel",
3
- "version": "4.0.44",
3
+ "version": "4.0.45",
4
4
  "description": "AI personal agent that dynamically assembles executable processes from composable code blocks — powered by FeralCCF",
5
5
  "type": "module",
6
6
  "engines": {