mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
comments and descriptions
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// Keybinding label pill for PTT hints.
|
||||
// Key Pill
|
||||
// Purpose: Defines the Key Pill module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
export default function KeyPill({ label }) {
|
||||
if (!label) return null;
|
||||
return <span className="rounded border border-white/40 px-1 text-[0.7rem] text-white">{label}</span>;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Compact status tile used throughout VIP audio card.
|
||||
// Status Indicator
|
||||
// Purpose: Defines the Status Indicator module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
export default function StatusIndicator({ label, active, detail = '' }) {
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// Vip Audio Upload Card Content
|
||||
// Purpose: Defines the Vip Audio Upload Card Content module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { fieldClass } from '../constants.js';
|
||||
import { useControlSystem } from '../../../controls/index.js';
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// PCM/WAV helpers for clip-mode recording payloads.
|
||||
// audio Codec
|
||||
// Purpose: Defines the audio Codec module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
export function mergeFloatChunks(chunks) {
|
||||
const total = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
|
||||
const merged = new Float32Array(total);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Base64 and auth helpers for upload and WHIP requests.
|
||||
// base64
|
||||
// Purpose: Defines the base64 module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
export function bytesToBase64(bytes) {
|
||||
let binary = '';
|
||||
const chunkSize = 0x8000;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// VIP audio upload/mic forwarding constants.
|
||||
// constants
|
||||
// Purpose: Defines the constants module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
export const MAX_UPLOAD_BYTES = 8 * 1024 * 1024;
|
||||
export const TARGET_SAMPLE_RATE = 16000;
|
||||
export const RTC_CONFIG = {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// Vip Audio Upload Card
|
||||
// Purpose: Defines the Vip Audio Upload Card module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import VipAudioUploadCardContent from './VipAudioUploadCardContent.jsx';
|
||||
|
||||
export default VipAudioUploadCardContent;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WHIP/WebRTC transport helpers for microphone forwarding.
|
||||
// whip Transport
|
||||
// Purpose: Defines the whip Transport module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
export function waitForIceGatheringComplete(pc, timeoutMs = 1500) {
|
||||
return new Promise((resolve) => {
|
||||
if (!pc || pc.iceGatheringState === 'complete') {
|
||||
|
||||
Reference in New Issue
Block a user