Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
package webhooks
import (
"time"
"github.com/teris-io/shortid"
"github.com/owncast/owncast/models"
)
// SendStreamStatusEvent dispatches a stream-status event (started,
// stopped, title-updated, …) to all configured webhook destinations.
func (s *Service) SendStreamStatusEvent(eventType models.EventType) {
s.sendStreamStatusEvent(eventType, shortid.MustGenerate(), time.Now())
}
func (s *Service) sendStreamStatusEvent(eventType models.EventType, id string, timestamp time.Time) {
s.SendEventToWebhooks(WebhookEvent{
Type: eventType,
EventData: map[string]interface{}{
"id": id,
"name": s.configRepository.GetServerName(),
"summary": s.configRepository.GetServerSummary(),
"streamTitle": s.configRepository.GetStreamTitle(),
"status": s.getStatus(),
"serverURL": s.configRepository.GetServerURL(),
"timestamp": timestamp,
},
})
}