Skip to content

Commit

Permalink
将 ui 独立出去
Browse files Browse the repository at this point in the history
  • Loading branch information
langhuihui committed Jan 8, 2024
1 parent a96e43c commit 5dcd1c6
Show file tree
Hide file tree
Showing 82 changed files with 79 additions and 518 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.GO_MODULE_PRIVATE_KEY }}"
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
export GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade
export GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade,m7s.live/plugin/cdn,m7s.live/plugin/crypto,m7s.live/plugin/admin
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
go mod download
- name: Run GoReleaser
Expand All @@ -49,6 +49,7 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPRIVATE: m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade,m7s.live/plugin/cdn,m7s.live/plugin/crypto,m7s.live/plugin/admin
- name: copy
if: success() && startsWith(github.ref, 'refs/tags/')
run: |
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 编译方式

## 设置 GO 环境变量
```bash
GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade,m7s.live/plugin/cdn,m7s.live/plugin/crypto,m7s.live/plugin/admin
```

## 设置 git config
```bash
git config --global url."[email protected]:Monibuca/".insteadOf "https://github.com/Monibuca/"
```
6 changes: 5 additions & 1 deletion conf/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ cascadeclient:
# hdl:
# enable: true
# preview:
# enable: true
# enable: true
cdn:
target:
-
host: push.wuqianyi.vip
36 changes: 19 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,34 @@ go 1.20

require (
go.uber.org/zap v1.26.0 // indirect
m7s.live/engine/v4 v4.14.6-0.20231220021402-453ea6a6f244
m7s.live/plugin/debug/v4 v4.0.2-0.20231220021419-8560e3adc2d2
m7s.live/plugin/gb28181/v4 v4.4.4-0.20231212111848-bee261a67086
m7s.live/engine/v4 v4.14.6
m7s.live/plugin/debug/v4 v4.0.2
m7s.live/plugin/gb28181/v4 v4.4.4
m7s.live/plugin/hdl/v4 v4.1.10
m7s.live/plugin/hls/v4 v4.3.8-0.20231213072004-7ec5ce26b101
m7s.live/plugin/hook/v4 v4.0.3-0.20231213072035-80b5f6e25286
m7s.live/plugin/hls/v4 v4.3.8
m7s.live/plugin/hook/v4 v4.0.3
m7s.live/plugin/jessica/v4 v4.2.1
m7s.live/plugin/logrotate/v4 v4.0.5-0.20231213072057-ea7b8d660ad0
m7s.live/plugin/preview/v4 v4.1.4-0.20231214052634-6e5ce878edd0
m7s.live/plugin/record/v4 v4.4.6-0.20231215101053-3733b9f4e61f
m7s.live/plugin/room/v4 v4.0.12-0.20231213072347-4ec68e833905
m7s.live/plugin/rtmp/v4 v4.2.10-0.20231213072600-93973f247912
m7s.live/plugin/rtsp/v4 v4.3.4-0.20231213072710-5e722bf84914
m7s.live/plugin/webrtc/v4 v4.2.4-0.20231213072749-467b55cfecf6
m7s.live/plugin/webtransport/v4 v4.0.10-0.20231214053057-d0d850c713dc
m7s.live/plugin/logrotate/v4 v4.0.5
m7s.live/plugin/preview/v4 v4.1.4
m7s.live/plugin/record/v4 v4.4.6
m7s.live/plugin/room/v4 v4.0.12
m7s.live/plugin/rtmp/v4 v4.2.10
m7s.live/plugin/rtsp/v4 v4.3.4
m7s.live/plugin/snap/v4 v4.0.8
m7s.live/plugin/webrtc/v4 v4.2.4
m7s.live/plugin/webtransport/v4 v4.0.10
)

require (
m7s.live/plugin/admin/v4 v4.0.0-20240108055453-1301d85c4655
m7s.live/plugin/cascade/v4 v4.0.0-20231214061644-15d42e824ff6
m7s.live/plugin/snap/v4 v4.0.7
m7s.live/plugin/cdn/v4 v4.0.0-20240105063308-24c28fca43cd
m7s.live/plugin/snappro/v4 v4.0.0-20231013095636-dd1dabf3778b
m7s.live/plugin/transcode/v4 v4.0.0-20231225135840-267c06015629
m7s.live/plugin/transcode/v4 v4.0.0-20231018041942-358fb2ac30a2
)

