1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-07-01 12:11:15 +02:00

1 Commits

Author SHA1 Message Date
91b7f3d789 Config on legal mentions 2020-11-12 01:34:02 +01:00
15 changed files with 19 additions and 69 deletions

View File

@ -3,14 +3,12 @@ package ldap
import (
"github.com/go-ldap/ldap/v3"
"log"
)
// Options holds package configuration
type Options struct {
Aliases map[string]string
URI string
UserDn string
URI string
UserDn string
}
// LDAP authentification backend
@ -22,12 +20,6 @@ type LDAP struct {
// Login tries to bind to LDAP
// Returns (true, nil) if success
func (a LDAP) Login(username string, password string) (bool, error) {
// Resolve stream alias if necessary
for aliasFor, ok := a.Cfg.Aliases[username]; ok; aliasFor, ok = a.Cfg.Aliases[username] {
log.Printf("[LDAP] Use stream alias %s for username %s", username, aliasFor)
username = aliasFor
}
// Try to bind as user
bindDn := "cn=" + username + "," + a.Cfg.UserDn
err := a.Conn.Bind(bindDn, password)

View File

@ -21,11 +21,8 @@
</IceCandidates>
</WebRTC>
<HLS>
<Port>80</Port>
</HLS>
<DASH>
<Port>80</Port>
</DASH>
</HLS>
</Publishers>
</Bind>
@ -55,15 +52,14 @@
</Video>
</Encode>
<Encode>
<Name>bypass</Name>
<Audio>
<Bypass>true</Bypass>
</Audio>
<Name>BYPASS</Name>
<Video>
<Bypass>true</Bypass>
</Video>
<Audio>
<Bypass>true</Bypass>
</Audio>
</Encode>
</Encodes>
<Streams>
<Stream>
@ -75,10 +71,9 @@
<Stream>
<Name>${OriginStreamName}_bypass</Name>
<Profiles>
<Profile>bypass</Profile>
<Profile>BYPASS</Profile>
</Profiles>
</Stream>
</Streams>
<Providers>
<RTMP>
@ -91,28 +86,15 @@
<Timeout>30000</Timeout>
</WebRTC>
<HLS>
<SegmentDuration>2</SegmentDuration>
<SegmentDuration>5</SegmentDuration>
<SegmentCount>2</SegmentCount>
<CrossDomain>
<Url>*</Url>
</CrossDomain>
</HLS>
<DASH>
<SegmentDuration>2</SegmentDuration>
<SegmentCount>2</SegmentCount>
<CrossDomain>
<Url>*</Url>
</CrossDomain>
</DASH>
<LLDASH>
<SegmentDuration>2</SegmentDuration>
<CrossDomain>
<Url>*</Url>
</CrossDomain>
</LLDASH>
</Publishers>
</Application>
</Applications>
</VirtualHost>
</VirtualHosts>
</Server>
</Server>

View File

@ -34,11 +34,6 @@ auth:
#ldap:
# uri: ldap://127.0.0.1:389
# userdn: cn=users,dc=example,dc=com
#
# # You can define aliases, to stream on stream.example.com/example with the credentials of the demo account.
# aliases:
# example: demo
#
## Stream forwarding ##
# Forward an incoming stream to other servers

View File

@ -42,9 +42,8 @@ func New() *Config {
Credentials: make(map[string]string),
},
LDAP: ldap.Options{
Aliases: make(map[string]string),
URI: "ldap://127.0.0.1:389",
UserDn: "cn=users,dc=example,dc=com",
URI: "ldap://127.0.0.1:389",
UserDn: "cn=users,dc=example,dc=com",
},
},
Forwarding: make(map[string][]string),

View File

@ -47,20 +47,10 @@ export function initViewerPage(stream, omeApp, viewersCounterRefreshPeriod, post
"label": " WebRTC - Source"
},
{
"file": "https://" + window.location.host + "/" + omeApp + "/" + stream + "_bypass/playlist.m3u8",
"type": "hls",
"file": "https://" + window.location.host + "/" + omeApp + "/" + stream + "_bypass/playlist.m3u8",
"label": " HLS"
},
{
"file": "https://" + window.location.host + "/" + omeApp + "/" + stream + "_bypass/manifest.mpd",
"type": "dash",
"label": "DASH"
},
{
"file": "https://" + window.location.host + "/" + omeApp + "/" + stream + "_bypass/manifest_ll.mpd",
"type": "dash",
"label": "LL-DASH"
},
}
]
});
player.on("stateChanged", function (data) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
/*! OvenPlayerv0.9.0 | (c)2020 AirenSoft Co., Ltd. | MIT license (https://github.com/AirenSoft/OvenPlayerPrivate/blob/master/LICENSE) | Github : https://github.com/AirenSoft/OvenPlayer */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
/*! OvenPlayerv0.9.0 | (c)2020 AirenSoft Co., Ltd. | MIT license (https://github.com/AirenSoft/OvenPlayerPrivate/blob/master/LICENSE) | Github : https://github.com/AirenSoft/OvenPlayer */

View File

@ -36,7 +36,6 @@
{{if .OMECfg.Enabled}}
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.9.3/dash.all.min.js"></script>
<script src="/static/ovenplayer/ovenplayer.js"></script>
<script src="/static/js/ovenplayer.js"></script>
{{end}}