Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

466 B
Raw Blame
package admin

import (
	"net/http"

	webutils "github.com/owncast/owncast/webserver/utils"
)

// DisconnectInboundConnection will force-disconnect an inbound stream.
func (a *Admin) DisconnectInboundConnection(w http.ResponseWriter, r *http.Request) {
	if !a.stream.GetStatus().Online {
		webutils.WriteSimpleResponse(w, false, "no inbound stream connected")
		return
	}

	a.rtmp.Disconnect()
	webutils.WriteSimpleResponse(w, true, "inbound stream disconnected")
}