PFAsset Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | PFAsset.h |
Overview
An object which implements the PFAsset protocol delivers playback control for 360 video assets. An PFAsset can be instantiated within Panframe by using the appropriate PFObjectFactory method.
– play
required method
Playback of the asset
- (void)play
Discussion
Playback of the asset
Declared In
PFAsset.h
– playWithSeekTo:onKeyFrame:
required method
Playback of the asset, starting at a specific time
- (void)playWithSeekTo:(CMTime)start onKeyFrame:(BOOL)keyframe
Parameters
start |
The position from the start of the asset to begin playback. |
---|---|
keyframe |
By specifying yes, you allow the seek operation to jump to the nearest keyframe for faster operation. |
Discussion
Playback of the asset, starting at a specific time
Declared In
PFAsset.h
– pause
required method
Pause the playback of the asset
- (void)pause
Discussion
Pause the playback of the asset
Declared In
PFAsset.h
– stop
required method
Stops the playback of the asset
- (void)stop
Discussion
Stops the playback of the asset
Declared In
PFAsset.h
– getTimeRange
required method
Get the current timerange of playback
- (CMTimeRange)getTimeRange
Return Value
Returns a CMTimeRange of the configured start time of playback and duration
Discussion
Get the current timerange of playback
Declared In
PFAsset.h
– setTimeRange:duration:onKeyFrame:
required method
Set the current timerange of playback. Use this to skip to a specific part in the asset.
- (void)setTimeRange:(CMTime)start duration:(CMTime)duration onKeyFrame:(BOOL)keyframe
Parameters
start |
The position from the start of the asset to begin playback. |
---|---|
duration |
The duration of the playback from the start |
keyframe |
By specifying yes, you allow the seek operation to jump to the nearest keyframe for faster operation. |
Discussion
Set the current timerange of playback. Use this to skip to a specific part in the asset.
Declared In
PFAsset.h
– getPlaybackTime
required method
Get the current time in playback
- (CMTime)getPlaybackTime
Return Value
Returns a CMTime of the current position in playback of the asset.
Discussion
Get the current time in playback
Declared In
PFAsset.h
– getDuration
required method
Get the duration of the asset
- (CMTime)getDuration
Return Value
Returns the total duration of the asset.
Discussion
Get the duration of the asset
Declared In
PFAsset.h
– getUrl
required method
Get URL of the asset
- (NSURL *)getUrl
Return Value
Returns the url of the asset.
Discussion
Get URL of the asset
Declared In
PFAsset.h
– addObserver:
required method
Add an observer to the asset
- (void)addObserver:(PFAssetObserver *)observer
Parameters
observer |
The observer implementing the PFAssetObserver protocol to be added |
---|
Discussion
Add an observer to the asset
Declared In
PFAsset.h
– removeObserver:
required method
Remove an observer to the asset
- (void)removeObserver:(PFAssetObserver *)observer
Parameters
observer |
The observer implementing the PFAssetObserver protocol to be removed |
---|
Discussion
Remove an observer to the asset
Declared In
PFAsset.h
– getStatus
required method
Returns the status of the asset
- (enum PFASSETMESSAGE)getStatus
Return Value
The status of the asset
Discussion
Returns the status of the asset
Declared In
PFAsset.h
– getDownloadProgress
required method
Returns the download progress of the asset
- (float)getDownloadProgress
Return Value
The the download progress (when dowloading assets) in a range from 0.0 to 1.0
Discussion
Returns the download progress of the asset
Declared In
PFAsset.h
– setTimeMonitor:
required method
Add a time monitor to the asset, which is fired every time a video frame arrives
- (bool)setTimeMonitor:(id<PFAssetTimeMonitor>)monitor
Parameters
monitor |
Time monitor delegate to receive updates |
---|
Return Value
Return true when the monitor can be set
Discussion
Add a time monitor to the asset, which is fired every time a video frame arrives
Declared In
PFAsset.h
– setVolume:
required method
Set the volume of the asset’s audio track
- (void)setVolume:(float)volume
Parameters
volume |
The volume on a scale of 0.0 to 1.0 |
---|
Discussion
Set the volume of the asset’s audio track
Declared In
PFAsset.h