func (handler *ServerHandler) OnStreamClosed(conn rtmp.InboundConn, stream rtmp.InboundStream) { fmt.Printf("Stream closed: %d\n", stream.ID()) }
func (handler *ServerHandler) OnStreamCreated(conn rtmp.InboundConn, stream rtmp.InboundStream) { fmt.Printf("Stream created: %d\n", stream.ID()) stream.Attach(handler) }