M3U8Manager
public class M3U8Manager
M3U8Manager is an helper class for fetching and parsing playlists.
This class is used for convenience,
and its functionality can be mimiced by using the M3U8Parser, PlaylistFetcher and other required params.
-
Undocumented
Declaration
Swift
public init()
-
Fetches and parses a single playlist object. Returns a general playlist cast according to the type you requested.
Declaration
Swift
public func fetchAndParsePlaylist<T: Playlist>(from operationData: PlaylistOperationData, playlistType: T.Type, operationHandler: ((PlaylistOperation) -> Void)? = nil, completionHandler: @escaping (M3U8Manager.Result<T>) -> Void)Parameters
operationDataThe data params neeeded to make the request.
playlistTypeThe playlist type to to return in the result. used to save extra casting.
operationHandlerHandler for making actions on the operation performing the fetch and parse. can be used to cancel the request for example.
completionHandlerThe completion handler to be called when finished with the result of the operation.
-
Helper method to fetch and parse multiple media playlists
Declaration
Swift
public func fetchAndParseMediaPlaylists(from operationDataList: [PlaylistOperationData], operationsHandler: (([PlaylistOperation]) -> Void)? = nil, completionHandler: @escaping (M3U8Manager.Result<[MediaPlaylist]>) -> Void)Parameters
operationDataListThe data params neeeded to make all the requests.
operationsHandlerHandler for making actions on the operations performing the fetch and parse. can be used to cancel a single/multiple request/s for example.
completionHandlerThe completion handler to be called when finished with the result of the operations.
-
Cancels all the running operations on the manager.
Declaration
Swift
public func cancel()
View on GitHub
M3U8Manager Class Reference