thomaschristensen / Pantomime

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

Support Swift 3 #9

Open noamtamim opened 7 years ago

noamtamim commented 7 years ago

There are already forks that did it, like https://github.com/acrtec/Pantomime.

Momeks commented 7 years ago

I installed this framework via pod but got 34 errors ! It seem it is not compatible with swift 3 !

noamtamim commented 7 years ago

Just found that Swift 3 compatibility was actually implemented. It's on master branch, but for some reason wasn't released (no tag and no Pod update). So, if you need it for an app just add the pod by git with branch.

Momeks commented 7 years ago

Thank you , but how should I git it with branch ?

noamtamim commented 7 years ago

Something like that: pod 'Pantomime', :git => 'https://github.com/thomaschristensen/Pantomime.git', :branch => 'master'

See https://guides.cocoapods.org/using/the-podfile.html for more options.

Momeks commented 7 years ago

Thank you 👍 it works fine , but there is no way to extract video file from the .m3u8 , I need to parse the URL and then download the video file, this is my code : let builder = ManifestBuilder() let masterManifestURL = URL(string: "https://xxxxxxxxxxx.com/videos193dbe05552d449f81057009b11defe1475564711-640-360-900-h264.mp4/master.m3u8") let videoFile = builder.parseMasterPlaylistFromURL(masterManifestURL!)