TikTok creator #3: OBS profile choreography — editor drives Landscape Recording vs TikTok
ready-for-agent
## Parent
Spec: [TikTok creator #1282](https://github.com/mattpocock/course-video-manager/issues/1282). Decision: [#1281](https://github.com/mattpocock/course-video-manager/issues/1281) (OBS profile management).
## What to build
Make CVM **actively drive** the OBS profile per editor instead of the user switching by hand: the landscape editor drives OBS to `Landscape Recording`, the TikTok Studio drives it to `TikTok` (exact profile names). Today CVM only *reads* the profile (`GetProfileList`) and never calls `SetCurrentProfile` — this adds the write.
OBS **blocks profile switches while any output is active** — recording, streaming, **or the virtual camera** (which runs the whole time as the live-preview source). So the switch is **choreographed around the virtual cam**:
```
StopVirtualCam → SetCurrentProfile({ profileName }) → StartVirtualCam
```
**No MediaStream re-acquire** — the OBS Virtual Camera device shows a placeholder while stopped and resumes on the new profile's canvas (so a switch to `TikTok` makes the preview go portrait for free). A **missing profile raises a clear error — never auto-create** (`CreateProfile` yields an empty profile with no vertical canvas).
Expose this as a reusable capability the editor can call ("ensure profile X"), so both the record flow (ticket 5) and the Studio (ticket 6) drive it. Keep it inside the existing `obs-connector` seam — no new seam.
## Acceptance criteria
- [ ] The editor can request a target OBS profile and CVM switches to it via `SetCurrentProfile`.
- [ ] The switch succeeds even though the live-preview virtual camera is active, using the `StopVirtualCam → SetCurrentProfile → StartVirtualCam` sequence.
- [ ] After a switch to `TikTok`, the live preview shows the 9/16 canvas without re-acquiring the MediaStream.
- [ ] Requesting a profile that doesn't exist surfaces a clear error and does **not** create a profile.
- [ ] The landscape editor lands on `Landscape Recording`; the portrait context lands on `TikTok`.
## Blocked by
- None — can start immediately.
## Blocked by
- None — can start immediately.
0 条评论