跳至主要内容

Stop one source

POST 

/api/mediasrc/stop

Stops the process backing one source slot and persists its state as stopped without clearing the assigned file. The same slot can subsequently be started again without reassignment. Returns 409 when an external publisher holds the slot and Insight has no stream of its own on it; use /api/mediasrc/takeover first. Stopping a pulled slot releases the pull and restores the stored file assignment.

A webcam slot is published by a browser rather than by Insight, so stopping one asks MediaMTX to close that session. If MediaMTX cannot be reached the call answers 502 rather than reporting a stop it cannot verify. A caller that has already closed its own publisher may send publisher_released: true with the publisher_session it closed; Insight then verifies that session still holds the slot rather than kicking anything (a different session answers 409, an unreachable MediaMTX 502, changing nothing either way).

Request​

Responses​

Operation completed.