Experimental WHIP support
This PR implements a basic WebRTC-HTTP ingestion protocol (WHIP) support for mediasoup demo. Tested using https://github.com/lminiero/simple-whip-client:
- Visit https://127.0.0.1:3000/?info=true&roomId=test&produce=false
- Start the whip client:
./whip-client -u https://127.0.0.1:4443/whip/test/broadcasterId \
-V "videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay pt=96 ssrc=2 picture-id-mode=2 ! queue ! application/x-rtp,media=video,encoding-name=VP8,payload=96" \
-A "audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay pt=100 ssrc=1 ! queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=100"
- Stop the broadcaster:
curl -k -X DELETE https://127.0.0.1:4443/whip/test/broadcasterId
Thanks. I'll review this in a few days.
is this going to be added?
bump
I guess we can try https://github.com/vpalmisano/mediasoup-demo/tree/feat/server/Experimental-WHIP-support instead?
Just a note, WHIP spec requires a Location header, which should point to the endpoint the client could use for PATCH and DELETE requests, and it's mandatory in OBS 30+ for WHIP integration to work. Otherwise, it will fail to start the stream.
Something like this
res.setHeader(
'Location',
`https://${config.domain}:${config.https.listenPort}/whip/${req.params.roomId}/${req.params.broadcasterId}`,
)