본문으로 건너뛰기

Stop every source

POST 

/api/mediasrc/stop-all

Stops all running source processes while preserving their file assignments and transport choices. Use this before deleting media, changing a group of assignments, or shutting down a test; the response reports how many sources were previously playing.

Webcam slots are published by a browser rather than by Insight, so stopping one asks MediaMTX to close the session. Any slot whose publisher could not be confirmed closed is listed in unconfirmed_webcams; the other sources still stop. A slot reassigned by another caller while this request was releasing publishers is left as it now is and listed in changed_sources. A caller that has already closed its own publishers may name them in released_webcams as {index, session} objects; a bare index is not a claim and that slot is stopped the normal way. A named session is honoured only if it still holds the slot, so a claim MediaMTX cannot confirm is still listed in unconfirmed_webcams.

Request​

Responses​

Number of sources that were previously playing.