require (
github.com/Eyevinn/mp4ff v0.38.0 // indirect
github.com/Eyevinn/mp4ff v0.40.1 // indirect
github.com/abema/go-mp4 v1.1.1 // indirect
github.com/aler9/writerseeker v1.1.0 // indirect
github.com/asticode/go-astikit v0.30.0 // indirect
Expand All @@ -48,7 +50,7 @@ require (
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.0 // indirect
github.com/gobwas/ws v1.3.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8 // indirect
Expand Down
72 changes: 38 additions & 34 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Eyevinn/mp4ff v0.38.0 h1:9DrGxg0qDTsjJuj7MoE0a8IWZP8AnwfRd98csXgrWhs=
github.com/Eyevinn/mp4ff v0.38.0/go.mod h1:w/6GSa5ghZ1VavzJK6McQ2/flx8mKtcrKDr11SsEweA=
github.com/Eyevinn/mp4ff v0.40.1 h1:7q/AtT2CFrZuYiR4PWB3nqsbG0nhyP9QAiX8iTId/+M=
github.com/Eyevinn/mp4ff v0.40.1/go.mod h1:w/6GSa5ghZ1VavzJK6McQ2/flx8mKtcrKDr11SsEweA=
github.com/abema/go-mp4 v1.1.1 h1:OfzkdMO6SWTBR1ltNSVwlTHatrAK9I3iYLQfkdEMMuc=
github.com/abema/go-mp4 v1.1.1/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws=
github.com/aler9/writerseeker v1.1.0 h1:t+Sm3tjp8scNlqyoa8obpeqwciMNOvdvsxjxEb3Sx3g=
Expand Down Expand Up @@ -65,8 +65,8 @@ github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u1
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.1.0-rc.1/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0=
github.com/gobwas/ws v1.3.0 h1:sbeU3Y4Qzlb+MOzIe6mQGf7QR4Hkv6ZD0qhGkBFL2O0=
github.com/gobwas/ws v1.3.0/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/gobwas/ws v1.3.1 h1:Qi34dfLMWJbiKaNbDVzM9x27nZBjmkaW6i4+Ku+pGVU=
github.com/gobwas/ws v1.3.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
Expand Down Expand Up @@ -451,43 +451,47 @@ gorm.io/driver/sqlite v1.5.3 h1:7/0dUgX28KAcopdfbRWWl68Rflh6osa4rDh+m51KL2g=
gorm.io/driver/sqlite v1.5.3/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4=
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 h1:sC1Xj4TYrLqg1n3AN10w871An7wJM0gzgcm8jkIkECQ=
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
m7s.live/engine/v4 v4.14.6-0.20231220021402-453ea6a6f244 h1:9sCtX8OiQJayEczhp8ggBDiHf2jkxDlVH0qNScEW1Lo=
m7s.live/engine/v4 v4.14.6-0.20231220021402-453ea6a6f244/go.mod h1:FRtMPBGzNE6kCLgY0wuS3H7d1btKocRiVe9fAkDtP1g=
m7s.live/engine/v4 v4.14.6 h1:7V5Tv/DEHHPl2PCJCU+hI8YSGY9zKxi4FK8EaXFKpzQ=
m7s.live/engine/v4 v4.14.6/go.mod h1:FRtMPBGzNE6kCLgY0wuS3H7d1btKocRiVe9fAkDtP1g=
m7s.live/plugin/admin/v4 v4.0.0-20240108055453-1301d85c4655 h1:N8epYUmI3/lH3Ac73OdykmmXU+o8iN8snkqyKk5sULw=
m7s.live/plugin/admin/v4 v4.0.0-20240108055453-1301d85c4655/go.mod h1:vME5OglIgnne9XXn2EHG2yRDcV5nLxb6cSxjMBGG8nI=
m7s.live/plugin/cascade/v4 v4.0.0-20231214061644-15d42e824ff6 h1:65DfJnp9r3ply9yN2ToM/5EaKvgeu08atLaDSye95ns=
m7s.live/plugin/cascade/v4 v4.0.0-20231214061644-15d42e824ff6/go.mod h1:/O9oNK/f+Ku1h4TzhYOjnWiXmzTvzRSZyuE3jRB/GIU=
m7s.live/plugin/debug/v4 v4.0.2-0.20231220021419-8560e3adc2d2 h1:gSkJ5fz9sV0UGcKVegdKqKELp59xJy6ONL7hKhpd/bg=
m7s.live/plugin/debug/v4 v4.0.2-0.20231220021419-8560e3adc2d2/go.mod h1:muzikl1KrHfbT/+2aHzKg9qDGfpArViQAtpcfFrST88=
m7s.live/plugin/gb28181/v4 v4.4.4-0.20231212111848-bee261a67086 h1:0GDyECZQLVbnNATSKJmNxd951d2NnFsxXZK8Ecl089k=
m7s.live/plugin/gb28181/v4 v4.4.4-0.20231212111848-bee261a67086/go.mod h1:mK5embLQwDULFJjA7jBls1Cwvow98lTWS6n/uZ7Ampk=
m7s.live/plugin/cdn/v4 v4.0.0-20240105063308-24c28fca43cd h1:IHLuz0RNrOTgAHM3d0fLIVsCw2+Pz6hLhttr9VbPUMI=
m7s.live/plugin/cdn/v4 v4.0.0-20240105063308-24c28fca43cd/go.mod h1:9yrvhvrvKfKhcRNwy3uunjCCk7g4toZapVgMJa7XVyo=
m7s.live/plugin/debug/v4 v4.0.2 h1:JWiECbI4V7s/5RIjAJR/TscS0Wae2Lv+sg/D8HVJZpU=
m7s.live/plugin/debug/v4 v4.0.2/go.mod h1:muzikl1KrHfbT/+2aHzKg9qDGfpArViQAtpcfFrST88=
m7s.live/plugin/gb28181/v4 v4.4.4 h1:2ZeHCYk1qyYoF9YwEJPFkqZzH/FmkadSxT2GC+tkKFk=
m7s.live/plugin/gb28181/v4 v4.4.4/go.mod h1:mK5embLQwDULFJjA7jBls1Cwvow98lTWS6n/uZ7Ampk=
m7s.live/plugin/hdl/v4 v4.1.10 h1:6/3aCaVvqpc4m/oyhW1jgQeYfPHINiKGAP+FGptVNqU=
m7s.live/plugin/hdl/v4 v4.1.10/go.mod h1:SzMML8acGj8QD5AwihVTnTuCAdKCOpdf+q/CYl/3/Hc=
m7s.live/plugin/hls/v4 v4.3.8-0.20231213072004-7ec5ce26b101 h1:GzKNBDIPNY5lJdJqRdVlbepae4JAGTU6iZ5/T/vOjgw=
m7s.live/plugin/hls/v4 v4.3.8-0.20231213072004-7ec5ce26b101/go.mod h1:ol/+hCmdqip2Ns1zIDXHWoDD7xk5Dp76AhqlIwrbRSc=
m7s.live/plugin/hook/v4 v4.0.3-0.20231213072035-80b5f6e25286 h1:5sCxQSBnEzqIIDMpehZLKNDmcLlVf8H//kSQ1BMa0M0=
m7s.live/plugin/hook/v4 v4.0.3-0.20231213072035-80b5f6e25286/go.mod h1:bX151KQljdzLPAD7sqae4W+bGjTrQ+9i24/Svs2wWDk=
m7s.live/plugin/hls/v4 v4.3.8 h1:VrN1b9OuUmfsPDXuL905mfAltR01Lt/oAsUCCr7uDIo=
m7s.live/plugin/hls/v4 v4.3.8/go.mod h1:5b9FA/l4EQ8KhrmML83zmqX1Pt//bv9LLMlfW5ceCWc=
m7s.live/plugin/hook/v4 v4.0.3 h1:SDIUQ0lmq9bHfpIcHrvPqwGPad4z0wyI/lIvuYXi/RM=
m7s.live/plugin/hook/v4 v4.0.3/go.mod h1:bX151KQljdzLPAD7sqae4W+bGjTrQ+9i24/Svs2wWDk=
m7s.live/plugin/jessica/v4 v4.2.1 h1:GbQ8V2ElHT7Q/0y1cyXCzw/DvTnqkpP1kCOpVd+0d6Y=
m7s.live/plugin/jessica/v4 v4.2.1/go.mod h1:62tI6vio/PkJhuIbkrIKZm9jAEHwkzXe4Uk1EJaK5iQ=
m7s.live/plugin/logrotate/v4 v4.0.5-0.20231213072057-ea7b8d660ad0 h1:I/dV+8J9umz6sznsRcUHWImCrpr6+Cmeth6cXOP4INA=
m7s.live/plugin/logrotate/v4 v4.0.5-0.20231213072057-ea7b8d660ad0/go.mod h1:a8hIV59GjpQDE+Ip790CU7yOHaG4+Iweci0sLvo43FU=
m7s.live/plugin/preview/v4 v4.1.4-0.20231214052634-6e5ce878edd0 h1:DaYwxaa+/NG2Lm5sphAx9fNBbMCZ7NJTLO85/LZf2rc=
m7s.live/plugin/preview/v4 v4.1.4-0.20231214052634-6e5ce878edd0/go.mod h1:iYhWqFbTvTNDFplbTOrE5X9M6ED7gCKkKMuM5QmBocg=
m7s.live/plugin/logrotate/v4 v4.0.5 h1:5TK91rhqo3kJMUHu9C1CBkd/j8HeoUSG4okk5gRjq4Y=
m7s.live/plugin/logrotate/v4 v4.0.5/go.mod h1:a8hIV59GjpQDE+Ip790CU7yOHaG4+Iweci0sLvo43FU=
m7s.live/plugin/preview/v4 v4.1.4 h1:ij5X5AYyD3vTOpla8DfVIcQi62HNZTHMppTgr7fFEh4=
m7s.live/plugin/preview/v4 v4.1.4/go.mod h1:iYhWqFbTvTNDFplbTOrE5X9M6ED7gCKkKMuM5QmBocg=
m7s.live/plugin/ps/v4 v4.1.5-0.20231213072312-25570d9571b3 h1:Ibo6vCb8VpqnpIQ2/3PFIr35BMku/2/j44f8cms77AM=
m7s.live/plugin/ps/v4 v4.1.5-0.20231213072312-25570d9571b3/go.mod h1:RAb507iNmPG43I5kUA6ewF1fTRHDRsKbIVkIdLdKeeI=
m7s.live/plugin/record/v4 v4.4.6-0.20231215101053-3733b9f4e61f h1:NXbePsmM1JKOdcuU3XUI9eqGjjG6HYZxMHxkS+/3QXg=
m7s.live/plugin/record/v4 v4.4.6-0.20231215101053-3733b9f4e61f/go.mod h1:lwVE6xn4sGQBLOWgshw3L1fa5zyEM7NlmQ8otTQGXUY=
m7s.live/plugin/room/v4 v4.0.12-0.20231213072347-4ec68e833905 h1:Sw0MUvHze5ueZT6YnwmJjyK7M9Apsum1VCaWgJKCzjE=
m7s.live/plugin/room/v4 v4.0.12-0.20231213072347-4ec68e833905/go.mod h1:/bhhkT3bMh3q08HEO2eTC9sr8xV0XIcODEAJryeSVUI=
m7s.live/plugin/rtmp/v4 v4.2.10-0.20231213072600-93973f247912 h1:aM+sdeVQHghyQ2mrFo1kkuNnAFp8nAPcQgztbmQQYT4=
m7s.live/plugin/rtmp/v4 v4.2.10-0.20231213072600-93973f247912/go.mod h1:UqI1l1+3Y2zg2oOUkfVJ719hcv10bMYVAlg5e+gqy2E=
m7s.live/plugin/rtsp/v4 v4.3.4-0.20231213072710-5e722bf84914 h1:NVmpte5refCcJhFM0zwVMxCl2mFByBCiRJwrKp7D9FE=
m7s.live/plugin/rtsp/v4 v4.3.4-0.20231213072710-5e722bf84914/go.mod h1:s6tETQjq/peipACzpkPjXsZfHw+Vq7D1lyHnqSl8DRs=
m7s.live/plugin/snap/v4 v4.0.7 h1:9otl/K5Iq+wlnrcTEIOnBXGarNXd+Fl4r+684Uz+V+k=
m7s.live/plugin/snap/v4 v4.0.7/go.mod h1:XHggonZ0lIKEX/OP2rXjV2mPpG4urmvMT3foIaFRsus=
m7s.live/plugin/record/v4 v4.4.6 h1:uXhJIudBQ8T3hsNkkOgEbtWsC8feiIT1o/+Ij1SWU0A=
m7s.live/plugin/record/v4 v4.4.6/go.mod h1:4fSAA/AYCNsFA0Ii0UVuBqsbhoTXC1s3lC/en5qabjg=
m7s.live/plugin/room/v4 v4.0.12 h1:jT2Ovpd/tV9F+F3gUhwxqDunrCPfa90/kSXnqqCbiZ4=
m7s.live/plugin/room/v4 v4.0.12/go.mod h1:4GBdAHUYtdp+nkHcGIClI8xkIUo/VTrD9Y0YMlTE7HU=
m7s.live/plugin/rtmp/v4 v4.2.10 h1:Ag7clTnKbbGVEZ0gFBxwFrCUxT61/VgRzR3WSsEzS98=
m7s.live/plugin/rtmp/v4 v4.2.10/go.mod h1:UqI1l1+3Y2zg2oOUkfVJ719hcv10bMYVAlg5e+gqy2E=
m7s.live/plugin/rtsp/v4 v4.3.4 h1:dwRCdmXEFORzvVhPHfIV+5Pdlhx/OMjk5xmaKDpRDXw=
m7s.live/plugin/rtsp/v4 v4.3.4/go.mod h1:s6tETQjq/peipACzpkPjXsZfHw+Vq7D1lyHnqSl8DRs=
m7s.live/plugin/snap/v4 v4.0.8 h1:65t4Wd9wiBdD1/ucCSVma5/LhEg/6XbC4yqf95uvCxI=
m7s.live/plugin/snap/v4 v4.0.8/go.mod h1:gVOKn5v2wpKQrklES+nQsaMo6T6ZjfEME7Nz3G51D74=
m7s.live/plugin/snappro/v4 v4.0.0-20231013095636-dd1dabf3778b h1:uzlLcG6jzzg7p2P6V/ELRb8+uVohGCGH5SOMBu3fCf4=
m7s.live/plugin/snappro/v4 v4.0.0-20231013095636-dd1dabf3778b/go.mod h1:DLi8nwlhDPWrEm8vuFz685kF+x2UjQC7gIJbr3BMlRA=
m7s.live/plugin/transcode/v4 v4.0.0-20231225135840-267c06015629 h1:58FWozwlxPDwOy18CmAWQHcltDmDvwpOJXl0JtVQhjE=
m7s.live/plugin/transcode/v4 v4.0.0-20231225135840-267c06015629/go.mod h1:+k+FyhOyt9lD+Mr641SItYeeZ0KwS72QvSEyDxDbRls=
m7s.live/plugin/webrtc/v4 v4.2.4-0.20231213072749-467b55cfecf6 h1:2fpocvEtB2A8uW/hbGNXr34xhs5B/xbKqLQMWyVi1rQ=
m7s.live/plugin/webrtc/v4 v4.2.4-0.20231213072749-467b55cfecf6/go.mod h1:GHnmheJotswzQAPzMrQ7mjImzTECLCSFfWWgavwbkng=
m7s.live/plugin/webtransport/v4 v4.0.10-0.20231214053057-d0d850c713dc h1:lffChG8vjWCYcqNNtyy88AtgOCn8aLWn0fJF3P0gXuA=
m7s.live/plugin/webtransport/v4 v4.0.10-0.20231214053057-d0d850c713dc/go.mod h1:OBTNwQ4TLMaWV4C6Q2un1YKEJaMwk26qdgfI3hX1+qw=
m7s.live/plugin/transcode/v4 v4.0.0-20231018041942-358fb2ac30a2 h1:w2sEH1ruphES6ZCafaNcseFZlF4pArafIgDcNXzc2Io=
m7s.live/plugin/transcode/v4 v4.0.0-20231018041942-358fb2ac30a2/go.mod h1:cT9BU9SNKwqQ3UToNjtJl11Vv2Y/01B63DLYzjR7mpY=
m7s.live/plugin/webrtc/v4 v4.2.4 h1:wG+aMaUK10q/vQEDXLpmIoHgLsIsY472GfnabI9dxAE=
m7s.live/plugin/webrtc/v4 v4.2.4/go.mod h1:GHnmheJotswzQAPzMrQ7mjImzTECLCSFfWWgavwbkng=
m7s.live/plugin/webtransport/v4 v4.0.10 h1:qacHR9Jsfrx98vngTLwtNtbdh3U2XcPe1BQqUdnDDA4=
m7s.live/plugin/webtransport/v4 v4.0.10/go.mod h1:OBTNwQ4TLMaWV4C6Q2un1YKEJaMwk26qdgfI3hX1+qw=
3 changes: 0 additions & 3 deletions goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ builds:
- id: "use cgo"
env:
- CGO_ENABLED=1
- GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade
ldflags:
- -s -w -X main.version={{.Tag}}
goos:
Expand All @@ -20,7 +19,6 @@ builds:
- id: "no cgo arm"
env:
- CGO_ENABLED=0
- GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade
ldflags:
- -s -w -X main.version={{.Tag}}
goos:
Expand All @@ -35,7 +33,6 @@ builds:
- id: "no cgo amd64"
env:
- CGO_ENABLED=0
- GOPRIVATE=m7s.live/plugin/snappro/v4,m7s.live/plugin/transcode/v4,m7s.live/plugin/cascade
ldflags:
- -s -w -X main.version={{.Tag}}
goos:
Expand Down
41 changes: 4 additions & 37 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package main

//go:generate go run gen.go $debug

/*
███ ███ ██████ ███ ██ 👑 ██████ ██ ██ ██████ █████
████ ████ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██
Expand All @@ -15,18 +13,16 @@ The live stream server for Go

import (
"context"
"embed"
"flag"
"fmt"
"net/http"
"os"
"time"

"m7s.live/engine/v4"
"m7s.live/engine/v4/config"
"m7s.live/engine/v4/util"

_ "m7s.live/plugin/admin/v4"
_ "m7s.live/plugin/cascade/v4"
_ "m7s.live/plugin/cdn/v4"
_ "m7s.live/plugin/debug/v4"
_ "m7s.live/plugin/gb28181/v4"
_ "m7s.live/plugin/hdl/v4"
Expand All @@ -39,7 +35,6 @@ import (
_ "m7s.live/plugin/room/v4"
_ "m7s.live/plugin/rtmp/v4"
_ "m7s.live/plugin/rtsp/v4"

_ "m7s.live/plugin/transcode/v4"
_ "m7s.live/plugin/webrtc/v4"
_ "m7s.live/plugin/webtransport/v4"
Expand All @@ -49,41 +44,13 @@ var (
version = "dev"
)

//go:embed ui/*
var uiFiles embed.FS
var fileServer = http.FileServer(http.FS(uiFiles))

type UIConfig struct {
config.HTTP
}

func (UIConfig) OnEvent(event any) {
}

func (UIConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" {
r.URL.Path = "/ui/index.html"
} else {
r.URL.Path = "/ui" + r.URL.Path
}
file, err := os.Open("./" + r.URL.Path)
if err == nil {
defer file.Close()
http.ServeContent(w, r, r.URL.Path, time.Now(), file)
return
}
fileServer.ServeHTTP(w, r)
}

var UIPlugin = engine.InstallPlugin(&UIConfig{})

func main() {
fmt.Println("start monibuca pro version:", version)
conf := flag.String("c", "config.yaml", "config file")
flag.Parse()
_ctx := context.WithValue(context.Background(), "version", version)
// ctx, cancel := context.WithTimeout(_ctx, 3*time.Hour)
ctx, cancel := context.WithCancel(_ctx)
ctx, cancel := context.WithTimeout(_ctx, 3*time.Hour)
// ctx, cancel := context.WithCancel(_ctx)
go util.WaitTerm(cancel)
engine.Run(ctx, *conf)
}
1 change: 0 additions & 1 deletion ui/_app.config.js

This file was deleted.

Loading

0 comments on commit 5dcd1c6

Please sign in to comment.