Video Session API Diagram for iOS Modules

## Integration Summary * ## Integration APIs **Initialize Objects** CISAnalyticsCreator.

Updated 2026-06-30 ios, api, table, modules, sensor developer center, sensor integration, integration

Integration Summary

Integration API diagram

Integration APIs

**Initialize Objects**

CISAnalyticsCreator.create(withCustomerKey: PRODUCTION_CUSTOMER_KEY)!

Initialize the top-level object.

analytics.createVideoAnalytics(getApplicationContext())

This object needs to be instantiated once for each video playback, and is used to report the video-related events in an application. Typically, it is instantiated after the init() call, and ideally just before the user hits play.

videoAnalytics.setPlayerInfo(playerInfo)

Call this API to set the Predefined metadata.

videoAnalytics.setContentInfo(contentInfo)

Call this API to update or amend metadata.

**Reports Events and Metadata**

videoAnalytics.reportPlaybackRequested(contentInfo: [AnyHashable : Any)?)

Call this API when:

  • User clicks the video play button

  • Video starts in auto-play mode

  • User replays video

  • A new video starts in play list

It's critical to make this API call correctly to monitor the video experience. For example, if the call is delayed (say, when the video starts rather than the user clicking play*), the Video Startup Time will be under-reported and the Video Start Failures will be missed.

videoAnalytics.setPlayer(AVPlayer)

Set player reference, such as AVPlayer or Brightcove, to Conviva videoAnalytics object.

videoAnalytics.reportAdBreakStarted(adPlayer: AdPlayer, adType: AdTechnology, adBreakInfo: [AnyHashable : Any]):

Required, if your application has Ads.

Inform videoAnalytics object that an ad break has been started.

videoAnalytics.reportAdBreakEnded()

Only applicable for custom ad integration, don't call for modules. For more details, refer to the Ad session diagrams.

videoAnalytics.reportPlaybackEnded()

Call this when the video play back ends.

**Report Playback Metrics**

[videoAnalytics.reportPlaybackMetric:key value:value]

For modules such as AVPlayer and Brightcove, most of the metrics such as player states, seek, buffering, are automatically collected.

However, there are these metrics that you need to report for modules:

videoAnalytics.reportPlaybackMetric(CIS_SSDK_PLAYBACK_METRIC DROPPED_FRAMES_TOTAL, value: NSNumber(value: 250))

Report frequently the cumulative dropped frames total

videoAnalytics.reportPlaybackMetric(CIS_SSDK_PLAYBACK_METRIC_SEEK_STARTED, value: NSNumber(value: 3000))

Report when user seeks the video

videoAnalytics.reportPlaybackMetric(CIS_SSDK_PLAYBACK_METRIC_SEEK_ENDED, value: NSNumber(value: 3300))

Report when seek ends

**Report User Actions**

videoAnalytics.reportPlaybackEvent(CISConstants.getEventsStringValue(Events.USER_WAIT_STARTED), withAttributes: nil) Optional when the video playback request halts due to user dialogues like pin popup, accepting strong language or violence, or confirming age.

videoAnalytics.reportPlaybackEvent(CISConstants.getEventsStringValue(Events.USER_WAIT_ENDED), withAttributes: nil) Optional when the user wait time ends.

analytics.reportAppBackgrounded() Advanced and Optional Report to handle backgrounding events such as, pressing home or power off buttons, or attending a phone call.

analytics.reportAppForegrounded() Advanced and Optional Report to handle foregrounding events.

**Report Errors**

iOS modules auto-collect the reportPlaybackErrors

videoAnalytics.reportPlaybackError(errorMessage, errorSeverity: ErrorSeverity.ERROR_FATAL)

when the playback encounters a fatal error from which it does not recover and reported only once.

**Report Custom Playback Events**
videoAnalytics.reportPlaybackEvent(eventName: String, withAttributes: [AnyHashable : Any])

For more details about the custom playback events, reach out to your Conviva representative.

**Cleanup Session**

videoAnalytics.cleanup()

analytics.cleanup()

Call these APIs to release the object on player's sudden exit, application's graceful exit, or when the Conviva object needs to be destroyed.