ios - Swift: Streaming video file from pc -
i play video file on local pc (path: "http://192.168.1.5:9000/assets/uploadedfiles/4.mp4"). iphone , pc both in same network. following code works fine if play videos on iphone. otherwise displays black screen.
self.objmovieplayercontroller = mpmovieplayercontroller(contenturl: url!) self.objmovieplayercontroller.moviesourcetype = mpmoviesourcetype.unknown self.objmovieplayercontroller.view.frame = self.videoview.bounds self.objmovieplayercontroller.scalingmode = mpmoviescalingmode.aspectfill self.objmovieplayercontroller.controlstyle = mpmoviecontrolstyle.embedded self.objmovieplayercontroller.contenturl = url! self.objmovieplayercontroller.shouldautoplay = true self.videoview.addsubview(self.objmovieplayercontroller.view) self.objmovieplayercontroller.preparetoplay() self.objmovieplayercontroller.play()
i don't want download video file iphone. there way stream video file pc? thanks
Comments
Post a Comment