98 lines
4.3 KiB
Markdown
98 lines
4.3 KiB
Markdown
# ytLive — Task List
|
|
|
|
## TASK 1 — Initial Scaffold
|
|
|
|
**Goal:** Working C# / WPF project with MVVM architecture, dark-theme main window, and YouTube service stubs.
|
|
|
|
### Status: ✅ Done
|
|
- Models: Scene, Source, StreamConfig, StreamHealth, YouTubeChannel, ChatMessage
|
|
- Services: YouTubeAuthService (OAuth2), YouTubeStreamService (broadcast/health), YouTubeChatService (chat polling)
|
|
- MainViewModel: scene management, stream controls, chat
|
|
- MainWindow: scene/source panel, preview area, chat panel, status bar
|
|
- Clean build, 0 warnings (WSL + Windows)
|
|
|
|
---
|
|
|
|
## TASK 2 — YouTube OAuth2 Authentication
|
|
|
|
**Goal:** Fully working Google OAuth2 flow — user clicks "YouTube", browser opens, authorization callback lands, channel info is stored.
|
|
|
|
**Design constraint:** Sign-in must NEVER block core exploration. Users can build scenes, add sources, and audition the software without authenticating. But **going live requires authentication** — the "Start Stream" dialog is where the account sign-in lives, alongside all stream metadata.
|
|
|
|
**Two-state flow:** There is no separate "Connect" button. The top bar shows a single button — **Start Stream** when idle, **End Stream** when live. Clicking Start Stream opens one dialog that supplies everything: account (previously-saved account shown as default, with a Change Account action) + title/description/visibility.
|
|
|
|
**Live indicators (unmissable):** Top bar + window title bar flip red, a pulsing **● LIVE** badge with elapsed timer appears in the top bar, the preview area gets a red glow, and the taskbar icon shows a red overlay dot. Window title bar shows the stream title once validated.
|
|
|
|
### Requirements:
|
|
|
|
1. **Google Cloud OAuth credentials** — client ID + secret (user provides; needs "Localhost" redirect URI)
|
|
2. **Local HTTP listener** — `HttpListener` on `http://localhost:PORT/oauth2/callback` to catch the redirect
|
|
3. **Browser launch** — open the authorization URL in the default browser
|
|
4. **Token persistence** — store access/refresh tokens securely (Windows DPAPI), reload on startup
|
|
5. **UI state** — account shown in the Start Stream dialog; "Change Account" action triggers re-auth
|
|
6. **Go Live gated on auth** — Start Stream dialog requires sign-in to enable the Start button; scene building works without it
|
|
|
|
### Tests:
|
|
|
|
- Mock token exchange response, verify channel info parsed
|
|
- Verify token refresh triggers when near expiry
|
|
- Verify credential load/save roundtrip
|
|
|
|
### Status: Not started
|
|
|
|
---
|
|
|
|
## TASK 3 — Capture Pipeline (Scenes/Sources)
|
|
|
|
**Goal:** Real video preview in the center panel — display capture, window capture, webcam, images, text overlays, composited per scene.
|
|
|
|
### Requirements:
|
|
|
|
1. **Display capture** — Windows.Graphics.Capture API (WinRT), enumerate monitors
|
|
2. **Window capture** — enumerate top-level windows, capture per-window
|
|
3. **Webcam** — MediaCapture (WinRT) with device enumeration
|
|
4. **Image / text overlay** — static sources positioned/scaled/opacity
|
|
5. **Scene compositing** — per-scene source layering (z-order), preview rendered via D3DImage or MediaElement
|
|
6. **Drag/drop source placement** — intuitive, visual (per design principle)
|
|
|
|
### Status: Not started
|
|
|
|
---
|
|
|
|
## TASK 4 — RTMP Ingest to YouTube
|
|
|
|
**Goal:** Push encoded video to YouTube's RTMP ingest.
|
|
|
|
### Requirements:
|
|
|
|
1. **Encoding** — H.264 (hardware via NVENC/AMD, fallback x264) + AAC audio
|
|
2. **RTMP push** — FFmpeg subprocess or native RTMP library
|
|
3. **Stream key management** — save keys securely, prefill default YouTube ingest URL `rtmp://a.rtmp.youtube.com/live2`
|
|
4. **Health stats** — bitrate, FPS, dropped frames reported live in the bottom bar
|
|
5. **One-click go live** — defaults that work out of the box
|
|
|
|
### Status: Not started
|
|
|
|
---
|
|
|
|
## TASK 5 — YouTube Live Stream Management
|
|
|
|
**Goal:** Create/bind broadcasts, monitor YouTube-side stream health.
|
|
|
|
### Requirements:
|
|
|
|
1. **Broadcast creation** — title/description/visibility via API
|
|
2. **Stream binding** — create stream, bind to broadcast
|
|
3. **Health monitoring** — poll `liveBroadcasts` lifecycle status, surface YouTube health messages
|
|
4. **Live chat** — poll `liveChat/messages`, render in right panel, support Super Chat + membership badges
|
|
|
|
### Status: Not started
|
|
|
|
---
|
|
|
|
## Backlog (future versions)
|
|
|
|
- v0.2 — Recording to local file
|
|
- v0.3 — Stream scheduling
|
|
- v0.4 — Multi-destination restreaming
|