OMIDVideoEvents
@interface OMIDVideoEvents : NSObject
/*
* Initializes video events instance for the associated ad session.
* Any attempt to create a video events instance will fail if the supplied ad session has already started.
*
* @param session The ad session associated with the ad events.
* @return A new video events instance. Returns nil if the supplied ad session is nil or if a video events instance has already been registered with the ad session or if a video events instance has been created after the ad session has started.
* @see OMIDAdSession
*/
- (nullable instancetype)initWithAdSession:(nonnull OMIDAdSession *)session error:(NSError *_Nullable *_Nullable)error;
/*
* Notifies all video listeners that video content has been loaded and ready to start playing.
*
* @param vastProperties The parameters containing static information about the video placement.
* @see OMIDVASTProperties
*/
- (void)loadedWithVastProperties:(nonnull OMIDVASTProperties *)vastProperties;
/*
* Notifies all video listeners that video content has started playing.
*
* @param duration The duration of the selected video media (in seconds).
* @param videoPlayerVolume The volume from the native video player with a range between 0 and 1.
*/
- (void)startWithDuration:(CGFloat)duration
videoPlayerVolume:(CGFloat)videoPlayerVolume;
/*
* Notifies all video listeners that video playback has reached the first quartile.
*/
- (void)firstQuartile;
/*
* Notifies all video listeners that video playback has reached the midpoint.
*/
- (void)midpoint;
/*
* Notifies all video listeners that video playback has reached the third quartile.
*/
- (void)thirdQuartile;
/*
* Notifies all video listeners that video playback is complete.
*/
- (void)complete;
/*
* Notifies all video listeners that video playback has paused after a user interaction.
*/
- (void)pause;
/*
* Notifies all video listeners that video playback has resumed (after being paused) after a user interaction.
*/
- (void)resume;
/*
* Notifies all video listeners that video playback has stopped as a user skip interaction.
* Once skipped video it should not be possible for the video to resume playing content.
*/
- (void)skipped;
/*
* Notifies all video listeners that video playback has stopped and started buffering.
*/
- (void)bufferStart;
/*
* Notifies all video listeners that buffering has finished and video playback has resumed.
*/
- (void)bufferFinish;
/*
* Notifies all video listeners that the video player volume has changed.
*
* @param playerVolume The volume from the native video player with a range between 0 and 1.
*/
- (void)volumeChangeTo:(CGFloat)playerVolume;
/*
* Notifies all video listeners that video player state has changed. See {@link OMIDPlayerState} for list of supported states.
*
* @param playerState The latest video player state.
* @see OMIDPlayerState
*/
- (void)playerStateChangeTo:(OMIDPlayerState)playerState;
/*
* Notifies all video listeners that the user has performed an ad interaction. See {@link OMIDInteractionType} fro list of supported types.
*
* @param interactionType The latest user integration.
* @see OMIDInteractionType
*/
- (void)adUserInteractionWithType:(OMIDInteractionType)interactionType
NS_SWIFT_NAME(adUserInteraction(withType:));
@end
Properties
-
Properties
Declaration
Objective-C
- (nullable instancetype)initWithAdSession:(nonnull OMIDAdSession *)session error:(NSError *_Nullable *_Nullable)error;
Swift
init(adSession session: OMIDAdSession) throws
-
Properties
Declaration
Objective-C
- (void)loadedWithVastProperties:(nonnull OMIDVASTProperties *)vastProperties;
Swift
func loaded(with vastProperties: OMIDVASTProperties)
-
Properties
Declaration
Objective-C
- (void)startWithDuration:(CGFloat)duration videoPlayerVolume:(CGFloat)videoPlayerVolume;
Swift
func start(withDuration duration: CGFloat, videoPlayerVolume: CGFloat)
-
Properties
Declaration
Objective-C
- (void)firstQuartile;
Swift
func firstQuartile()
-
Properties
Declaration
Objective-C
- (void)midpoint;
Swift
func midpoint()
-
Properties
Declaration
Objective-C
- (void)thirdQuartile;
Swift
func thirdQuartile()
-
Properties
Declaration
Objective-C
- (void)complete;
Swift
func complete()
-
Properties
Declaration
Objective-C
- (void)pause;
Swift
func pause()
-
Properties
Declaration
Objective-C
- (void)resume;
Swift
func resume()
-
Properties
Declaration
Objective-C
- (void)skipped;
Swift
func skipped()
-
Properties
Declaration
Objective-C
- (void)bufferStart;
Swift
func bufferStart()
-
Properties
Declaration
Objective-C
- (void)bufferFinish;
Swift
func bufferFinish()
-
Properties
Declaration
Objective-C
- (void)volumeChangeTo:(CGFloat)playerVolume;
Swift
func volumeChange(to playerVolume: CGFloat)
-
Properties
Declaration
Objective-C
- (void)playerStateChangeTo:(OMIDPlayerState)playerState;
Swift
func playerStateChange(to playerState: OMIDPlayerState)
-
Properties
Declaration
Objective-C
- (void)adUserInteractionWithType:(OMIDInteractionType)interactionType NS_SWIFT_NAME(adUserInteraction(withType:));
Swift
func adUserInteraction(withType interactionType: OMIDInteractionType)