thomaschristensen / Pantomime

M3U8 parsing written in Swift
MIT License
76 stars 53 forks source link

Assumption in ManifestBuilder #1

Closed jcarroll-mediafly closed 7 years ago

jcarroll-mediafly commented 8 years ago

In the parse method I like how it can parse the master and recursively the media playlists it finds.

However, the url.URLByReplacingLastPathComponent assumes the video variant playlist url is relative to the base url. It is technically possible for the variant to be a fully qualified url in which case it should simply use that URL.

jcarroll-mediafly commented 8 years ago

On an unrelated note; I enjoy the project so far. There isn't much out there and excited to see where this goes. And once I get some free time I'm likely to contribute on things such as this. :)

Dealing with subtitles, modifying the playlist at a finer grain level, and like you said being able to write to disk are all exciting things I'd personally be interested in.

thomaschristensen commented 8 years ago

I see your point and agree that the parsing should be able to handle both situations ie. the explicit full URL and the relative.

thomaschristensen commented 8 years ago

It would be great to collaborate on enhancing this library.

thomaschristensen commented 7 years ago

Latest commit solves this by checking for protocol in the URL strings parsed. In case of the protocol has been specified it's assumed that the path will be fully specified.