Live video on the AT Protocol

Add defaultStreamer branding key for single-user broadcaster instances.

authored by

Natalie Bridgers and committed by
Natalie B.
d83bba0f 6938d016

+30 -1
+6
js/components/src/streamplace-store/branding.tsx
··· 177 177 return asset?.data || undefined; 178 178 } 179 179 180 + // convenience hook for default streamer 181 + export function useDefaultStreamer(): string | undefined { 182 + const asset = useBrandingAsset("defaultStreamer"); 183 + return asset?.data || undefined; 184 + } 185 + 180 186 // hook to auto-fetch branding when broadcaster changes 181 187 export function useBrandingAutoFetch() { 182 188 const fetchBranding = useFetchBranding();
+1 -1
pkg/api/api_internal.go
··· 511 511 maxSize := 500 * 1024 // 500KB default for logos 512 512 if key == "favicon" { 513 513 maxSize = 100 * 1024 // 100KB for favicons 514 - } else if key == "siteTitle" || key == "siteDescription" || key == "primaryColor" || key == "accentColor" || key == "defaultStreamKey" { 514 + } else if key == "siteTitle" || key == "siteDescription" || key == "primaryColor" || key == "accentColor" || key == "defaultStreamKey" || key == "defaultStreamer" { 515 515 maxSize = 1024 // 1KB for text values 516 516 } 517 517 if len(data) > maxSize {
+22
pkg/api/branding-admin.html
··· 253 253 </div> 254 254 </div> 255 255 256 + <!-- Default Streamer --> 257 + <div class="section"> 258 + <div class="section-title">Default Streamer</div> 259 + <div class="section-subtitle" id="currentDefaultStreamer"> 260 + Current: None 261 + </div> 262 + <div class="input-group"> 263 + <input 264 + type="text" 265 + id="defaultStreamerInput" 266 + placeholder="did:plc:..." 267 + /> 268 + <button 269 + onclick="uploadText('defaultStreamer', document.getElementById('defaultStreamerInput').value)" 270 + > 271 + Update 272 + </button> 273 + </div> 274 + </div> 275 + 256 276 <!-- Main Logo --> 257 277 <div class="section"> 258 278 <div class="section-title">Main Logo</div> ··· 350 370 "Current: " + (currentBranding["primaryColor"] || "#6366f1"); 351 371 document.getElementById("currentAccentColor").textContent = 352 372 "Current: " + (currentBranding["accentColor"] || "#8b5cf6"); 373 + document.getElementById("currentDefaultStreamer").textContent = 374 + "Current: " + (currentBranding["defaultStreamer"] || "None"); 353 375 354 376 // render logo preview 355 377 const logoPreview = document.getElementById("currentLogoPreview");
+1
pkg/spxrpc/place_stream_branding.go
··· 29 29 "primaryColor": {data: []byte("#6366f1"), mime: "text/plain"}, 30 30 "accentColor": {data: []byte("#8b5cf6"), mime: "text/plain"}, 31 31 "defaultStreamKey": {data: []byte(""), mime: "text/plain"}, 32 + "defaultStreamer": {data: []byte(""), mime: "text/plain"}, 32 33 } 33 34 34 35 func (s *Server) getBroadcasterID(ctx context.Context, broadcasterDID string) string {