try to inform OBS that is forbidden
parent
01913bac2d
commit
ea6c615be0
|
|
@ -15,7 +15,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func KickSession(stream_name, session_id string) {
|
func KickSession(stream_name, session_id string) {
|
||||||
url := "localhost:8083/api/ctrl/kick_session"
|
url := "http://localhost:8083/api/ctrl/kick_session"
|
||||||
|
|
||||||
values := map[string]string{"stream_name": stream_name, "session_id": session_id}
|
values := map[string]string{"stream_name": stream_name, "session_id": session_id}
|
||||||
|
|
||||||
|
|
@ -110,9 +110,11 @@ func OnPubStart(c *fiber.Ctx) error {
|
||||||
|
|
||||||
log.Printf("Start StreamName %s, UrlParam %s, SessionId %s\n", p.StreamName, p.UrlParam, p.SessionId)
|
log.Printf("Start StreamName %s, UrlParam %s, SessionId %s\n", p.StreamName, p.UrlParam, p.SessionId)
|
||||||
|
|
||||||
|
// TODO: Verify if the key is correct. If not, Kick the Session.
|
||||||
KickSession(p.StreamName, p.SessionId)
|
KickSession(p.StreamName, p.SessionId)
|
||||||
|
return fiber.ErrForbidden
|
||||||
|
|
||||||
return c.SendString("On_Pub_Start: " + string(c.Body()))
|
// return c.SendString("On_Pub_Start: " + string(c.Body()))
|
||||||
}
|
}
|
||||||
|
|
||||||
func OnPubStop(c *fiber.Ctx) error {
|
func OnPubStop(c *fiber.Ctx) error {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue