Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Adding Head method to get details of first segment #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ func (p *MediaPlaylist) last() uint {
return p.tail - 1
}

// head returns the first segment's index
func (p *MediaPlaylist) Head() uint {
return p.head
}

// Remove current segment from the head of chunk slice form a media playlist. Useful for sliding playlists.
// This operation does reset playlist cache.
func (p *MediaPlaylist) Remove() (err error) {
Expand Down