Documentation
¶
Overview ¶
Package play provides protocol-specific media play (subscribe) clients for integration testing. Each protocol implements the Player interface, which connects to a server, reads media frames, and delivers them to a FrameCallback for analysis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrameCallback ¶
FrameCallback is called for each received media frame.
type PlayConfig ¶
type PlayConfig struct {
Protocol string // e.g. "rtmp", "rtsp", "srt", "whep"
URL string // e.g. "rtmp://127.0.0.1:1935/live/test"
Duration time.Duration // maximum play duration; 0 = until server closes
Token string // optional auth token
}
PlayConfig describes the target and constraints for a play session.
type Player ¶
type Player interface {
Play(ctx context.Context, cfg PlayConfig, onFrame FrameCallback) error
}
Player subscribes to a media stream and delivers frames via a callback.