ios - Unable to play .mp4 video file using AVPlayer -


i using avplayer play video url.

func playvideofromurl(urlstring: string){          let videourl = url(string: urlstring)         let player = avplayer(url: videourl!)         let playerviewcontroller = avplayerviewcontroller()         playerviewcontroller.player = player          let delegate : appdelegate = uiapplication.shared.delegate as! appdelegate         delegate.window?.rootviewcontroller?.present(playerviewcontroller, animated: true) {             playerviewcontroller.player!.play()         }     } 

the url of video:- "http://gsn-input-dev.s3.amazonaws.com/public/video/00229/9229d4ad2a0c547e7bfa51e3fbef806f.mp4"

i not getting warning @ console. below screenshot of simulator. doing wrong?

enter image description here

have tried adding arbitrary load flag in info.plist file see url http url , make http url work, need specify in app transportation security via info.plist follows

enter image description here

please try doing video working fine code.

read following document more info on app transportation security

i hope :)


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -