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?
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
please try doing video working fine code.
read following document more info on app transportation security
i hope :)
Comments
Post a Comment