Assign available videos to source slots
POST/api/mediasrc/auto-assign-all
Convenience operation for test setup. Insight stops every active source, walks the sorted assignable-video list, assigns unique files to source slots in index order, persists the result, and leaves all slots stopped. Call the bulk-start endpoint afterward when playback should begin.
Webcam slots are published by a browser, so Insight asks MediaMTX to close those sessions before rewriting the slot. A slot whose publisher could not be confirmed closed keeps its webcam marking and playing state, is left unassigned, and is listed in unconfirmed_webcams; the remaining slots are assigned as usual. A slot another caller reassigned while this request was releasing publishers is left as it now is and listed in changed_sources. A caller that 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 released the normal way.
Request
Responses
- 200
Assignment counts and success message.