File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ type Channel struct {
2525
2626 // UserAgent is a custom UA string that will be used by FFMPEG to make requests to the stream URL.
2727 UserAgent * string `json:"userAgent,omitempty"`
28- Icon * string `json:"icon,omitempty"`
28+ Referer * string `json:"referer,omitempty"`
29+ Icon * string `json:"icon,omitempty"`
2930}
3031
3132var (
Original file line number Diff line number Diff line change @@ -47,6 +47,14 @@ func Stream(c *gin.Context) {
4747 )
4848 }
4949
50+ if channel .Referer != nil {
51+ ffmpegArgs = append (
52+ ffmpegArgs ,
53+ "-headers" ,
54+ fmt .Sprintf ("Referer: %s" , * channel .Referer ),
55+ )
56+ }
57+
5058 switch config .Cfg .GetEncoderProfile () {
5159 case config .EncoderProfileVAAPI :
5260 ffmpegArgs = append (
You can’t perform that action at this time.
0 commit comments