How to play protected video content in iOS using AVPlayer
<p>I have used the below implementation to play a protected video content from the media server, but it shows play icon with cross line.</p>

<p>After login app need to sync the cookies to the media assets to play the protected video after authentication.<br>By using AVURLAsset, we are streaming the protected video but its not working. </p>

<pre><code>NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies];
NSDictionary *opt = @{
                           AVURLAssetReferenceRestrictionsKey: @(AVAssetReferenceRestrictionForbidRemoteReferenceToLocal),
                           AVURLAssetHTTPCookiesKey: cookies
                      };
AVAsset *asset = [AVURLAsset URLAssetWithURL:linkUrl//Media protected URL(http://www.example.com/media/video/media_mp4)
                                         options:opt];

AVPlayerItem * item = [AVPlayerItem playerItemWithAsset:asset];
AVPlayer *player = [[AVPlayer alloc] initWithPlayerItem:item];
AVPlayerViewController *playerVC = [[AVPlayerViewController alloc]init];
playerVC.player = player;

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    [self presentViewController:playerVC animated:NO completion:nil];        
});
</code></pre>