使用 iwsdk CLI 测试音频示例的加载、播放状态、停止与空间音频功能。
该技能材料显示其本质是用于测试音频示例的提示/文档型流程,未声明需要密钥或远程端点,整体风险较低。需注意 README 中包含本地安装、启动开发服务器和执行 CLI 命令的操作性步骤,因此若按其运行会涉及本机代码执行与工作区数据访问,但这更符合常规工具能力而非明确红旗。
材料明确标注“需要的密钥/环境变量:(无)”,README 也未要求 API key、token 或账户凭证;未见明显凭证收集、存储或滥用迹象。
已声明“远程端点 host:(无)”,文档主要描述在本地示例工作区通过 iwsdk CLI 进行测试;虽有启动 dev server 与 browser/xr 操作,但材料未给出向未知或无关外部主机传输用户数据的事实。
README 明确要求执行 `npm run fresh:install`、`npm run dev`、`npx iwsdk ...` 等命令,并启动后台开发服务器;这意味着会在本机执行代码/进程。此属工具常规能力,未见超出声明用途的系统权限申请。
文档要求在 `$IWSDK_REPO_ROOT/examples/audio` 工作区内运行,并解析日志、检查系统状态、操作示例应用,说明其至少会访问该本地项目目录及相关运行数据。未见要求读取无关目录、敏感系统文件或过度授权。
正面因素是已标注 open-source,且来源为 GitHub 上的 facebook/immersive-web-sdk,源码可审计;但许可证未声明、社区采用显示 0 star、维护状态未知,且 README 涉及 `npm`/`npx` 安装与执行,仍存在常规依赖供应链留意点。基于现有材料,未见足以定为高风险的具体红旗。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "test-audio" 技能: 1. 下载 https://raw.githubusercontent.com/facebook/immersive-web-sdk/main/.claude/skills/test-audio/SKILL.md 2. 保存为 ~/.claude/skills/test-audio/SKILL.md 3. 装好后重载技能,告诉我可以用了
请使用 iwsdk CLI 对 audio example 进行测试,检查 AudioSource 是否能正常加载、开始播放,并返回每一步的状态结果。
一份测试结果,说明音频是否成功加载并开始播放,以及各阶段状态是否正常。
请通过 iwsdk CLI 运行 audio example,播放音频后执行停止操作,并确认播放状态是否正确切换为已停止。
一份关于停止操作是否生效的测试结论,包括停止前后状态变化。
请使用 iwsdk CLI 测试 audio example 的空间音频能力,验证相关音频源是否按预期启用空间效果,并汇总结果。
一份空间音频测试摘要,说明空间音频是否启用正常及是否存在异常。
Run 6 test suites covering audio loading, playback trigger, stop, system registration, component schema, and stability.
Configuration:
$IWSDK_REPO_ROOT/examples/audioTool calls: every tool call is npx iwsdk <subcommand> [--input-json '<JSON>'] [--timeout <ms>], run from inside the example workspace (cwd $EXAMPLE_DIR). The CLI auto-discovers the IWSDK app root from cwd, so no path tricks are required. Run npx iwsdk mcp inspect from the example to discover available tools and their CLI subcommands.
<JSON> is a JSON object string. Omit --input-json if no arguments are needed.{ok, workspaceRoot, operation, result}. Parse it to check assertions.--timeout 20000 for operations that may take longer (reload, xr enter, screenshot).IMPORTANT: Run each Bash command one at a time. Parse the JSON output and verify assertions before moving to the next command. Do NOT chain multiple CLI commands together.
IMPORTANT: When the instructions say "wait N seconds", use sleep N as a separate Bash command.
IMPORTANT: Boolean values in ecs set-component must be actual JSON booleans (value: true), NOT strings (value: "true"). Strings silently fail to coerce.
cd $IWSDK_REPO_ROOT/examples/audio && npm run fresh:install
Wait for this to complete before proceeding.
Start the dev server as a background task using the Bash tool's run_in_background: true parameter:
cd $IWSDK_REPO_ROOT/examples/audio && npm run dev
IMPORTANT: This command MUST be run with run_in_background: true on the Bash tool — do NOT append & to the command itself.
Once the background task is launched, poll the output for Vite's ready message (up to 60s). You can also run npx iwsdk dev status from the example directory until state.running becomes true. You do not need to extract or manage the port yourself; subsequent commands resolve the active runtime through the CLI automatically.
If the server fails to start within 60 seconds, report FAIL for all suites and skip to Step 5.
npx iwsdk ecs systems 2>/dev/null
This must return JSON with a list of systems. If it fails:
Run these commands in order:
npx iwsdk browser reload --timeout 20000 2>/dev/null
Then: sleep 3
npx iwsdk xr enter --timeout 20000 2>/dev/null
Then: sleep 2
npx iwsdk browser logs --input-json '{"count":20,"level":["error"]}' 2>/dev/null
Assert: No error-level logs. Audio autoplay warnings are acceptable.
Test 1.1: Find Audio Entity
npx iwsdk ecs find --input-json '{"withComponents":["AudioSource"]}' 2>/dev/null
Assert: At least 1 entity. Save the first as <audio>.
The audio example uses a GLXF level that creates entities via composition. The Spinner entity has an AudioSource.
Test 1.2: Verify Loaded State
npx iwsdk ecs query --input-json '{"entityIndex":<audio>,"components":["AudioSource"]}' 2>/dev/null
Assert:
src contains an audio file path (e.g., .mp3)_loaded = true (buffer loaded)_loading = false (not currently loading)_isPlaying = false (not playing yet — unless autoplay is set)volume = 1positional = trueTest 1.3: Pool Created
Assert: _pool exists with available array matching maxInstances.
Test 2.1: Request Play
npx iwsdk ecs set-component --input-json '{"entityIndex":<audio>,"componentId":"AudioSource","field":"_playRequested","value":true}' 2>/dev/null
…
帮助规划 IWSDK 新功能、系统架构与代码模式,并提供最佳实践建议。
帮助开发者用 iwsdk CLI 测试 XR 交互与面板音频行为是否正常。
用于逐帧调试 WebXR 场景中的物理、动画与实时交互行为。
指导你在 IWSDK 项目中实现深度感知遮挡并排查显示异常问题
使用 iwsdk CLI 测试 Havok 物理系统的重力与刚体行为表现
在 XR 场景中定位并点击目标对象,用于验证按钮与交互元素是否正常工作
使用 iwsdk CLI 针对 poke 示例测试 UI 系统行为与兼容性。
使用 iwsdk CLI 对比示例场景,测试滑动、瞬转、传送与跳跃移动系统。
使用 iwsdk CLI 对关卡层级、标签与默认灯光配置进行测试验证。
通过 iwsdk CLI 验证 ECS 核心功能与示例运行状态,辅助快速测试排障。
使用 iwsdk CLI 测试抓取系统的多种交互抓取模式
使用 iwsdk CLI 针对 poke 示例验证环境系统与组件配置是否正常