は、私はそれは、シミュレータが、デバイス上のdoesntの仕事上の罰金果たしavplayerはデバイスではなくシミュレータでビデオを再生しますか?
avplayerviewcontroller avplayerと使用して、URLを介してビデオを再生すると問題が生じています。次のURLから
https://ipaddress(111.111.11.11:443)/mc/images/wall/small.mp4
同じビデオは、私が使用しています以下のコードデバイス
http://techslides.com/demos/sample-videos/small.mp4
に罰金果たしている - は、それは次のように私が使用している静的IPの問題です -
NSURL *url = [NSURL URLWithString:@"http://techslides.com/demos/sample-videos/small.mp4"];//@""];https://180.179.77.47:443/mc/images/wall/small.mp4
AVAsset *videoAsset = [AVAsset assetWithURL:url];
AVPlayerItem *item = [AVPlayerItem playerItemWithAsset:videoAsset];
playerVideo = [AVPlayer playerWithURL:url];
[[AVAudioSession sharedInstance]setCategory:AVAudioSessionModeMoviePlayback error:nil];
movieController = [[AVPlayerViewController alloc]init];
[movieController setAllowsPictureInPicturePlayback:YES];
movieController.player = playerVideo;
movieController.delegate = self;
movieController.videoGravity = AVLayerVideoGravityResizeAspectFill;
[self presentViewController:movieController animated:YES completion:nil];
このリンクは役立ちますか? http://www.transcoding.dk/2012/09/22/making-ah-264-for-the-web-stream-instantly/ –
あなたのローカル環境に最初のビデオがある場合は、それは外で再生されませんあなたのネットワーク。あなたのビデオがあなたの内部ネットワークにあるので、私は私のマシンで再生されていないリンクをクリックしようとすると。あなたのマシンがあなたの内部network.Thereに接続されているため、シミュレータを介してあなたのビデオを再生する場合は、avplayerとは関係ありません。あなたのデバイスがローカルネットワークに接続されていることを確認するか、uat環境でビデオを公開してit.Itをテストしてください。正常に動作します。 – Madhu