diff --git a/media_playlist_tags.go b/media_playlist_tags.go index 1c041bd..49e3e22 100644 --- a/media_playlist_tags.go +++ b/media_playlist_tags.go @@ -23,6 +23,16 @@ func (tags MediaPlaylistTags) Raw() Tags { return Tags(tags) } +// First returns the first tag of the name. +func (tags MediaPlaylistTags) First(name string) *Tag { + return tags.Raw().First(name) +} + +// Last returns the last tag of the name. +func (tags MediaPlaylistTags) Last(name string) *Tag { + return tags.Raw().Last(name) +} + // Set sets the tag. // If the tag already exists, it will be overwritten. func (tags MediaPlaylistTags) Set(tag *Tag) { diff --git a/segment_tags.go b/segment_tags.go index 552574a..943c2de 100644 --- a/segment_tags.go +++ b/segment_tags.go @@ -14,6 +14,16 @@ func (tags SegmentTags) Raw() Tags { return Tags(tags) } +// First returns the first tag of the name. +func (tags SegmentTags) First(name string) *Tag { + return tags.Raw().First(name) +} + +// Last returns the last tag of the name. +func (tags SegmentTags) Last(name string) *Tag { + return tags.Raw().Last(name) +} + // Set sets the tag. // If the tag already exists, it will be overwritten. func (tags SegmentTags) Set(tag *Tag) {