v0.3: WHIP ingest path #16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WHIP Ingest — Implementation Complete ✅
All four tasks are done and running in production.
What was built
Backend — Go (datarhei-dragonfork-core)
4ac63ddapp/api/api.gowhiphandler *appwebrtc.WHIPHandlerfield; switched toMergedHooks()so WHIP lifecycle hooks register alongside WHEP; wiredNewWHIPHandlerinto server config; added cleanup4d94c88http/api/process.goProcessConfigWHIPIngeststruct; addedWHIPIngestfield toProcessConfig; wiredMarshal()andUnmarshal()so the API accepts and returnswhip_ingest.{enabled,video_pt,audio_pt}Frontend — wilddragon-restreamer-ui overlay
ab8432doverlay/src/misc/controls/WHIP.jscontrol.whip_ingest.enable, mirrors WHEP.js pattern0f5163eoverlay/src/views/Edit/index.jsprops.restreamer._upsertProcessinhandleDoneto injectwhip_ingest.enabledinto the process config before it reaches the Core API (the SDK'sUpsertIngestdoes not forward this field natively)Infrastructure
353fa0fdeploy/truenas/core/seed-data.shindex.html,asset-manifest.json, andstatic/on container start so a redeployed image immediately serves the new UI bundle without manual interventionArchitecture notes
control.whip_ingest.enable→ monkey-patch injectswhip_ingest: {enabled: true}→ Core APIPUT /api/v3/process/{id}→http/api/process.go Marshal()→app.Config.WHIPIngest.Enabled = true→onWHIPProcessStarthook (inapp/webrtc/whip_lifecycle.go) creates anIngestPeerfor the channel → browser/OBS pushes viaPOST /api/v3/whip/{id}enablevsenabled: UI state usesenable(no trailing d) to match WHEP.js convention; the Core API JSON usesenabled. The monkey-patch performs the mapping.UpsertIngestbuilds the ffmpeg process config fromcontrol.hls,control.rtmp,control.srt, andcontrol.process— but explicitly ignorescontrol.webrtcandcontrol.whip_ingest. The WHIP patch intercepts_upsertProcess(the internal method called byUpsertIngest) to add the field before the PUT reaches Core.Verified in production
*api.ProcessConfigWHIPIngestandjson:"whip_ingest"compiled into/core/bin/coremain.117da44e.jscontainswhip_ingest(multiple occurrences from WHIPControl + Edit page)54c2bddbc10d(built 2026-05-09)