Generate a static thumbnail png every 20s
This commit is contained in:
8
main.go
8
main.go
@@ -13,14 +13,13 @@ var configuration = getConfig()
|
||||
var server *Server
|
||||
|
||||
var online = false
|
||||
var usingExternalStorage = false
|
||||
|
||||
func main() {
|
||||
log.Println("Starting up. Please wait...")
|
||||
resetDirectories(configuration)
|
||||
checkConfig(configuration)
|
||||
|
||||
var usingExternalStorage = false
|
||||
|
||||
if configuration.IPFS.Enabled {
|
||||
storage = &IPFSStorage{}
|
||||
usingExternalStorage = true
|
||||
@@ -66,6 +65,11 @@ func getStatus(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func streamConnected() {
|
||||
online = true
|
||||
chunkPath := configuration.PublicHLSPath
|
||||
if usingExternalStorage {
|
||||
chunkPath = configuration.PrivateHLSPath
|
||||
}
|
||||
startThumbnailGenerator(chunkPath)
|
||||
}
|
||||
|
||||
func streamDisconnected() {
|
||||
|
||||
Reference in New Issue
Block a user