mirror of
https://github.com/alfg/ffmpegd.git
synced 2025-09-26 19:41:15 +08:00
feat: handle serving static files for browser video tag. updated goreleaser config.
This commit is contained in:
@@ -5,4 +5,17 @@ builds:
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm64
|
||||
archives:
|
||||
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
||||
replacements:
|
||||
darwin: Darwin
|
||||
linux: Linux
|
||||
windows: Windows
|
||||
amd64: x86_64
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
files:
|
||||
- README.md
|
||||
- LICENSE
|
5
main.go
5
main.go
@@ -22,9 +22,9 @@ const (
|
||||
██╔══╝ ██╔══╝ ██║╚██╔╝██║██╔═══╝ ██╔══╝ ██║ ██║██║ ██║
|
||||
██║ ██║ ██║ ╚═╝ ██║██║ ███████╗╚██████╔╝██████╔╝
|
||||
╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚═════╝
|
||||
v0.0.2
|
||||
v0.0.3
|
||||
`
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
description = "[\u001b[32mffmpegd\u001b[0m] - websocket server for \u001b[33mffmpeg-commander\u001b[0m.\n"
|
||||
usage = `
|
||||
Usage:
|
||||
@@ -97,6 +97,7 @@ func printBanner() {
|
||||
func startServer() {
|
||||
http.HandleFunc("/ws", handleConnections)
|
||||
http.HandleFunc("/files", handleFiles)
|
||||
http.Handle("/", http.FileServer(http.Dir("./")))
|
||||
|
||||
// Handles incoming WS messages from client.
|
||||
go handleMessages()
|
||||
|
Reference in New Issue
Block a user