Post

Replies

Boosts

Views

Activity

AVPlayer produce the error.
I am using the AVPlayer for playing the video. But my problem i.e, the the player is occurring the error. while the same url is already to play in to the Android device and Safari web browser also. If this url replaced by the other url it's working fine.This is the error.player.error==========>>>>>>>>>>Optional(Error Domain=AVFoundationErrorDomain Code=-11848 "Cannot Open" UserInfo={NSUnderlyingError=0x156d78f30 {Error Domain=NSOSStatusErrorDomain Code=-12925 "(null)"}, NSLocalizedFailureReason=The media cannot be used on this device., NSLocalizedDescription=Cannot Open})override func viewDidLoad() { super.viewDidLoad() let videoUrl = "http://telvuehls_t03007-i.akamaihd.net/hls/live/217085/T03007-calkins/playlist.m3u8" let playerItem = AVPlayerItem(URL: NSURL(string: videoUrl as String)!) let playerObj = AVPlayer(playerItem: playerItem) self.player = playerObj if playerItem.error == nil{ playerObj.play() }else{ print("player.error==========>>>>>>>>>>\(playerItem.error)") } }
4
0
3.9k
Oct ’16