TASK 4 ship step 7: one-click go live + private-only enforcement (req 8) — the Go Live dialog is locked to Private (GoLiveViewModel.Visibility is a get-only string, no dropdown; settings' dead Default Visibility dropdown + Visibilities/DefaultStreamVisibility removed); YouTubeStreamService.CreateBroadcast always sends privacyStatus='private' and gained an injectable HttpClient? http = null seam; BeginGoLive fires CreateBroadcastAsync which stashes _currentBroadcastId for TASK 5's bind/transition (failure → StreamStatus.Error via AppLog, never a crash) alongside the frame pump, and StopStream clears it; the REC sign shows a dark-red PRIVATE badge next to REC whenever the live stream is private (IsLivePrivate) — the broadcast-insert integration test asserts the request body carries privacyStatus private (RecordingHandler seam) + a no-session guard test — 173 tests passing, 0 warnings
This commit is contained in:
@@ -12,12 +12,13 @@ namespace ytLive.Services;
|
||||
public class YouTubeStreamService
|
||||
{
|
||||
private readonly YouTubeAuthService _auth;
|
||||
private readonly HttpClient _http = new();
|
||||
private readonly HttpClient _http;
|
||||
private const string ApiBase = "https://www.googleapis.com/youtube/v3";
|
||||
|
||||
public YouTubeStreamService(YouTubeAuthService auth)
|
||||
public YouTubeStreamService(YouTubeAuthService auth, HttpClient? http = null)
|
||||
{
|
||||
_auth = auth;
|
||||
_http = http ?? new HttpClient();
|
||||
}
|
||||
|
||||
private async Task<bool> EnsureToken()
|
||||
@@ -43,7 +44,9 @@ public class YouTubeStreamService
|
||||
},
|
||||
status = new
|
||||
{
|
||||
privacyStatus = "public",
|
||||
// Private-only by enforcement (ship step 7) — the Go Live dialog
|
||||
// is locked to Private and the service refuses anything else.
|
||||
privacyStatus = "private",
|
||||
selfDeclaredMadeForKids = false
|
||||
},
|
||||
contentDetails = new
|
||||
|
||||
Reference in New Issue
Block a user