60 lines
2.3 KiB
Markdown
60 lines
2.3 KiB
Markdown
# ytLive — AI Guide
|
|
|
|
## Run
|
|
|
|
```bash
|
|
dotnet build # Windows only — WPF requires Windows target
|
|
dotnet run
|
|
```
|
|
|
|
Note: `EnableWindowsTargeting=true` is set in `ytLive.csproj`, so the project can be restored/built from WSL, but running requires Windows.
|
|
|
|
## Tests
|
|
|
|
No test framework set up yet. When added: `dotnet test`.
|
|
|
|
## Architecture
|
|
|
|
C# / WPF (.NET 8) following MVVM:
|
|
|
|
| Path | Role |
|
|
|------|------|
|
|
| `Models/` | Plain data types — Scene, Source, StreamConfig, StreamHealth, YouTubeChannel, ChatMessage |
|
|
| `ViewModels/` | MainViewModel — exposes collections + commands for the UI |
|
|
| `Services/` | YouTube OAuth2, stream/broadcast management, live chat polling |
|
|
| `Helpers/` | ViewModelBase (INotifyPropertyChanged), RelayCommand |
|
|
| `MainWindow.xaml` | Dark theme; layout: top bar (controls), center (preview), left (scenes/sources), right (chat), bottom (health) |
|
|
|
|
### Key patterns
|
|
|
|
- `ViewModelBase.SetProperty<T>()` for property change notifications
|
|
- `RelayCommand` for all button actions; commands gate on state (e.g. Start only when Offline)
|
|
- ViewModels are constructed in XAML (`<vm:MainViewModel/>` as DataContext)
|
|
- Services are currently instantiated in MainViewModel's constructor — no DI container yet
|
|
|
|
### Current limitations / TODOs
|
|
|
|
- `YouTubeAuthService` constructor takes empty client ID/secret strings — needs Google Cloud credentials
|
|
- `StartStream` is a stub (Task.Delay simulation)
|
|
- `ConnectYouTube` is a stub
|
|
- Preview panel is placeholder text
|
|
- No capture/encoding/RTMP yet
|
|
- No persistence layer (tokens, scenes, stream config all in-memory)
|
|
|
|
## Design Principle
|
|
|
|
> This software is so intuitive that even the most right-brained person can easily intuit and use it.
|
|
|
|
Apply this to every UI decision:
|
|
- One-click go-live with working defaults
|
|
- Prefilled YouTube defaults (RTMP URL, bitrate, resolution, latency)
|
|
- Visual/drag-and-drop scene building over property panels
|
|
- Every action produces a visible outcome — no dead ends
|
|
|
|
## Auth is optional, never a gate
|
|
|
|
YouTube OAuth2 sign-in must NEVER block core usage. Users can go live with a manual stream key,
|
|
build scenes, and record without authenticating. OAuth is an enhancement — it unlocks live chat,
|
|
broadcast creation, scheduling, and YouTube-side health — not a prerequisite. Treat the sign-in
|
|
button as "sign in (optional)", never as a requirement to use the app.
|