Closed ollytom closed 3 months ago
The same idea as #7. Say we have a Variant:
v := Variant{ Bandwidth: 1280000, Video: "low", URI: "low/main/audio-video.m3u8" }
we want a function that can take that structure and return a string that would be inserted into a playlist, like:
#EXT-X-STREAM-INF:BANDWIDTH=1280000,VIDEO="low" low/main/audio-video.m3u8
I think we have most of that implemented but we aren't testing it in isolation. Some function like
TestWriteVariant(t *testing.T) {}
will make it much easier to add test cases: both ones that are valid EXT-X-STREAM-INF tags, and invalid ones too.
For more examples, see m3u8/testdata/master.m3u8
The same idea as #7. Say we have a Variant:
we want a function that can take that structure and return a string that would be inserted into a playlist, like:
I think we have most of that implemented but we aren't testing it in isolation. Some function like
will make it much easier to add test cases: both ones that are valid EXT-X-STREAM-INF tags, and invalid ones too.
For more examples, see m3u8/testdata/master.m3u8