OpenTV Player SDK For iOS  version 2.30.0
NMPAVPlayerItem Class Reference

NMPAVPlayerItem is the Nagra extension of iOS system AVPlayerItem class to support AES-128 scrambled Http Adaptive Streaming protocol stream with hybrid integration with Nagra CPAK library. More...

#import <NMPAVPlayerItem.h>

Inheritance diagram for NMPAVPlayerItem:

Instance Methods

(instancetype) - initWithURL:
 Initializes an AVPlayerItem with an NSURL. More...
 
(instancetype) - initWithAsset:
 Initializes an AVPlayerItem with an AVAsset. More...
 
(instancetype) - initWithAsset:automaticallyLoadedAssetKeys:
 Initializes an AVPlayerItem with an AVAsset. More...
 

Class Methods

(NMPAVPlayerItem *) + playerItemWithURL:
 Returns an instance of NMPAVPlayerItem for playing a resource at the specified location. More...
 
(NMPAVPlayerItem *) + playerItemWithAsset:
 Returns an instance of NMPAVPlayerItem for playing an AVAsset. More...
 
(NMPAVPlayerItem *) + playerItemWithAsset:automaticallyLoadedAssetKeys:
 Returns an instance of NMPAVPlayerItem for playing an AVAsset. More...
 

Detailed Description

NMPAVPlayerItem is the Nagra extension of iOS system AVPlayerItem class to support AES-128 scrambled Http Adaptive Streaming protocol stream with hybrid integration with Nagra CPAK library.

To learn more about AVPlayerItem, please refer to Apple online document: https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayerItem_Class/index.html

Definition at line 28 of file NMPAVPlayerItem.h.

Method Documentation

◆ initWithAsset:()

- (instancetype) initWithAsset: (AVAsset *)  asset

Initializes an AVPlayerItem with an AVAsset.

Parameters
[in]assetAn instance of AVAsset that references a media resource
Returns
An instance of NMPAVPlayerItem.
Note
To play AES-128 encrypted HLS stream asset must be an instance of NMPAVAsset or NMPAVURLAsset.

◆ initWithAsset:automaticallyLoadedAssetKeys:()

- (instancetype) initWithAsset: (AVAsset *)  asset
automaticallyLoadedAssetKeys: (NSArray *)  NS_DESIGNATED_INITIALIZER 

Initializes an AVPlayerItem with an AVAsset.

Parameters
[in]assetAn instance of AVAsset that references a media resource
[in]automaticallyLoadedAssetKeysAn NSArray of NSStrings, each representing a property key defined by AVAsset. See AVAsset.h for property keys, e.g. duration.
Returns
An instance of NMPAVPlayerItem.
Note
To play AES-128 encrypted HLS stream asset must be an instance of NMPAVAsset or NMPAVURLAsset.

◆ initWithURL:()

- (instancetype) initWithURL: (NSURL *)  URL

Initializes an AVPlayerItem with an NSURL.

Parameters
[in]URLAn instance of NSURL that references a media resource.
Returns
An instance of NMPAVPlayerItem.

◆ playerItemWithAsset:()

+ (NMPAVPlayerItem *) playerItemWithAsset: (AVAsset *)  asset

Returns an instance of NMPAVPlayerItem for playing an AVAsset.

Parameters
[in]assetAn instance of AVAsset that references a media resource
Returns
An instance of NMPAVPlayerItem.
Note
To play AES-128 encrypted HLS stream asset must be an instance of NMPAVAsset or NMPAVURLAsset.

◆ playerItemWithAsset:automaticallyLoadedAssetKeys:()

+ (NMPAVPlayerItem *) playerItemWithAsset: (AVAsset *)  asset
automaticallyLoadedAssetKeys: (NSArray *)  automaticallyLoadedAssetKeys 

Returns an instance of NMPAVPlayerItem for playing an AVAsset.

Parameters
[in]assetAn instance of AVAsset that references a media resource
[in]automaticallyLoadedAssetKeysAn NSArray of NSStrings, each representing a property key defined by AVAsset. See AVAsset.h for property keys, e.g. duration.
Returns
An instance of NMPAVPlayerItem.
Note
To play AES-128 encrypted HLS stream asset must be an instance of NMPAVAsset or NMPAVURLAsset.

◆ playerItemWithURL:()

+ (NMPAVPlayerItem *) playerItemWithURL: (NSURL *)  URL

Returns an instance of NMPAVPlayerItem for playing a resource at the specified location.

Parameters
[in]URLAn instance of NSURL that references a media resource.
Returns
An instance of NMPAVPlayerItem.