repo_description: Ultimate camera streaming application
repo_topics: ffmpeg go golang hassio hls home-assistant homekit media-server mjpeg mp4 onvif rtmp rtsp rtsp-server streaming tapo webcam-streaming webrtc wyze xiaomi
code: package srtp
  
  import (
  	"github.com/AlexxIT/go2rtc/internal/app"
  	"github.com/AlexxIT/go2rtc/pkg/srtp"
  )
  
  func Init() {
  	var cfg struct {
  		Mod struct {
  			Listen string `yaml:"listen"`
  		} `yaml:"srtp"`
  	}
  
  	// default config
  	cfg.Mod.Listen = ":8443"
  
  	// load config from YAML
  	app.LoadConfig(&cfg)
  
  	if cfg.Mod.Listen == "" {
  		return
  	}
  
  	// create SRTP server (endpoint) for receiving video from HomeKit cameras
  	Server = srtp.NewServer(cfg.Mod.Listen)
  }
  
  var Server *srtp.Server
  