hlsHandler.go 768 B

12345678910111213141516171819202122232425
  1. package transcoder
  2. import (
  3. "github.com/owncast/owncast/models"
  4. )
  5. // HLSHandler gets told about available HLS playlists and segments.
  6. type HLSHandler struct {
  7. Storage models.StorageProvider
  8. }
  9. // SegmentWritten is fired when a HLS segment is written to disk.
  10. func (h *HLSHandler) SegmentWritten(localFilePath string) {
  11. h.Storage.SegmentWritten(localFilePath)
  12. }
  13. // VariantPlaylistWritten is fired when a HLS variant playlist is written to disk.
  14. func (h *HLSHandler) VariantPlaylistWritten(localFilePath string) {
  15. h.Storage.VariantPlaylistWritten(localFilePath)
  16. }
  17. // MasterPlaylistWritten is fired when a HLS master playlist is written to disk.
  18. func (h *HLSHandler) MasterPlaylistWritten(localFilePath string) {
  19. h.Storage.MasterPlaylistWritten(localFilePath)
  20. }