mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-26 18:51:13 +08:00
22 lines
317 B
Go
22 lines
317 B
Go
package demo
|
|
|
|
import (
|
|
m7s "m7s.live/monibuca/v5"
|
|
. "m7s.live/monibuca/v5/pkg"
|
|
)
|
|
|
|
type DemoPlugin struct {
|
|
m7s.Plugin
|
|
}
|
|
|
|
func (p *DemoPlugin) OnInit() {
|
|
puber := p.Publish("live/demo")
|
|
puber.WriteVideo(&H264Nalu{})
|
|
}
|
|
|
|
func (p *DemoPlugin) OnEvent(event any) {
|
|
// ...
|
|
}
|
|
|
|
var _ = m7s.InstallPlugin[*DemoPlugin]()
|