title: Rich Push Notification - Video won't play in Notification Content Extension
body: <p>I am working on rich notification's <code>Notification Content Extension</code> and have able to load <code>images</code> and <code>gif</code> successfully like following screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/ZBSq9.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/ZBSq9.jpg" alt="enter image description here"></a></p>
  
  <p>Now i am trying to play video and i am doing following code for playing it.</p>
  
  <pre><code>- (void)didReceiveNotification:(UNNotification *)notification {
      //self.label.text = @"HELLO world";//notification.request.content.body;
  
      if(notification.request.content.attachments.count &gt; 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];
      }
  }
  </code></pre>
  
  <p>In NSLog i get the file url of video as well. but that wont play. Kindly help if any one have that solution.</p>
  
  <p>Thanks.</p>