I am working on rich notification's Notification Content Extension and have able to load images and gif successfully like following screenshot:
Now i am trying to play video and i am doing following code for playing it.
- (void)didReceiveNotification:(UNNotification *)notification {
    //self.label.text = @"HELLO world";//notification.request.content.body;
    if(notification.request.content.attachments.count > 0)
    {
        UNNotificationAttachment *Attachen = notification.request.content.attachments.firstObject;
        NSLog(@"====url %@",Attachen.URL);
        AVAsset *asset = [AVAsset assetWithURL:Attachen.URL];
        AVPlayerItem *item = [AVPlayerItem playerItemWithAsset:asset];
        AVPlayer  *player = [AVPlayer playerWithPlayerItem:item];
        AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player];
        playerLayer.contentsGravity = AVLayerVideoGravityResizeAspect;
        player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
        playerLayer.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
            [self.VideoPlayerView.layer addSublayer:playerLayer];
        [player play];
    }
}
In NSLog i get the file url of video as well. but that wont play. Kindly help if any one have that solution.
Thanks.
