monibuca / plugin-hook Goto Github PK
View Code? Open in Web Editor NEWWebHook For Monibuca
License: MIT License
WebHook For Monibuca
License: MIT License
通过API发起录制命令,程序正常进入录制状态。
此时,再次发送一个相同参数的录制请求,会发现第一次的录制文件被清空了,重新开始新的录制。
通过拉流列表API,能看到该流目前有两个
录制订阅者。
使用停止录制命令时,由于streampath相同,执行一次之后,发现只停止了一个录制订阅,再次执行停止录制API命令,API返回没有这个任务。
再去查看正在录制的任务列表API,发现返回也是空的,没有录制任务。
此时后台实际还在跑一个录制任务,通过API怎么都不能终止,拉流API里面也能看到有这个任务,但是此时录制API里面好像已经把它清空了,当作一个不存在的任务,无法停止。
最后只能通过closestream 来中断拉流,使这个重复存在的录制被迫停止。
建议录制任务添加的时候,可以像拉流API一样,判断一下streampath是否已经存在,如果已经存在就不能 重复建立录制任务。
一、当仅配置 urllist 时,出现 requestlist 没有初始化为 nil 的 panic。
二、当同时配置 urllist 和 requestlist 时,出现 reflect.Value.Convert() panic
根据 plugin-hook配置中的描述,默认会用POST方法发送request
go 1.18.2
windows/amd64
能修复这两个问题
Lines 67 to 71 in d4f76fd
https://github.com/Monibuca/engine/blob/d94fd98e9d34127e5d2e4df1486f119768cd1f41/config/config.go#L44-L49
配置一(仅配置 urllist,不配置requestlist)
hook:
urllist:
startup: "http://localhost:58888/api/monibuca/startup"
publish: "http://localhost:58888/api/monibuca/publish"
subscribe: "http://localhost:58888/api/monibuca/subscribe"
streamClose: "http://localhost:58888/api/monibuca/streamClose"
配置二(同时配置 urllist 和 requestlist)
hook:
urllist:
startup: "http://localhost:58888/api/monibuca/startup"
publish: "http://localhost:58888/api/monibuca/publish"
subscribe: "http://localhost:58888/api/monibuca/subscribe"
streamClose: "http://localhost:58888/api/monibuca/streamClose"
requestlist:
startup:
method: "POST"
header:
referer: "http://localhost:58888/api/monibuca/startup"
url: "http://localhost:58888/api/monibuca/startup"
publish:
method: "POST"
header:
referer: "http://localhost:58888/api/monibuca/publish"
url: "http://localhost:58888/api/monibuca/publish"
subscribe:
method: "POST"
header:
referer: "http://localhost:58888/api/monibuca/subscribe"
url: "http://localhost:58888/api/monibuca/subscribe"
streamClose:
method: "POST"
header:
referer: "http://localhost:58888/api/monibuca/streamClose"
url: "http://localhost:58888/api/monibuca/streamClose"
最近在使用这个hook通知来对接其他的业务层,前面拉流什么的通知都挺详细的。
今天测试录制流的接口时候,发现开启录制的话,hook会发送一个订阅请求通知到接口。
但是当录制被停止的时候,hook却没有通知了,不知道是程序本身不支持呢,还是哪个地方配置不对。
record停止录制的时候,命令行控制台会显示订阅 -1的消息,但是hook没收到
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.