Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

How to understand func NewMediaPlaylist(winsize uint, capacity uint) (*MediaPlaylist, error) correctly? #219

@http600

Description

@http600

When I check the m3u8 file

#EXTM3U
#EXT-X-VERSION:4
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-ALLOW-CACHE:NO
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:1
#EXT-X-PROGRAM-DATE-TIME:2023-05-21T12:40:52.518Z
#EXTINF:1.000
c508d7dc32bf0a1277f0f9a69672848b95e72a3498c5edcb289b9d82f479c626_00000.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-21T12:40:53.518Z
#EXTINF:1.000
c508d7dc32bf0a1277f0f9a69672848b95e72a3498c5edcb289b9d82f479c626_00001.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-21T12:40:54.518Z
#EXTINF:1.000
c508d7dc32bf0a1277f0f9a69672848b95e72a3498c5edcb289b9d82f479c626_00002.ts
#EXT-X-PROGRAM-DATE-TIME:2023-05-21T12:40:55.518Z
...

I would like to take the first three Segments into []*m3u8.MediaSegment, then build a new MediaPlayList out of it, there are no such things like winsize, capacity, how am I supposed to assign the value?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions