ios AVPlayerViewController can not play local mp4
<p>I tried to use <code>AVPlayerViewController</code> play mp4 video. I use "http url", it can play, but when I use <code>fileUrl</code>, it does not work...</p>

<pre><code>    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"mp4ForDownloadTest" ofType:@"mp4"];
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
    NSURL *url = [NSURL fileURLWithPath:filePath isDirectory:NO];

    AVPlayerViewController *playerVC = [[AVPlayerViewController alloc] init];

    AVAsset *movieAsset = [AVURLAsset URLAssetWithURL:url options:nil];
    AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:movieAsset];
    AVPlayer *player = [AVPlayer playerWithPlayerItem:playerItem];

    playerVC.player = player;

    [self presentViewController:playerVC animated:YES completion:^{
        [player play];
    }];
}
</code></pre>

<p><a href="https://i.stack.imgur.com/ysN2s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ysN2s.png" alt="enter image description here"></a></p>