StreamAssetHandler
public class StreamAssetHandler : StreamHandler
Class in charge of managing the streams assets
-
Returns the Stream type - returns: a StreamType Object
Declaration
Swift
public func getStreamType() -> StreamType
Return Value
a StreamType Object
-
Returns if the class can hanlde a URL - parameter url: String with the url - returns: a Boolean true or false
Declaration
Swift
public func canHandleUrl(url: String) -> Bool
Parameters
url
String with the url
Return Value
a Boolean true or false
-
Set the Stream Asset Handler URL to manage it - parameter url: String with the url - parameter success: void block with an AVPlayerItem on success - failure success: void block with an PlayerError on error
Declaration
Swift
public func handleUrl(url: String, player: AmpPlayer, success: (AVPlayerItem?) -> Void, failure: (PlayerError) -> Void)
Parameters
url
String with the url
success
void block with an AVPlayerItem on success