Protocol for slot.
More...
#import <FWProtocols.h>
- (NSArray * /* <id>FWAdInstance */ FWSlot) adInstances |
|
|
|
Get the ad instances in the slot.
- Returns
- An array of id<FWAdInstance>
- (id<FWAdInstance> FWSlot) currentAdInstance |
|
|
|
Get the currently playing ad instance.
- Returns
- the AdInstance object of the currently playing ad in this slot. Return nil if no ad instance is currently playing.
- (NSString * FWSlot) customId |
|
|
|
Get the slot's custom ID.
- Returns
- Custom ID of the slot
- (NSTimeInterval FWSlot) embeddedAdsDuration |
|
|
|
Get the slot's embedded ads duration.
- Returns
- The embeded ads duration of the temporal slot. -1 if not available.
- (NSTimeInterval FWSlot) endTimePosition |
|
|
|
Get the slot's end time position.
- Returns
- The end time position of the temporal slot. -1 if not available.
- (id FWSlot) getParameter: |
|
(NSString *) |
name |
|
Get the value of a parameter by its name.
- Parameters
-
- Returns
- value of the parameter
- (NSInteger FWSlot) height |
|
|
|
Get the height of the slot in pixels as returned in ad response.
- Returns
- Height in pixels
Play the slot.
Note: If your app uses MPMoviePlayerController for content video playback, you will need to release the player when a midroll video slot is about to start, and re-create a new MPMoviePlayerController after the midroll slot ends, starting from where it was left off. This is due to the limitation that MPMoviePlayerController only supports one active stream at a time. AVPlayer does not have this limitation.
- (NSTimeInterval FWSlot) playheadTime |
|
|
|
Get the slot's playhead.
- Returns
- the playhead time in seconds, greater than or equal to 0
Preload the slot.
The notification FW_NOTIFICATION_SLOT_PRELOADED will be dispatched when the slot has finished preloading.
Note: For ads, the preload behaviour may differ due to different ad types. Based on the current implementation, it only supports VAST Ad.
- (void FWSlot) processEvent: |
|
(NSString *) |
eventName |
|
Process slot event.
- Parameters
-
eventName | Event to be processed, one of FW_EVENT_SLOT_* in FWConstants.h |
- (void FWSlot) setParameter: |
|
(NSString *) |
name |
withValue: |
|
(id) |
value |
|
|
| |
Set a parameter on the slot level.
- Parameters
-
name | name of the parameter |
value | value of the parameter |
- (void FWSlot) setVisible: |
|
(BOOL) |
value |
|
Set the visibility for a nontemporal slot.
If a nontemporal slot view should not be visible, call setVisible:NO before the slot starts. In this case there will be no impression sent to FreeWheel ad server, even if [slot play] has already been called. If a nontemporal slot has started([slot play] has been called) when it is invisible, calling setVisible:YES will display the slot and send an impression.
Note: This method has no effect on temporal slots. This method has no effect anymore if an impression has been sent.
- Parameters
-
- (UIView * FWSlot) slotBase |
|
|
|
Get slot base UIView object.
For nontemporal slots, the returned UIView should be added to a parent UIView that is already in your apps view hierarchy. For temporal slot, return value is the object set by -[FWContext setVideoDisplayBase:].
- (NSTimeInterval FWSlot) timePosition |
|
|
|
Get the slot's time position.
- Returns
- Time position of the slot
- (FWTimePositionClass FWSlot) timePositionClass |
|
|
|
Get slot's time position class.
- Returns
- Time position class of the slot, the value can be one of:
- FW_TIME_POSITION_CLASS_PREROLL
- FW_TIME_POSITION_CLASS_MIDROLL
- FW_TIME_POSITION_CLASS_POSTROLL
- FW_TIME_POSITION_CLASS_OVERLAY
- FW_TIME_POSITION_CLASS_DISPLAY
- FW_TIME_POSITION_CLASS_PAUSE_MIDROLL
- (NSTimeInterval FWSlot) totalDuration |
|
|
|
Get the slot's duration.
- Returns
- the duration in seconds, greater than or equal to 0
- (FWSlotType FWSlot) type |
|
|
|
Get the slot's type.
- Returns
- Type of the slot, the value can be one of:
- FW_SLOT_TYPE_TEMPORAL
- FW_SLOT_TYPE_VIDEOPLAYER_NONTEMPORAL
- FW_SLOT_TYPE_SITESECTION_NONTEMPORAL
Get slot's visibility.
Only applicable to non-temporal slots. YES by default.
- (NSInteger FWSlot) width |
|
|
|
Get the width of the slot in pixels as returned in ad response.
- Returns
- Width in pixels
The documentation for this protocol was generated from the following file: