Skip to content

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

Do not cache hls playlist files at all. Closes #229

Gabe Kangas712825855ce2
diff --git a/go.mod b/go.mod
index 4655a9e4c7..ad22261ede 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,6 @@ require (
github.com/mssola/user_agent v0.5.2
github.com/nareix/joy5 v0.0.0-20200712071056-a55089207c88
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
- github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1
github.com/radovskyb/watcher v1.0.7
github.com/shirou/gopsutil v2.20.7+incompatible
github.com/sirupsen/logrus v1.6.0
diff --git a/go.sum b/go.sum
index 28ccd019cf..6794813037 100644
--- a/go.sum
+++ b/go.sum
@@ -31,8 +31,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1 h1:CskT+S6Ay54OwxBGB0R3Rsx4Muto6UnEYTyKJbyRIAI=
-github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=
github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE=
github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg=
github.com/shirou/gopsutil v2.20.7+incompatible h1:Ymv4OD12d6zm+2yONe39VSmp2XooJe8za7ngOLW/o/w=
diff --git a/router/middleware/caching.go b/router/middleware/caching.go
index 274297a85a..bcc79ff1db 100644
--- a/router/middleware/caching.go
+++ b/router/middleware/caching.go
@@ -57,6 +57,8 @@ func getCacheDurationSecondsForPath(filePath string) int {
// This matters most for local hosting of segments for recordings
// and not for live or 3rd party storage.
return 31557600
+ } else if path.Ext(filePath) == ".m3u8" {
+ return 0
}
// Default cache length in seconds