@convai/web-sdk 0.3.1-beta.2 → 0.3.2-beta.0
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 +535 -1077
- package/dist/core/AudioManager.d.ts.map +1 -0
- package/dist/core/AudioManager.js +262 -0
- package/dist/core/AudioManager.js.map +1 -0
- package/dist/core/BlendshapeQueue.d.ts +128 -0
- package/dist/core/BlendshapeQueue.d.ts.map +1 -0
- package/dist/core/BlendshapeQueue.js +229 -0
- package/dist/core/BlendshapeQueue.js.map +1 -0
- package/dist/{types/core → core}/ConvaiClient.d.ts +19 -15
- package/dist/core/ConvaiClient.d.ts.map +1 -0
- package/dist/core/ConvaiClient.js +623 -0
- package/dist/core/ConvaiClient.js.map +1 -0
- package/dist/core/EventEmitter.d.ts.map +1 -0
- package/dist/core/EventEmitter.js +68 -0
- package/dist/core/EventEmitter.js.map +1 -0
- package/dist/{types/core → core}/MessageHandler.d.ts +7 -0
- package/dist/core/MessageHandler.d.ts.map +1 -0
- package/dist/core/MessageHandler.js +333 -0
- package/dist/core/MessageHandler.js.map +1 -0
- package/dist/core/ScreenShareManager.d.ts.map +1 -0
- package/dist/core/ScreenShareManager.js +207 -0
- package/dist/core/ScreenShareManager.js.map +1 -0
- package/dist/core/VideoManager.d.ts.map +1 -0
- package/dist/core/VideoManager.js +205 -0
- package/dist/core/VideoManager.js.map +1 -0
- package/dist/{types/core → core}/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +14 -1970
- package/dist/core/index.js.map +1 -0
- package/dist/{types/core → core}/types.d.ts +12 -21
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/dev.d.ts.map +1 -0
- package/dist/dev.js +12 -0
- package/dist/dev.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/lipsync-helpers/arkitBlendshapeHelpers.d.ts.map +1 -0
- package/dist/lipsync-helpers/arkitBlendshapeHelpers.js +201 -0
- package/dist/lipsync-helpers/arkitBlendshapeHelpers.js.map +1 -0
- package/dist/lipsync-helpers/arkitOrder61.d.ts.map +1 -0
- package/dist/lipsync-helpers/arkitOrder61.js +287 -0
- package/dist/lipsync-helpers/arkitOrder61.js.map +1 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.d.ts.map +1 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.js +362 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.js.map +1 -0
- package/dist/{types/lipsync-helpers → lipsync-helpers}/index.d.ts +1 -0
- package/dist/lipsync-helpers/index.d.ts.map +1 -0
- package/dist/lipsync-helpers/index.js +20 -1165
- package/dist/lipsync-helpers/index.js.map +1 -0
- package/dist/lipsync-helpers/metahumanOrder251.d.ts +115 -0
- package/dist/lipsync-helpers/metahumanOrder251.d.ts.map +1 -0
- package/dist/lipsync-helpers/metahumanOrder251.js +432 -0
- package/dist/lipsync-helpers/metahumanOrder251.js.map +1 -0
- package/dist/lipsync-helpers/neurosyncBlendshapeMapper.d.ts.map +1 -0
- package/dist/lipsync-helpers/neurosyncBlendshapeMapper.js +315 -0
- package/dist/lipsync-helpers/neurosyncBlendshapeMapper.js.map +1 -0
- package/dist/react/components/ConvaiWidget.d.ts.map +1 -0
- package/dist/react/components/ConvaiWidget.js +505 -0
- package/dist/react/components/ConvaiWidget.js.map +1 -0
- package/dist/react/components/index.d.ts.map +1 -0
- package/dist/react/components/index.js +3 -0
- package/dist/react/components/index.js.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +316 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js +259 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +1 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.js +14 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.js.map +1 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.js +122 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +68 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.js +23 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageList.js +89 -0
- package/dist/react/components/rtc-widget/components/MessageList.js.map +1 -0
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/UserMessage.js +15 -0
- package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +15 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +172 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +66 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +68 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +255 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.js +6 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +1 -0
- package/dist/react/components/rtc-widget/components/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/index.js +15 -0
- package/dist/react/components/rtc-widget/components/index.js.map +1 -0
- package/dist/react/components/rtc-widget/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/index.js +9 -0
- package/dist/react/components/rtc-widget/index.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.js +73 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/icons.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/icons.js +257 -0
- package/dist/react/components/rtc-widget/styles/icons.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/index.js +9 -0
- package/dist/react/components/rtc-widget/styles/index.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.js +663 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/theme.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/theme.js +290 -0
- package/dist/react/components/rtc-widget/styles/theme.js.map +1 -0
- package/dist/react/components/rtc-widget/types/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/types/index.js +2 -0
- package/dist/react/components/rtc-widget/types/index.js.map +1 -0
- package/dist/react/hooks/index.d.ts.map +1 -0
- package/dist/react/hooks/index.js +6 -0
- package/dist/react/hooks/index.js.map +1 -0
- package/dist/react/hooks/useCharacterInfo.d.ts.map +1 -0
- package/dist/react/hooks/useCharacterInfo.js +60 -0
- package/dist/react/hooks/useCharacterInfo.js.map +1 -0
- package/dist/react/hooks/useConvaiClient.d.ts +35 -0
- package/dist/react/hooks/useConvaiClient.d.ts.map +1 -0
- package/dist/react/hooks/useConvaiClient.js +183 -0
- package/dist/react/hooks/useConvaiClient.js.map +1 -0
- package/dist/react/hooks/useLocalCameraTrack.d.ts.map +1 -0
- package/dist/react/hooks/useLocalCameraTrack.js +34 -0
- package/dist/react/hooks/useLocalCameraTrack.js.map +1 -0
- package/dist/{types/react → react}/index.d.ts +0 -2
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +13 -0
- package/dist/react/index.js.map +1 -0
- package/dist/types/index.d.ts +260 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/LatencyMonitor.d.ts.map +1 -0
- package/dist/utils/LatencyMonitor.js +136 -0
- package/dist/utils/LatencyMonitor.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +96 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/speakerManagement.d.ts.map +1 -0
- package/dist/utils/speakerManagement.js +64 -0
- package/dist/utils/speakerManagement.js.map +1 -0
- package/dist/{types/vanilla → vanilla}/AudioRenderer.d.ts +5 -0
- package/dist/vanilla/AudioRenderer.d.ts.map +1 -0
- package/dist/vanilla/AudioRenderer.js +135 -0
- package/dist/vanilla/AudioRenderer.js.map +1 -0
- package/dist/vanilla/ConvaiWidget.d.ts.map +1 -0
- package/dist/vanilla/ConvaiWidget.js +1786 -0
- package/dist/vanilla/ConvaiWidget.js.map +1 -0
- package/dist/vanilla/icons.d.ts.map +1 -0
- package/dist/vanilla/icons.js +222 -0
- package/dist/vanilla/icons.js.map +1 -0
- package/dist/{types/vanilla → vanilla}/index.d.ts +1 -3
- package/dist/vanilla/index.d.ts.map +1 -0
- package/dist/vanilla/index.js +20 -5507
- package/dist/vanilla/index.js.map +1 -0
- package/dist/vanilla/styles.d.ts.map +1 -0
- package/dist/vanilla/styles.js +287 -0
- package/dist/vanilla/styles.js.map +1 -0
- package/dist/vanilla/types.d.ts +43 -0
- package/dist/vanilla/types.d.ts.map +1 -0
- package/dist/vanilla/types.js +2 -0
- package/dist/vanilla/types.js.map +1 -0
- package/package.json +33 -38
- package/CHANGELOG.md +0 -165
- package/dist/core/index.cjs +0 -1977
- package/dist/lipsync-helpers/index.cjs +0 -1195
- package/dist/types/core/AudioManager.d.ts.map +0 -1
- package/dist/types/core/ConvaiClient.d.ts.map +0 -1
- package/dist/types/core/EventEmitter.d.ts.map +0 -1
- package/dist/types/core/MessageHandler.d.ts.map +0 -1
- package/dist/types/core/ScreenShareManager.d.ts.map +0 -1
- package/dist/types/core/VideoManager.d.ts.map +0 -1
- package/dist/types/core/index.d.ts.map +0 -1
- package/dist/types/core/types.d.ts.map +0 -1
- package/dist/types/dev.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitBlendshapeHelpers.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitOrder61.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitPhonemeReference.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/index.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/neurosyncBlendshapeMapper.d.ts.map +0 -1
- package/dist/types/react/components/ConvaiWidget.d.ts.map +0 -1
- package/dist/types/react/components/index.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/ConviMessage.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/FloatingVideo.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/MessageBubble.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/MessageList.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/UserMessage.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/conviComponents/index.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/components/index.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/index.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/styles/framerConfig.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/styles/icons.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/styles/index.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/styles/styledComponents.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/styles/theme.d.ts.map +0 -1
- package/dist/types/react/components/rtc-widget/types/index.d.ts.map +0 -1
- package/dist/types/react/hooks/index.d.ts.map +0 -1
- package/dist/types/react/hooks/useCharacterInfo.d.ts.map +0 -1
- package/dist/types/react/hooks/useConvaiClient.d.ts +0 -141
- package/dist/types/react/hooks/useConvaiClient.d.ts.map +0 -1
- package/dist/types/react/hooks/useLocalCameraTrack.d.ts.map +0 -1
- package/dist/types/react/index.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -261
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/utils/LatencyMonitor.d.ts.map +0 -1
- package/dist/types/utils/logger.d.ts.map +0 -1
- package/dist/types/utils/speakerManagement.d.ts.map +0 -1
- package/dist/types/vanilla/AudioRenderer.d.ts.map +0 -1
- package/dist/types/vanilla/ConvaiWidget.d.ts.map +0 -1
- package/dist/types/vanilla/icons.d.ts.map +0 -1
- package/dist/types/vanilla/index.d.ts.map +0 -1
- package/dist/types/vanilla/styles.d.ts.map +0 -1
- package/dist/types/vanilla/types.d.ts +0 -106
- package/dist/types/vanilla/types.d.ts.map +0 -1
- package/dist/umd/convai.umd.js +0 -1
- package/dist/vanilla/index.cjs +0 -5557
- /package/dist/{types/core → core}/AudioManager.d.ts +0 -0
- /package/dist/{types/core → core}/EventEmitter.d.ts +0 -0
- /package/dist/{types/core → core}/ScreenShareManager.d.ts +0 -0
- /package/dist/{types/core → core}/VideoManager.d.ts +0 -0
- /package/dist/{types/dev.d.ts → dev.d.ts} +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitBlendshapeHelpers.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitOrder61.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitPhonemeReference.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/neurosyncBlendshapeMapper.d.ts +0 -0
- /package/dist/{types/react → react}/components/ConvaiWidget.d.ts +0 -0
- /package/dist/{types/react → react}/components/index.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/AudioSettingsPanel.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/AudioVisualizer.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/ConviMessage.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/FloatingVideo.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/MarkdownRenderer.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/MessageBubble.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/MessageList.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/UserMessage.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/conviComponents/ConviButton.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/conviComponents/index.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/components/index.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/index.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/styles/framerConfig.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/styles/icons.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/styles/index.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/styles/styledComponents.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/styles/theme.d.ts +0 -0
- /package/dist/{types/react → react}/components/rtc-widget/types/index.d.ts +0 -0
- /package/dist/{types/react → react}/hooks/index.d.ts +0 -0
- /package/dist/{types/react → react}/hooks/useCharacterInfo.d.ts +0 -0
- /package/dist/{types/react → react}/hooks/useLocalCameraTrack.d.ts +0 -0
- /package/dist/{types/utils → utils}/LatencyMonitor.d.ts +0 -0
- /package/dist/{types/utils → utils}/logger.d.ts +0 -0
- /package/dist/{types/utils → utils}/speakerManagement.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/ConvaiWidget.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/icons.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/styles.d.ts +0 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
const Panel = styled.div `
|
|
5
|
+
position: absolute;
|
|
6
|
+
bottom: 100%;
|
|
7
|
+
right: 0;
|
|
8
|
+
margin-bottom: 12px;
|
|
9
|
+
width: 360px;
|
|
10
|
+
background: rgba(15, 23, 42, 0.98);
|
|
11
|
+
border: 1px solid rgba(148, 163, 184, 0.2);
|
|
12
|
+
border-radius: 16px;
|
|
13
|
+
padding: 24px;
|
|
14
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3),
|
|
15
|
+
0 10px 10px -5px rgba(0, 0, 0, 0.2);
|
|
16
|
+
backdrop-filter: blur(10px);
|
|
17
|
+
opacity: ${(props) => (props.isOpen ? 1 : 0)};
|
|
18
|
+
pointer-events: ${(props) => (props.isOpen ? "all" : "none")};
|
|
19
|
+
transform: ${(props) => props.isOpen ? "translateY(0)" : "translateY(10px)"};
|
|
20
|
+
transition: all 0.2s ease-out;
|
|
21
|
+
z-index: 1000;
|
|
22
|
+
|
|
23
|
+
@media (max-width: 640px) {
|
|
24
|
+
width: calc(100vw - 32px);
|
|
25
|
+
right: 16px;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
const Title = styled.div `
|
|
29
|
+
font-size: 18px;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
color: #f1f5f9;
|
|
32
|
+
margin-bottom: 8px;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 8px;
|
|
36
|
+
`;
|
|
37
|
+
const Subtitle = styled.div `
|
|
38
|
+
font-size: 13px;
|
|
39
|
+
color: #94a3b8;
|
|
40
|
+
margin-bottom: 20px;
|
|
41
|
+
line-height: 1.5;
|
|
42
|
+
`;
|
|
43
|
+
const SettingGroup = styled.div `
|
|
44
|
+
margin-bottom: 20px;
|
|
45
|
+
|
|
46
|
+
&:last-child {
|
|
47
|
+
margin-bottom: 0;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
const SettingLabel = styled.label `
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
color: #e2e8f0;
|
|
56
|
+
margin-bottom: 8px;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
user-select: none;
|
|
59
|
+
padding: 10px 12px;
|
|
60
|
+
border-radius: 8px;
|
|
61
|
+
transition: background 0.15s ease;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background: rgba(148, 163, 184, 0.1);
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
const SettingDescription = styled.div `
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
color: #64748b;
|
|
70
|
+
margin-top: -4px;
|
|
71
|
+
margin-bottom: 8px;
|
|
72
|
+
padding-left: 12px;
|
|
73
|
+
line-height: 1.4;
|
|
74
|
+
`;
|
|
75
|
+
const Toggle = styled.div `
|
|
76
|
+
width: 44px;
|
|
77
|
+
height: 24px;
|
|
78
|
+
background: ${(props) => props.enabled
|
|
79
|
+
? "linear-gradient(135deg, #10b981 0%, #059669 100%)"
|
|
80
|
+
: "rgba(71, 85, 105, 0.5)"};
|
|
81
|
+
border-radius: 12px;
|
|
82
|
+
position: relative;
|
|
83
|
+
transition: all 0.2s ease;
|
|
84
|
+
box-shadow: ${(props) => props.enabled
|
|
85
|
+
? "0 0 12px rgba(16, 185, 129, 0.3)"
|
|
86
|
+
: "inset 0 2px 4px rgba(0, 0, 0, 0.2)"};
|
|
87
|
+
|
|
88
|
+
&::after {
|
|
89
|
+
content: "";
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 2px;
|
|
92
|
+
left: ${(props) => (props.enabled ? "22px" : "2px")};
|
|
93
|
+
width: 20px;
|
|
94
|
+
height: 20px;
|
|
95
|
+
background: white;
|
|
96
|
+
border-radius: 50%;
|
|
97
|
+
transition: left 0.2s ease;
|
|
98
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
const SliderGroup = styled.div `
|
|
102
|
+
margin-bottom: 16px;
|
|
103
|
+
`;
|
|
104
|
+
const SliderLabel = styled.div `
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
margin-bottom: 8px;
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
color: #e2e8f0;
|
|
111
|
+
`;
|
|
112
|
+
const SliderValue = styled.span `
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
color: #10b981;
|
|
115
|
+
font-size: 13px;
|
|
116
|
+
`;
|
|
117
|
+
const Slider = styled.input `
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: 6px;
|
|
120
|
+
border-radius: 3px;
|
|
121
|
+
background: rgba(71, 85, 105, 0.3);
|
|
122
|
+
outline: none;
|
|
123
|
+
-webkit-appearance: none;
|
|
124
|
+
|
|
125
|
+
&::-webkit-slider-thumb {
|
|
126
|
+
-webkit-appearance: none;
|
|
127
|
+
appearance: none;
|
|
128
|
+
width: 18px;
|
|
129
|
+
height: 18px;
|
|
130
|
+
border-radius: 50%;
|
|
131
|
+
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
|
|
134
|
+
transition: transform 0.15s ease;
|
|
135
|
+
|
|
136
|
+
&:hover {
|
|
137
|
+
transform: scale(1.1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:active {
|
|
141
|
+
transform: scale(0.95);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&::-moz-range-thumb {
|
|
146
|
+
width: 18px;
|
|
147
|
+
height: 18px;
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
|
|
152
|
+
border: none;
|
|
153
|
+
transition: transform 0.15s ease;
|
|
154
|
+
|
|
155
|
+
&:hover {
|
|
156
|
+
transform: scale(1.1);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:active {
|
|
160
|
+
transform: scale(0.95);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
const PresetButtons = styled.div `
|
|
165
|
+
display: grid;
|
|
166
|
+
grid-template-columns: repeat(3, 1fr);
|
|
167
|
+
gap: 8px;
|
|
168
|
+
margin-top: 20px;
|
|
169
|
+
padding-top: 20px;
|
|
170
|
+
border-top: 1px solid rgba(148, 163, 184, 0.2);
|
|
171
|
+
`;
|
|
172
|
+
const PresetButton = styled.button `
|
|
173
|
+
padding: 10px 12px;
|
|
174
|
+
font-size: 13px;
|
|
175
|
+
font-weight: 500;
|
|
176
|
+
border-radius: 8px;
|
|
177
|
+
border: 1px solid
|
|
178
|
+
${(props) => props.active ? "rgba(16, 185, 129, 0.5)" : "rgba(148, 163, 184, 0.2)"};
|
|
179
|
+
background: ${(props) => props.active
|
|
180
|
+
? "rgba(16, 185, 129, 0.15)"
|
|
181
|
+
: "rgba(30, 41, 59, 0.5)"};
|
|
182
|
+
color: ${(props) => (props.active ? "#10b981" : "#cbd5e1")};
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
transition: all 0.15s ease;
|
|
185
|
+
|
|
186
|
+
&:hover {
|
|
187
|
+
background: ${(props) => props.active
|
|
188
|
+
? "rgba(16, 185, 129, 0.25)"
|
|
189
|
+
: "rgba(148, 163, 184, 0.1)"};
|
|
190
|
+
border-color: ${(props) => props.active ? "#10b981" : "rgba(148, 163, 184, 0.3)"};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&:active {
|
|
194
|
+
transform: scale(0.98);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:disabled {
|
|
198
|
+
opacity: 0.5;
|
|
199
|
+
cursor: not-allowed;
|
|
200
|
+
}
|
|
201
|
+
`;
|
|
202
|
+
const InfoBox = styled.div `
|
|
203
|
+
background: rgba(59, 130, 246, 0.1);
|
|
204
|
+
border: 1px solid rgba(59, 130, 246, 0.2);
|
|
205
|
+
border-radius: 8px;
|
|
206
|
+
padding: 12px;
|
|
207
|
+
margin-bottom: 20px;
|
|
208
|
+
font-size: 12px;
|
|
209
|
+
color: #93c5fd;
|
|
210
|
+
line-height: 1.5;
|
|
211
|
+
`;
|
|
212
|
+
const StatusIndicator = styled.div `
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
gap: 6px;
|
|
216
|
+
padding: 4px 10px;
|
|
217
|
+
border-radius: 12px;
|
|
218
|
+
font-size: 11px;
|
|
219
|
+
font-weight: 600;
|
|
220
|
+
background: ${(props) => props.isConnected
|
|
221
|
+
? "rgba(16, 185, 129, 0.15)"
|
|
222
|
+
: "rgba(239, 68, 68, 0.15)"};
|
|
223
|
+
color: ${(props) => (props.isConnected ? "#10b981" : "#ef4444")};
|
|
224
|
+
|
|
225
|
+
&::before {
|
|
226
|
+
content: "";
|
|
227
|
+
width: 6px;
|
|
228
|
+
height: 6px;
|
|
229
|
+
border-radius: 50%;
|
|
230
|
+
background: currentColor;
|
|
231
|
+
}
|
|
232
|
+
`;
|
|
233
|
+
export const AudioSettingsPanel = ({ currentSettings, onUpdateSettings, isConnected, }) => {
|
|
234
|
+
const [localSettings, setLocalSettings] = useState(currentSettings);
|
|
235
|
+
const [isUpdating, setIsUpdating] = useState(false);
|
|
236
|
+
const handleToggle = async (key, value) => {
|
|
237
|
+
setLocalSettings((prev) => ({ ...prev, [key]: value }));
|
|
238
|
+
setIsUpdating(true);
|
|
239
|
+
try {
|
|
240
|
+
await onUpdateSettings({ [key]: value });
|
|
241
|
+
}
|
|
242
|
+
finally {
|
|
243
|
+
setIsUpdating(false);
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
const handleSliderChange = (key, value) => {
|
|
247
|
+
setLocalSettings((prev) => ({ ...prev, [key]: value }));
|
|
248
|
+
};
|
|
249
|
+
const handleSliderRelease = async (key, value) => {
|
|
250
|
+
setIsUpdating(true);
|
|
251
|
+
try {
|
|
252
|
+
await onUpdateSettings({ [key]: value });
|
|
253
|
+
}
|
|
254
|
+
finally {
|
|
255
|
+
setIsUpdating(false);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
const applyPreset = async (preset) => {
|
|
259
|
+
setIsUpdating(true);
|
|
260
|
+
let newSettings;
|
|
261
|
+
switch (preset) {
|
|
262
|
+
case "quiet":
|
|
263
|
+
// Quiet environment - minimal processing, more sensitive to interruptions
|
|
264
|
+
newSettings = {
|
|
265
|
+
echoCancellation: false,
|
|
266
|
+
noiseSuppression: false,
|
|
267
|
+
autoGainControl: false,
|
|
268
|
+
sampleRate: 48000,
|
|
269
|
+
channelCount: 1,
|
|
270
|
+
};
|
|
271
|
+
break;
|
|
272
|
+
case "balanced":
|
|
273
|
+
// Balanced - moderate processing, good middle ground
|
|
274
|
+
newSettings = {
|
|
275
|
+
echoCancellation: true,
|
|
276
|
+
noiseSuppression: true,
|
|
277
|
+
autoGainControl: false,
|
|
278
|
+
sampleRate: 48000,
|
|
279
|
+
channelCount: 1,
|
|
280
|
+
};
|
|
281
|
+
break;
|
|
282
|
+
case "noisy":
|
|
283
|
+
// Noisy environment - aggressive processing, reduces interruptions
|
|
284
|
+
newSettings = {
|
|
285
|
+
echoCancellation: true,
|
|
286
|
+
noiseSuppression: true,
|
|
287
|
+
autoGainControl: true,
|
|
288
|
+
sampleRate: 48000,
|
|
289
|
+
channelCount: 1,
|
|
290
|
+
};
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
setLocalSettings(newSettings);
|
|
294
|
+
try {
|
|
295
|
+
await onUpdateSettings(newSettings);
|
|
296
|
+
}
|
|
297
|
+
finally {
|
|
298
|
+
setIsUpdating(false);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
const getCurrentPreset = () => {
|
|
302
|
+
const { echoCancellation, noiseSuppression, autoGainControl } = localSettings;
|
|
303
|
+
if (!echoCancellation && !noiseSuppression && !autoGainControl) {
|
|
304
|
+
return "quiet";
|
|
305
|
+
}
|
|
306
|
+
if (echoCancellation && noiseSuppression && !autoGainControl) {
|
|
307
|
+
return "balanced";
|
|
308
|
+
}
|
|
309
|
+
if (echoCancellation && noiseSuppression && autoGainControl) {
|
|
310
|
+
return "noisy";
|
|
311
|
+
}
|
|
312
|
+
return null;
|
|
313
|
+
};
|
|
314
|
+
return (_jsxs(Panel, { isOpen: true, children: [_jsxs(Title, { children: ["Audio Sensitivity Settings", _jsx(StatusIndicator, { isConnected: isConnected, children: isConnected ? "LIVE" : "OFFLINE" })] }), _jsx(Subtitle, { children: "Adjust these settings to reduce interruptions and find the optimal balance for your environment." }), isConnected && (_jsx(InfoBox, { children: "Warning: Changing settings will briefly restart your microphone. Changes apply immediately." })), _jsxs(SettingGroup, { children: [_jsxs(SettingLabel, { children: [_jsx("span", { children: "Echo Cancellation" }), _jsx(Toggle, { enabled: localSettings.echoCancellation || false, onClick: () => handleToggle("echoCancellation", !localSettings.echoCancellation) })] }), _jsx(SettingDescription, { children: "Prevents feedback loops from speakers. Recommended ON." })] }), _jsxs(SettingGroup, { children: [_jsxs(SettingLabel, { children: [_jsx("span", { children: "Noise Suppression" }), _jsx(Toggle, { enabled: localSettings.noiseSuppression || false, onClick: () => handleToggle("noiseSuppression", !localSettings.noiseSuppression) })] }), _jsx(SettingDescription, { children: "Filters out background noise. Turn ON to reduce false interruptions." })] }), _jsxs(SettingGroup, { children: [_jsxs(SettingLabel, { children: [_jsx("span", { children: "Auto Gain Control" }), _jsx(Toggle, { enabled: localSettings.autoGainControl || false, onClick: () => handleToggle("autoGainControl", !localSettings.autoGainControl) })] }), _jsx(SettingDescription, { children: "Automatically adjusts microphone volume. Turn ON in noisy environments to prevent unwanted interruptions." })] }), _jsxs(SliderGroup, { children: [_jsxs(SliderLabel, { children: [_jsx("span", { children: "Sample Rate" }), _jsxs(SliderValue, { children: [localSettings.sampleRate || 48000, " Hz"] })] }), _jsx(Slider, { type: "range", min: "8000", max: "48000", step: "8000", value: localSettings.sampleRate || 48000, onChange: (e) => handleSliderChange("sampleRate", parseInt(e.target.value)), onMouseUp: (e) => handleSliderRelease("sampleRate", parseInt(e.target.value)), onTouchEnd: (e) => handleSliderRelease("sampleRate", parseInt(e.target.value)) }), _jsx(SettingDescription, { children: "Higher = better quality, lower = less data. 48000 Hz recommended." })] }), _jsxs(PresetButtons, { children: [_jsx(PresetButton, { onClick: () => applyPreset("quiet"), active: getCurrentPreset() === "quiet", disabled: isUpdating, children: "\uD83D\uDD07 Quiet" }), _jsx(PresetButton, { onClick: () => applyPreset("balanced"), active: getCurrentPreset() === "balanced", disabled: isUpdating, children: "Balanced" }), _jsx(PresetButton, { onClick: () => applyPreset("noisy"), active: getCurrentPreset() === "noisy", disabled: isUpdating, children: "\uD83D\uDD0A Noisy" })] })] }));
|
|
315
|
+
};
|
|
316
|
+
//# sourceMappingURL=AudioSettingsPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioSettingsPanel.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/AudioSettingsPanel.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AASvC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAqB;;;;;;;;;;;;;aAahC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CA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sources":["../../../../../src/react/components/rtc-widget/components/AudioVisualizer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAkBtC,UAAU,oBAAoB;IAC5B,4EAA4E;IAC5E,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4R1D,CAAC"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
const VisualizerContainer = styled.div `
|
|
5
|
+
position: absolute;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
z-index: 1;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
border-radius: 50%;
|
|
11
|
+
overflow: visible;
|
|
12
|
+
`;
|
|
13
|
+
const Canvas = styled.canvas `
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
`;
|
|
18
|
+
/**
|
|
19
|
+
* Circular Audio Visualizer Component
|
|
20
|
+
*
|
|
21
|
+
* A real-time circular audio visualization component that displays radial bars arranged
|
|
22
|
+
* in a circle around an avatar. The visualization reacts to the remote participant's
|
|
23
|
+
* (bot) audio output from a LiveKit room, using logarithmic frequency bands and a
|
|
24
|
+
* traveling wave animation effect.
|
|
25
|
+
*
|
|
26
|
+
* Features:
|
|
27
|
+
* - Circular radial bar visualization with configurable bar count
|
|
28
|
+
* - Logarithmic frequency band distribution (low frequencies distributed around the ring)
|
|
29
|
+
* - Traveling wave animation that propagates around the circle
|
|
30
|
+
* - Speaking detection with callback support
|
|
31
|
+
* - Automatic track detection and reconnection
|
|
32
|
+
* - Canvas-based rendering for smooth animations
|
|
33
|
+
*/
|
|
34
|
+
export const AudioVisualizer = ({ room, size = 350, color = '#10b981', opacity = 0.4, avatarRadius = 80, barCount = 64, onSpeakingChange, }) => {
|
|
35
|
+
// Refs for canvas and Web Audio API nodes
|
|
36
|
+
const canvasRef = useRef(null);
|
|
37
|
+
const animationFrameRef = useRef(null);
|
|
38
|
+
const audioContextRef = useRef(null);
|
|
39
|
+
const analyserRef = useRef(null);
|
|
40
|
+
const sourceNodeRef = useRef(null);
|
|
41
|
+
const isActiveRef = useRef(false);
|
|
42
|
+
// Refs for animation and state management
|
|
43
|
+
const timeRef = useRef(0);
|
|
44
|
+
const previousSpeakingStateRef = useRef(false);
|
|
45
|
+
const bandEdgesRef = useRef(null);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (!room)
|
|
48
|
+
return;
|
|
49
|
+
const canvas = canvasRef.current;
|
|
50
|
+
if (!canvas)
|
|
51
|
+
return;
|
|
52
|
+
const ctx = canvas.getContext('2d');
|
|
53
|
+
if (!ctx)
|
|
54
|
+
return;
|
|
55
|
+
canvas.width = size;
|
|
56
|
+
canvas.height = size;
|
|
57
|
+
// Initialize Web Audio API context and analyser
|
|
58
|
+
const audioContext = new (window.AudioContext || window.webkitAudioContext)();
|
|
59
|
+
const analyser = audioContext.createAnalyser();
|
|
60
|
+
analyser.fftSize = 512;
|
|
61
|
+
analyser.smoothingTimeConstant = 0.6;
|
|
62
|
+
audioContextRef.current = audioContext;
|
|
63
|
+
analyserRef.current = analyser;
|
|
64
|
+
/**
|
|
65
|
+
* Builds logarithmically-spaced frequency band edges.
|
|
66
|
+
* This distributes low-frequency energy (which has more power) evenly around
|
|
67
|
+
* the circular visualization, rather than clustering it at the start.
|
|
68
|
+
*/
|
|
69
|
+
const buildLogBands = () => {
|
|
70
|
+
const nyquist = audioContext.sampleRate / 2;
|
|
71
|
+
const bufferLength = analyser.frequencyBinCount;
|
|
72
|
+
const minHz = 60;
|
|
73
|
+
const maxHz = Math.min(8000, nyquist);
|
|
74
|
+
const edges = Array.from({ length: barCount + 1 }, (_, k) => {
|
|
75
|
+
const hz = minHz * Math.pow(maxHz / minHz, k / barCount);
|
|
76
|
+
const bin = Math.max(0, Math.min(bufferLength - 1, Math.floor((hz / nyquist) * bufferLength)));
|
|
77
|
+
return bin;
|
|
78
|
+
});
|
|
79
|
+
// Ensure strictly increasing edges (no zero-width bands)
|
|
80
|
+
for (let i = 1; i < edges.length; i++) {
|
|
81
|
+
if (edges[i] <= edges[i - 1])
|
|
82
|
+
edges[i] = Math.min(edges[i - 1] + 1, bufferLength - 1);
|
|
83
|
+
}
|
|
84
|
+
bandEdgesRef.current = edges;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Finds the bot participant from remote participants.
|
|
88
|
+
*/
|
|
89
|
+
const findBotParticipant = (remoteParticipants, localParticipant) => {
|
|
90
|
+
const participants = Array.from(remoteParticipants.values()).filter((p) => p !== localParticipant && p !== room.localParticipant);
|
|
91
|
+
if (participants.length === 0) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
// Prefer participants with audio tracks (bot typically has audio)
|
|
95
|
+
const participantsWithAudio = participants.filter((participant) => {
|
|
96
|
+
if (!participant.trackPublications)
|
|
97
|
+
return false;
|
|
98
|
+
const audioTracks = Array.from(participant.trackPublications.values()).filter((p) => p.kind === 'audio' && p.track);
|
|
99
|
+
return audioTracks.length > 0;
|
|
100
|
+
});
|
|
101
|
+
return participantsWithAudio.length > 0 ? participantsWithAudio[0] : participants[0];
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Sets up the audio source by connecting the remote participant's (bot) audio track
|
|
105
|
+
* to the Web Audio API analyser.
|
|
106
|
+
*/
|
|
107
|
+
const setupAudioSource = async () => {
|
|
108
|
+
try {
|
|
109
|
+
if (audioContext.state === 'suspended')
|
|
110
|
+
await audioContext.resume();
|
|
111
|
+
const remoteParticipants = room.remoteParticipants;
|
|
112
|
+
if (remoteParticipants.size === 0) {
|
|
113
|
+
isActiveRef.current = false;
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const botParticipant = findBotParticipant(remoteParticipants, room.localParticipant);
|
|
117
|
+
if (!botParticipant) {
|
|
118
|
+
isActiveRef.current = false;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const audioTracks = Array.from(botParticipant.trackPublications.values()).filter((p) => p.kind === 'audio' && p.track);
|
|
122
|
+
if (audioTracks.length === 0) {
|
|
123
|
+
isActiveRef.current = false;
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const liveKitTrack = audioTracks[0].track;
|
|
127
|
+
const mediaStreamTrack = liveKitTrack.mediaStreamTrack;
|
|
128
|
+
if (!mediaStreamTrack) {
|
|
129
|
+
isActiveRef.current = false;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const mediaStream = new MediaStream([mediaStreamTrack]);
|
|
133
|
+
if (sourceNodeRef.current)
|
|
134
|
+
sourceNodeRef.current.disconnect();
|
|
135
|
+
const source = audioContext.createMediaStreamSource(mediaStream);
|
|
136
|
+
source.connect(analyser);
|
|
137
|
+
sourceNodeRef.current = source;
|
|
138
|
+
// Build bands after context is ready
|
|
139
|
+
buildLogBands();
|
|
140
|
+
isActiveRef.current = true;
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
isActiveRef.current = false;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
setupAudioSource();
|
|
147
|
+
const setupTimeout = setTimeout(setupAudioSource, 500);
|
|
148
|
+
const handleTrackSubscribed = (track, publication, participant) => {
|
|
149
|
+
if (track && track.kind === 'audio' && participant !== room.localParticipant) {
|
|
150
|
+
setTimeout(setupAudioSource, 200);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const handleParticipantConnected = (participant) => {
|
|
154
|
+
if (participant !== room.localParticipant)
|
|
155
|
+
setTimeout(setupAudioSource, 200);
|
|
156
|
+
};
|
|
157
|
+
room.on('trackSubscribed', handleTrackSubscribed);
|
|
158
|
+
room.on('participantConnected', handleParticipantConnected);
|
|
159
|
+
/**
|
|
160
|
+
* Main rendering function that draws the circular audio visualization.
|
|
161
|
+
*/
|
|
162
|
+
const bufferLength = analyser.frequencyBinCount;
|
|
163
|
+
const dataArray = new Uint8Array(bufferLength);
|
|
164
|
+
const draw = () => {
|
|
165
|
+
timeRef.current += 0.08;
|
|
166
|
+
analyser.getByteFrequencyData(dataArray);
|
|
167
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
168
|
+
const centerX = canvas.width / 2;
|
|
169
|
+
const centerY = canvas.height / 2;
|
|
170
|
+
// The bars should surround the character, not be clipped inside
|
|
171
|
+
// Character is 120px (radius 60px), visualizer canvas is 220px (radius 110px)
|
|
172
|
+
const characterRadius = 60; // Half of 120px character image
|
|
173
|
+
const innerRadius = characterRadius; // Start bars at edge of character
|
|
174
|
+
const outerRadius = avatarRadius; // Extend to edge of visualizer canvas
|
|
175
|
+
const maxBarLength = outerRadius - innerRadius;
|
|
176
|
+
ctx.save();
|
|
177
|
+
// No clipping - let bars render freely around the circle
|
|
178
|
+
const angleStep = (Math.PI * 2) / barCount;
|
|
179
|
+
// Calculate overall audio level for speaking detection
|
|
180
|
+
let total = 0;
|
|
181
|
+
for (let i = 0; i < bufferLength; i++)
|
|
182
|
+
total += isActiveRef.current ? (dataArray[i] || 0) : 0;
|
|
183
|
+
const overallLevel = total / (bufferLength * 255);
|
|
184
|
+
// Speaking detection
|
|
185
|
+
const speakingThreshold = 0.1;
|
|
186
|
+
const isSpeaking = isActiveRef.current && overallLevel > speakingThreshold;
|
|
187
|
+
if (onSpeakingChange && isSpeaking !== previousSpeakingStateRef.current) {
|
|
188
|
+
previousSpeakingStateRef.current = isSpeaking;
|
|
189
|
+
onSpeakingChange(isSpeaking);
|
|
190
|
+
}
|
|
191
|
+
// Precompute band edges if not ready yet
|
|
192
|
+
if (!bandEdgesRef.current) {
|
|
193
|
+
bandEdgesRef.current = Array.from({ length: barCount + 1 }, (_, k) => Math.floor((k / barCount) * bufferLength));
|
|
194
|
+
}
|
|
195
|
+
const edges = bandEdgesRef.current;
|
|
196
|
+
// Traveling wave parameters
|
|
197
|
+
const waveRevolutions = 2;
|
|
198
|
+
const phasePerBar = (Math.PI * 2 * waveRevolutions) / barCount;
|
|
199
|
+
const baseWaveAmp = 0.35;
|
|
200
|
+
const waveAmp = baseWaveAmp * (0.3 + 0.7 * overallLevel);
|
|
201
|
+
for (let i = 0; i < barCount; i++) {
|
|
202
|
+
const angle = i * angleStep - Math.PI / 2;
|
|
203
|
+
// Calculate average energy for this bar's frequency band
|
|
204
|
+
const startFreq = edges[i];
|
|
205
|
+
const endFreq = edges[i + 1];
|
|
206
|
+
let sum = 0;
|
|
207
|
+
let count = 0;
|
|
208
|
+
for (let f = startFreq; f < endFreq && f < bufferLength; f++) {
|
|
209
|
+
sum += isActiveRef.current ? (dataArray[f] || 0) : 0;
|
|
210
|
+
count++;
|
|
211
|
+
}
|
|
212
|
+
const bandAvg = count > 0 ? sum / (count * 255) : 0;
|
|
213
|
+
// Mix band-specific energy with overall level
|
|
214
|
+
const energy = 0.4 * bandAvg + 0.6 * overallLevel;
|
|
215
|
+
// Apply traveling wave modulation
|
|
216
|
+
const wavePhase = i * phasePerBar;
|
|
217
|
+
const wave = 1 + waveAmp * Math.sin(timeRef.current + wavePhase);
|
|
218
|
+
// Final intensity
|
|
219
|
+
const intensity = Math.min(1, energy * wave);
|
|
220
|
+
// Convert to bar length
|
|
221
|
+
const length = Math.max(maxBarLength * 0.03, intensity * maxBarLength * 0.95);
|
|
222
|
+
// Coordinates
|
|
223
|
+
const startX = centerX + Math.cos(angle) * innerRadius;
|
|
224
|
+
const startY = centerY + Math.sin(angle) * innerRadius;
|
|
225
|
+
const endX = centerX + Math.cos(angle) * (innerRadius + length);
|
|
226
|
+
const endY = centerY + Math.sin(angle) * (innerRadius + length);
|
|
227
|
+
// Draw
|
|
228
|
+
ctx.strokeStyle = color;
|
|
229
|
+
ctx.lineWidth = 5;
|
|
230
|
+
ctx.lineCap = 'round';
|
|
231
|
+
ctx.globalAlpha = opacity * (0.5 + 0.5 * intensity);
|
|
232
|
+
ctx.beginPath();
|
|
233
|
+
ctx.moveTo(startX, startY);
|
|
234
|
+
ctx.lineTo(endX, endY);
|
|
235
|
+
ctx.stroke();
|
|
236
|
+
}
|
|
237
|
+
ctx.globalAlpha = 1;
|
|
238
|
+
ctx.restore();
|
|
239
|
+
animationFrameRef.current = requestAnimationFrame(draw);
|
|
240
|
+
};
|
|
241
|
+
draw();
|
|
242
|
+
return () => {
|
|
243
|
+
clearTimeout(setupTimeout);
|
|
244
|
+
if (animationFrameRef.current)
|
|
245
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
246
|
+
if (sourceNodeRef.current)
|
|
247
|
+
sourceNodeRef.current.disconnect();
|
|
248
|
+
if (analyserRef.current)
|
|
249
|
+
analyserRef.current.disconnect();
|
|
250
|
+
if (audioContextRef.current && audioContextRef.current.state !== 'closed') {
|
|
251
|
+
audioContextRef.current.close();
|
|
252
|
+
}
|
|
253
|
+
room.off('trackSubscribed', handleTrackSubscribed);
|
|
254
|
+
room.off('participantConnected', handleParticipantConnected);
|
|
255
|
+
};
|
|
256
|
+
}, [room, size, color, opacity, avatarRadius, barCount, onSpeakingChange]);
|
|
257
|
+
return (_jsx(VisualizerContainer, { style: { width: size, height: size }, children: _jsx(Canvas, { ref: canvasRef }) }));
|
|
258
|
+
};
|
|
259
|
+
//# sourceMappingURL=AudioVisualizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioVisualizer.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/AudioVisualizer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQrC,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;;;;CAI3B,CAAC;AAmBF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,IAAI,EACJ,IAAI,GAAG,GAAG,EACV,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,GAAG,EACb,YAAY,GAAG,EAAE,EACjB,QAAQ,GAAG,EAAE,EACb,gBAAgB,GACjB,EAAE,EAAE;IACH,0CAA0C;IAC1C,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,iBAAiB,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IACtD,MAAM,eAAe,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;IACtD,MAAM,aAAa,GAAG,MAAM,CAAoC,IAAI,CAAC,CAAC;IACtE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAElC,0CAA0C;IAC1C,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,MAAM,wBAAwB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,YAAY,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAC;IAEnD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,MAAM,GAA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AO,IAAI,eAAe,CAAC,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC1E,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAClC,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAC;YACnD,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,0BAA0B,CAAC,CAAC;QAC/D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAE3E,OAAO,CACL,KAAC,mBAAmB,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YACvD,KAAC,MAAM,IAAC,GAAG,EAAE,SAAS,GAAI,GACN,CACvB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConviMessage.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/ConviMessage.tsx"],"names":[],"mappings":"AAYA,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,GAAI,sDAM1B,iBAAiB,4CAkCnB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { aeroTheme } from "../styles";
|
|
3
|
+
import { ConvaiLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, } from "../styles";
|
|
4
|
+
import { MarkdownRenderer } from "./MarkdownRenderer";
|
|
5
|
+
export const ConviMessage = ({ message, timestamp, className, showLogo = true, sender, }) => {
|
|
6
|
+
return (_jsxs(ConviMessageContainer, { className: className, children: [_jsxs(ConviBubble, { children: [showLogo && (_jsxs(MessageHeader, { children: [_jsx(LogoWrapper, { children: _jsx(ConvaiLogo, { size: "sm", color: "#10b981", animate: false, state: "connected" }) }), _jsx(ConviLabel, { children: sender })] })), _jsx(MarkdownRenderer, { text: message })] }), timestamp && (_jsx("span", { style: {
|
|
7
|
+
fontSize: aeroTheme.typography.sizes.caption,
|
|
8
|
+
color: aeroTheme.colors.text.secondary,
|
|
9
|
+
marginTop: 4,
|
|
10
|
+
alignSelf: "flex-start",
|
|
11
|
+
fontFamily: aeroTheme.typography.fontFamily.body,
|
|
12
|
+
}, children: timestamp }))] }));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=ConviMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConviMessage.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/ConviMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAUtD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,SAAS,EACT,QAAQ,GAAG,IAAI,EACf,MAAM,GACY,EAAE,EAAE;IACtB,OAAO,CACL,MAAC,qBAAqB,IAAC,SAAS,EAAE,SAAS,aACzC,MAAC,WAAW,eACT,QAAQ,IAAI,CACX,MAAC,aAAa,eACZ,KAAC,WAAW,cACV,KAAC,UAAU,IACT,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,KAAK,EACd,KAAK,EAAC,WAAW,GACjB,GACU,EACd,KAAC,UAAU,cAAE,MAAM,GAAc,IACnB,CACjB,EACD,KAAC,gBAAgB,IAAC,IAAI,EAAE,OAAO,GAAI,IACvB,EACb,SAAS,IAAI,CACZ,eACE,KAAK,EAAE;oBACL,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO;oBAC5C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;oBACtC,SAAS,EAAE,CAAC;oBACZ,SAAS,EAAE,YAAY;oBACvB,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI;iBACjD,YAEA,SAAS,GACL,CACR,IACqB,CACzB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingVideo.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/FloatingVideo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAShD,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA4DD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+ItD,CAAC"}
|