add mic on push-to-talk mode, iphone open in phone tab default
This commit is contained in:
parent
3e0276d6c0
commit
eeeed36494
@ -1121,35 +1121,53 @@ export function PhoneSimulator({
|
|||||||
{/* Push-to-Talk Mode Layout */}
|
{/* Push-to-Talk Mode Layout */}
|
||||||
{isPushToTalkMode && phoneMode !== "hand_off" && voiceAssistant.agent && (
|
{isPushToTalkMode && phoneMode !== "hand_off" && voiceAssistant.agent && (
|
||||||
<div className="w-full flex items-center justify-center gap-8">
|
<div className="w-full flex items-center justify-center gap-8">
|
||||||
{/* Camera Switch Button - Left (hidden in important_message mode) */}
|
{/* Mic Toggle and Camera Switch Buttons - Left (hidden in important_message mode) */}
|
||||||
{phoneMode !== "important_message" && (
|
{phoneMode !== "important_message" && (
|
||||||
<div className="relative">
|
<div className="flex flex-col items-center gap-2">
|
||||||
|
{/* Mic Toggle Button */}
|
||||||
<button
|
<button
|
||||||
className="p-4 rounded-full bg-gray-800/50 text-white hover:bg-gray-800/70 transition-colors"
|
className={`p-4 rounded-full backdrop-blur-md transition-colors ${
|
||||||
onClick={handleSwitchCamera}
|
!isMicEnabled
|
||||||
|
? "bg-white text-black"
|
||||||
|
: "bg-gray-800/50 text-white hover:bg-gray-800/70"
|
||||||
|
}`}
|
||||||
|
onClick={handleMicToggle}
|
||||||
>
|
>
|
||||||
<SwitchCameraIcon className="w-6 h-6" />
|
{isMicEnabled ? (
|
||||||
|
<MicIcon className="w-6 h-6" />
|
||||||
|
) : (
|
||||||
|
<MicOffIcon className="w-6 h-6" />
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
{showCameraMenu && (
|
{/* Camera Switch Button */}
|
||||||
<div className="absolute bottom-full mb-2 left-0 bg-gray-900 border border-gray-800 rounded-lg shadow-xl py-2 w-48 z-50">
|
<div className="relative">
|
||||||
{cameras.length === 0 ? (
|
<button
|
||||||
<div className="px-4 py-2 text-gray-500 text-sm">
|
className="p-4 rounded-full bg-gray-800/50 text-white hover:bg-gray-800/70 transition-colors"
|
||||||
No cameras found
|
onClick={handleSwitchCamera}
|
||||||
</div>
|
>
|
||||||
) : (
|
<SwitchCameraIcon className="w-6 h-6" />
|
||||||
cameras.map((device) => (
|
</button>
|
||||||
<button
|
{showCameraMenu && (
|
||||||
key={device.deviceId}
|
<div className="absolute bottom-full mb-2 left-0 bg-gray-900 border border-gray-800 rounded-lg shadow-xl py-2 w-48 z-50">
|
||||||
onClick={() => handleSelectCamera(device.deviceId)}
|
{cameras.length === 0 ? (
|
||||||
className="w-full text-left px-4 py-2 text-sm text-white hover:bg-gray-800 transition-colors truncate"
|
<div className="px-4 py-2 text-gray-500 text-sm">
|
||||||
>
|
No cameras found
|
||||||
{device.label ||
|
</div>
|
||||||
`Camera ${cameras.indexOf(device) + 1}`}
|
) : (
|
||||||
</button>
|
cameras.map((device) => (
|
||||||
))
|
<button
|
||||||
)}
|
key={device.deviceId}
|
||||||
</div>
|
onClick={() => handleSelectCamera(device.deviceId)}
|
||||||
)}
|
className="w-full text-left px-4 py-2 text-sm text-white hover:bg-gray-800 transition-colors truncate"
|
||||||
|
>
|
||||||
|
{device.label ||
|
||||||
|
`Camera ${cameras.indexOf(device) + 1}`}
|
||||||
|
</button>
|
||||||
|
))
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@ -873,7 +873,7 @@ export default function Playground({
|
|||||||
<PlaygroundTabbedTile
|
<PlaygroundTabbedTile
|
||||||
className="h-full"
|
className="h-full"
|
||||||
tabs={mobileTabs}
|
tabs={mobileTabs}
|
||||||
initialTab={mobileTabs.length - 1}
|
initialTab={0}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user