Implementing Video Content Delegate Methods
Note
All video delegate methods are optional.
Video Completion Event
IAVideoCompleted:
This is invoked on video completion.
Invoked on Completion
- (void)IAVideoCompleted:(IAVideoContentController * _Nullable)contentController {
NSLog(@"video completed");
}
Interruption Event
videoInterruptedWithError:
If a video started to play (which means the ad was already received), but the buffer became empty for some reason, and it didn't refill.
An Interrupted Event
- (void)IAVideoContentController:(IAVideoContentController * _Nullable)contentController videoInterruptedWithError:(NSError * _Nonnull)error {
NSLog(@"video interrupted");
}
Video Duration Received
videoDurationUpdated:
Video Duration
(void)IAVideoContentController:(IAVideoContentController * _Nullable)contentController videoDurationUpdated:(NSTimeInterval)videoDuration {
NSLog(@"video duration updated");
}
Progress Tracking
videoProgressUpdatedWithCurrentTime:totalTime:
The delegate method is invoked each time the video has played after a certain amount of milliseconds of the video.
(void)IAVideoContentController:(IAVideoContentController *_Nullable)contentController videoProgressUpdatedWithCurrentTime:(NSTimeInterval)currentTime totalTime:(NSTimeInterval)totalTime {
NSLog(@"video progress updated");
}