0
最近、AVPlayer.Butを使用してiosアプリケーションにビデオを追加し始めましたが、すべてのデータをまとめて取得するのではなく、チャンク(HLS)でビデオデータを取得する必要があります。チャンクで得られたデータを再生するこのコンセプトと、以下に実装するようにデータ全体を再生するコンセプトとの違いは、このことを理解しようとしています。インターネット上でサンプルを探しましたが、既に私によって実装されたのと同じことがあります。私が前進するのを助けることができる指導。事前に感謝!チャンクで取得したデータからビデオを再生する
-(void)playVideo:(NSURL*)videoURL
{
AVPlayerItem* playerItem = [AVPlayerItem playerItemWithURL:videoURL];
AVPlayer* playVideo = [[AVPlayer alloc] initWithPlayerItem:playerItem];
_playerViewController = [[AVPlayerViewController alloc] init];
_playerViewController.player = playVideo;
_playerViewController.view.frame = self.view.bounds;
[self.view addSubview:_playerViewController.view];
[playVideo play];
}