@corti/dictation-web 0.7.0-ambient.3 → 0.7.0-ambient.5
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.
- package/README.md +19 -0
- package/dist/bundle.js +399 -88
- package/dist/components/ambient-recording-button.js +1 -1
- package/dist/components/ambient-recording-button.js.map +1 -1
- package/dist/components/ambient-virtual-mode-selector.d.ts +14 -0
- package/dist/components/ambient-virtual-mode-selector.js +69 -0
- package/dist/components/ambient-virtual-mode-selector.js.map +1 -0
- package/dist/components/corti-ambient.d.ts +2 -0
- package/dist/components/corti-ambient.js +12 -0
- package/dist/components/corti-ambient.js.map +1 -1
- package/dist/components/corti-root.d.ts +4 -5
- package/dist/components/corti-root.js +4 -5
- package/dist/components/corti-root.js.map +1 -1
- package/dist/components/recording-button-base.d.ts +1 -0
- package/dist/components/recording-button-base.js +5 -0
- package/dist/components/recording-button-base.js.map +1 -1
- package/dist/components/settings-menu.d.ts +1 -0
- package/dist/components/settings-menu.js +7 -0
- package/dist/components/settings-menu.js.map +1 -1
- package/dist/contexts/ambient-context.d.ts +4 -0
- package/dist/contexts/ambient-context.js +10 -0
- package/dist/contexts/ambient-context.js.map +1 -1
- package/dist/controllers/media-controller.d.ts +1 -0
- package/dist/controllers/media-controller.js +25 -8
- package/dist/controllers/media-controller.js.map +1 -1
- package/dist/controllers/socket-controller.js +1 -1
- package/dist/controllers/socket-controller.js.map +1 -1
- package/dist/icons/icons.d.ts +4 -0
- package/dist/icons/icons.js +36 -0
- package/dist/icons/icons.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/ambient-virtual-mode-selector.d.ts +2 -0
- package/dist/styles/ambient-virtual-mode-selector.js +101 -0
- package/dist/styles/ambient-virtual-mode-selector.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/events.d.ts +4 -0
- package/dist/utils/events.js +7 -0
- package/dist/utils/events.js.map +1 -1
- package/dist/utils/media.d.ts +6 -1
- package/dist/utils/media.js +64 -13
- package/dist/utils/media.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,13 @@ For more control and flexibility, you can use individual components:
|
|
|
40
40
|
- **`<dictation-language-selector>`** - Language selection dropdown
|
|
41
41
|
- **`<dictation-keybinding-selector>`** - Keybinding configuration component for keyboard shortcuts (supports both push-to-talk and toggle-to-talk)
|
|
42
42
|
|
|
43
|
+
Ambient stream components:
|
|
44
|
+
|
|
45
|
+
- **`<corti-ambient>`** - All-in-one ambient capture component (includes virtual mode by default in settings)
|
|
46
|
+
- **`<ambient-root>`** - Context provider for ambient stream sessions
|
|
47
|
+
- **`<ambient-recording-button>`** - Recording button for ambient capture
|
|
48
|
+
- **`<ambient-virtual-mode-selector>`** - Toggles virtual mode: captures the selected microphone plus audio from a shared browser tab, window, or application (mixed as separate channels in one stream)
|
|
49
|
+
|
|
43
50
|
These components share state through a context system, allowing you to build custom UIs while leveraging the same underlying functionality.
|
|
44
51
|
|
|
45
52
|
## Installation
|
|
@@ -159,6 +166,18 @@ For more control, use individual components to build a custom UI:
|
|
|
159
166
|
</html>
|
|
160
167
|
```
|
|
161
168
|
|
|
169
|
+
### Ambient Example (with Virtual Mode)
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<corti-ambient
|
|
173
|
+
accessToken="YOUR_AUTH_TOKEN"
|
|
174
|
+
interactionId="YOUR_INTERACTION_ID"
|
|
175
|
+
settingsEnabled="device,language,virtualMode"
|
|
176
|
+
></corti-ambient>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Include `virtualMode` in `settingsEnabled` to show the Virtual mode toggle in the settings menu. When the user turns it on and starts recording, the browser prompts to share a tab/window/application; that audio is mixed with the selected microphone into one stream (microphone on the left channel, shared audio on the right).
|
|
180
|
+
|
|
162
181
|
### Keyboard Shortcuts (Keybindings)
|
|
163
182
|
|
|
164
183
|
The component supports both push-to-talk and toggle-to-talk keybindings simultaneously. You can configure separate keybindings for each behavior:
|