Skip to content

Commit

Permalink
Fix vMix multiview
Browse files Browse the repository at this point in the history
  • Loading branch information
FlowingSPDG committed May 16, 2024
1 parent 9aab262 commit c8e80a3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
29 changes: 14 additions & 15 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ import (
//go:embed web/dist/*
var staticFS embed.FS

// go embedは.(ピリオド)始まりのファイルに対応しない
// 一時的に除外する
///go:embed vMixMultiview/*
// var multiviewFS embed.FS
//go:embed vMixMultiview/index.html
//go:embed vMixMultiview/script.js
//go:embed vMixMultiview/jquery.js
//go:embed vMixMultiview/style.css
var multiviewFS embed.FS

func main() {
log.Println("STARTING...")
Expand Down Expand Up @@ -95,17 +96,15 @@ func main() {
}
c.Data(http.StatusOK, "text/css", b)
})
/*
r.GET("/multiviewer/*file", func(c *gin.Context) {
file := c.Param("file")
b, err := multiviewFS.ReadFile("vMixMultiview" + file)
if err != nil {
c.AbortWithError(http.StatusNotFound, err)
return
}
c.Data(http.StatusOK, "", b)
})
*/
r.GET("/multiviewer/*file", func(c *gin.Context) {
file := c.Param("file")
b, err := multiviewFS.ReadFile("vMixMultiview" + file)
if err != nil {
c.AbortWithError(http.StatusNotFound, err)
return
}
c.Data(http.StatusOK, "", b)
})

api := r.Group("/api")
{
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ build-server: build-prepare
#TODO: goxをやめる
@cd ./server && go run github.com/mitchellh/[email protected] --osarch "windows/amd64" --output ../$(DIST_DIR)/${BINARY_NAME}_{{.OS}}_{{.Arch}} ./
build-web:
@cd ./web && yarn run build
@cd ./web && yarn run build
@$(MKDIR) ./$(SERVER_DIR)/static
@$(RM) ./$(SERVER_DIR)/static/*
@$(CP) ./web/dist/* ./$(SERVER_DIR)/static/
Expand Down
5 changes: 4 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "NODE_OPTIONS='--openssl-legacy-provider' vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
Expand Down Expand Up @@ -35,5 +35,8 @@
"typescript": "~3.7.5",
"vue-cli-plugin-axios": "~0.0.4",
"vue-template-compiler": "^2.6.11"
},
"volta": {
"node": "20.13.1"
}
}

0 comments on commit c8e80a3

Please sign in to comment.