mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
whipwhep
This commit is contained in:
@@ -17,6 +17,7 @@ export default function VipPanel() {
|
||||
stopMicForward,
|
||||
sendMicChunk,
|
||||
startMicWhip,
|
||||
readyMicWhip,
|
||||
stopMicWhip,
|
||||
} = useSession();
|
||||
const { value: identity, save: saveIdentity } = useSettingsNamespace('identity', { cookieUserId: '' });
|
||||
@@ -60,6 +61,7 @@ export default function VipPanel() {
|
||||
stopMicForward={stopMicForward}
|
||||
sendMicChunk={sendMicChunk}
|
||||
startMicWhip={startMicWhip}
|
||||
readyMicWhip={readyMicWhip}
|
||||
stopMicWhip={stopMicWhip}
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -99,6 +99,7 @@ export default function VipAudioForwardingCard({
|
||||
stopMicForward,
|
||||
sendMicChunk,
|
||||
startMicWhip,
|
||||
readyMicWhip,
|
||||
stopMicWhip,
|
||||
}) {
|
||||
const { state: controlState } = useControlSystem();
|
||||
@@ -367,6 +368,7 @@ export default function VipAudioForwardingCard({
|
||||
}
|
||||
const answerSdp = await response.text();
|
||||
await pc.setRemoteDescription({ type: 'answer', sdp: answerSdp });
|
||||
await readyMicWhip?.(target);
|
||||
setMicState('live');
|
||||
} catch (err) {
|
||||
try {
|
||||
@@ -381,7 +383,7 @@ export default function VipAudioForwardingCard({
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
[startMicWhip, startSocketBridge, stopMicWhip],
|
||||
[readyMicWhip, startMicWhip, startSocketBridge, stopMicWhip],
|
||||
);
|
||||
|
||||
const startMicCapture = useCallback(
|
||||
|
||||
@@ -32,6 +32,7 @@ const SessionContext = createContext({
|
||||
stopMicForward: async () => {},
|
||||
sendMicChunk: async () => {},
|
||||
startMicWhip: async () => {},
|
||||
readyMicWhip: async () => {},
|
||||
stopMicWhip: async () => {},
|
||||
setAudioLevels: async () => {},
|
||||
llmControl: async () => {},
|
||||
@@ -164,6 +165,7 @@ export function SessionProvider({ children }) {
|
||||
return true;
|
||||
},
|
||||
startMicWhip: (roverId) => emitWithAck('audio:micWhipStart', { roverId }),
|
||||
readyMicWhip: (roverId) => emitWithAck('audio:micWhipReady', { roverId }),
|
||||
stopMicWhip: (roverId) => emitWithAck('audio:micWhipStop', { roverId }),
|
||||
setAudioLevels: (levels = {}) => emitWithAck('audioLevels:set', levels),
|
||||
llmControl: (action, controls = {}) =>
|
||||
|
||||
Reference in New Issue
Block a user