Skip to content

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

Redirect /embed/chat and /embed/video to the embedable pages. Closes #110

Gabe Kangas5d1453c4761e
diff --git a/controllers/embed.go b/controllers/embed.go
new file mode 100644
index 0000000000..44b38fb859
--- /dev/null
+++ b/controllers/embed.go
@@ -0,0 +1,15 @@
+package controllers
+
+import (
+ "net/http"
+)
+
+//GetChatEmbed gets the embed for chat
+func GetChatEmbed(w http.ResponseWriter, r *http.Request) {
+ http.Redirect(w, r, "/index-standalone-chat.html", http.StatusMovedPermanently)
+}
+
+//GetVideoEmbed gets the embed for video
+func GetVideoEmbed(w http.ResponseWriter, r *http.Request) {
+ http.Redirect(w, r, "/index-video-only.html", http.StatusMovedPermanently)
+}
diff --git a/router/router.go b/router/router.go
index 13633552f7..025441d9de 100644
--- a/router/router.go
+++ b/router/router.go
@@ -35,6 +35,12 @@ func Start() error {
// web config api
http.HandleFunc("/config", controllers.GetWebConfig)
+
+ // chat embed
+ http.HandleFunc("/embed/chat", controllers.GetChatEmbed)
+
+ // video embed
+ http.HandleFunc("/embed/video", controllers.GetVideoEmbed)
}
port := config.Config.GetPublicWebServerPort()