Protocols
The following protocols are available globally.
-
Undocumented
See moreDeclaration
Objective-C
@protocol CISAdAnalyticsProtocol <CISStreamAnalyticsProtocol> /** * Sets ad info. * @param adInfo ad related info. */ - (void) setAdInfo:(NSDictionary*)adInfo; /** * Sets Ad PlayerInfo. * @param adPlayerInfo ad player info. */ - (void) setAdPlayerInfo:(NSDictionary*)adPlayerInfo; /** * Reports ad failure. * @param errorMessage error message. * @param adInfo ad related info. */ - (void) reportAdFailed:(NSString*)errorMessage adInfo:(nullable NSDictionary*)adInfo; /** * Reports ad load event. * @param adInfo ad related info. */ - (void) reportAdLoaded:(nullable NSDictionary*)adInfo; /** * Reports ad start event. * @param adInfo ad related info. */ - (void) reportAdStarted:(nullable NSDictionary*)adInfo; /** * Reports ad end event. */ - (void) reportAdEnded; /** * Reports ad error event. * @param errorMessage Error message. * @param severity Severity of the error. */ - (void) reportAdError:(NSString*)errorMessage severity:(ErrorSeverity)severity; /** * Reports ad skip event. */ - (void) reportAdSkipped; /** * Reports ad player event. * @param eventType Event type. * @param details Event details. */ - (void) reportAdPlayerEvent:(NSString*)eventType details:(nullable NSDictionary*)details; /** * Reports ad metirc. * @param key Metric key. * @param value Metric value. */ - (void) reportAdMetric:(NSString*)key value:(id)value; /** * Used to set content session id.If already customer integrated EI using legacy api and wanted to integrate AI or other products using this sdk shall use this. * @param sessionID Video playback session id. */ - (void) setContentSessionID:(int)sessionID; /** * This is used set the Ad framework object using which conviva can auto collect the data * For Ex: AdsLoader for Google IMA/DAI SDK. * @param adProxy object using which we can register for ad related events. * @param info Any miscellaneous data that can be shared. Ex: application tell us if pre-loading is enabled. */ - (void) setAdListener:(nullable id)adProxy andInfo:(NSDictionary*)info; @endSwift
protocol CISAdAnalyticsProtocol : CISStreamAnalyticsProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol CISAnalyticsProtocol <NSObject> /** * Returns client id. * @return clientid. */ - (NSString*) getClientId; /** * Creates video analytics objects. * @return CISVideoAnalytics instance. */ - (CISVideoAnalytics) createVideoAnalytics; /** * Applicable only incase of Conviva Module case. Creates video analytics objects. * @param options Refer USER OPTIONS section defined in CSSConstants.h * @return CISVideoAnalytics instance. */ - (CISVideoAnalytics) createVideoAnalytics:(NSDictionary*)options; /** * Creates ad analytics objects. * @return CISAdAnalytics instance. */ - (CISAdAnalytics) createAdAnalytics; /** * Creates ad analytics object by linking already created video analytics object. * @param videoAnalytics Video analytcis object. * @return CISAdAnalytics instance. */ - (CISAdAnalytics) createAdAnalyticsWithVideoAnalytics:(CISVideoAnalytics) videoAnalytics; /** * Reports app level event. * @param event Event name. * @param details Event details. */ - (void) reportAppEvent:(NSString*)event details:(NSDictionary*)details; /** * Reports app background event useful to initiate cleanup. */ - (void) reportAppBackgrounded; /** * Reports app forground event useful to resume the analytics session. */ - (void) reportAppForegrounded; /** * @brief Set user preferences for data collection. * @param userPrefs pass key value pair as user preferences. * Currently Supported keys: "idfa", "idfv". * Expected Values: * YES - Will collect id for mentioned key. * NO - Will stop collecting id for mentioned key. * Sample Usage: * [clientSettings setUserPreferenceForDataCollection:[NSDictionary dictionaryWithObjectsAndKeys: @YES, @"idfa", @NO, @"idfv", nil]]; */ - (void) setUserPrefsForDataCollection:(NSDictionary *)userPrefs; /** * @brief Set user preferences for data collection. * @param userPrefs pass key value pair as user preferences. * Currently Supported keys: "idfa", "idfv". * Expected Values: * YES - Will stop collecting id for mentioned key and delete previously collected data. * NO - Will not have any effect. * Sample Usage: * [clientSettings setUserPreferenceForDataDeletion:[NSDictionary dictionaryWithObjectsAndKeys: @NO, @"idfa", @YES, @"idfv", nil]]; */ - (void) setUserPrefsForDataDeletion:(NSDictionary *)userPrefs; /** * Performs required cleanup. */ - (void) cleanup; /** * Returns global session id. * @return global session id. */ - (int) getGlobalSessionId; /** * Returns ipv4 session id. * @return ipv4 session id. */ - (int) getipv4SessionId; /** * Returns ipv6 session id. * @return ipv6 session id. */ - (int) getipv6SessionId; @endSwift
protocol CISAnalyticsProtocol : NSObjectProtocol -
A protocol that can be used to cancel the actions.
See moreDeclaration
Objective-C
@protocol CISCancelProtocol <NSObject>Swift
protocol CISCancelProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol CISLoggerProtocol <NSObject> @required /** * Associates a module name with this Logger. * @param moduleName The module name to use for this logger. */ -(void)setModuleName:(NSString *)moduleName; /** * Associates a session ID with this Logger. * @param sessionId The session ID to use for this logger. */ -(void)setSessionId:(int)sessionId; /** * Logs a message to the console at func level. * @param message The message to log at func level. */ -(void)func:(NSString *)message; /** * Logs a message to the console at DEBUG level. * @param message The message to log at DEBUG level. */ -(void)debug:(NSString *)message; /** * Logs a message to the console at INFO level. * @param message The message to log at INFO level. */ -(void)info:(NSString *)message; /** * Logs a message to the console at WARNING level. * @param message The message to log at WARNING level. */ -(void)warning:(NSString *)message; /** * Logs a message to the console at ERROR level. * @param message The message to log at ERROR level. */ -(void)error:(NSString *)message; @optional /* * Used only for for debugging when we want to log to console * but not log to buffer * @praram NSString logger message * @param LogLevel Log level */ -(void)consoleLog:(NSString *)message logLevel:(LogLevel)LogLevel; @endSwift
protocol CISLoggerProtocol : NSObjectProtocol -
Class conforming to this will be responsible for implementing required methods for logging, this is used by the Conviva library to log.
See moreDeclaration
Objective-C
@protocol CISLoggingProtocol <NSObject>Swift
protocol CISLoggingProtocol : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol CISPlayerEventsListenerProtocol <NSObject> /// @brief Signal a change in the bitrate, resource or CDN /// /// \param bitrateKbps New bitrate /// \param cdn New CDN /// \param resource New resource /// \note Use -1 or null to keep previous value - (void)setStream:(int)bitrateKbps cdn:(nullable NSString *)cdn resource:(nullable NSString *)resource; /// @brief Signal change in average bitrate /// /// \param avgbitrateKbps New bitrate - (void)setAverageBitrate:(int)avgbitrateKbps; /// @brief Signal change in playing state /// /// \param newState the new playing state (one of the constants in PlayerStates) - (void)setPlayingState:(int)newState; /// @brief Signal an error /// /// \param err Error Message //- (void)onError:(ConvivaStreamerError *)err; - (void)onError:(NSString *)errMsg fatal:(BOOL)fatal; /// @brief Signal an error /// /// \param videoWidth Video Width /// \param videoHeight Video Height - (void)setVideoDimensionChages:(NSInteger)videoWidth videoHeight:(NSInteger)videoHeight; /// @brief Signal an player seeking -(BOOL)isPlayerSeeking; //-(void)setSeekEvent:(SeekActionType)type seekPosition:(NSInteger)seekToPosition; -(void)setSeekStart:(NSInteger)seekToPosition; -(void)setSeekStop:(NSInteger)seekToPosition; /// @brief sets the module version /// /// \param moduleVersion module version -(void)setModuleVersion:(NSString*)moduleVersion; /// @brief sets the module name /// /// \param moduleName module version -(void)setModuleName:(NSString*)moduleName; /// @brief sets the framework name /// /// \param fwName module version -(void)setFrameworkName:(NSString*)fwName; /// @brief sets the framework version /// /// \param fwVersion module version -(void)setFrameworkVersion:(NSString*)fwVersion; /// @brief sets the streamUrl /// /// \param streamUrl Stream url -(void)setStreamUrl:(NSString*)streamUrl; /// @brief sets the content length /// /// \param contentLength length -(void)setContentLength:(NSInteger)contentLength; /// @brief sets the cdn ip /// /// \param cdnIp cdn ip address -(void)setCdnIp:(NSString*)cdnIp; /// @brief Sets play head time /// /// \param pht Play head time - (void)setPHT:(int64_t)pht; /// @brief Sets buffer length /// /// \param bl Buffer length - (void)setBufferLength:(int64_t)bl; /// @brief Sets average frame rate /// /// \param fps Average frame rate. - (void)setAverageFrameRate:(int)fps; /// @brief Sets encoded frame rate /// /// \param fps Encoded frame rate. - (void)setEncodedFrameRate:(int)fps; /// @brief Tells whether simplified sdk/legacy sdk api's used. /// - (BOOL) isSimplifiedSDKApiUsed; /// @brief For setting dropped frames count /// /// \param droppedFramesCount Total count of dropped frames - (void)setDroppedFramesCount:(NSInteger)droppedFramesCount; /// @brief For reporting custom events /// /// \param eventName Event name /// \param attributes Event attributes - (void) reportPlaybackEvent:(NSString*)eventName andAttributes:(nullable NSDictionary*)attributes; /** * Tells whether its AirPlaying or not. * @return TRUE or FALSE. */ - (BOOL) isAirPlaying; /// @brief sets the audio language /// /// \param audioLanguage audio language -(void)setAudioLanguage:(NSString*)audioLanguage; /// @brief sets the cc/subtitle language /// /// \param language cc/subtitle language /// \param closedCaption cc (or) subtitles YES or NO -(void)setSubtitleLanguage:(NSString*)language isClosedCaption:(BOOL)closedCaption; @endSwift
protocol CISPlayerEventsListenerProtocol : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol CISStreamAnalyticsProtocol <NSObject> /** * Reports player state. Please refer PlayerState for possible values. * @param playerState Player state. */ - (void) reportPlayerState:(PlayerState)playerState; /** * Returns session id. * @return session id. */ - (int) getSessionId; /** * Returns session id. * @return session id. */ - (int) getSessionKey; /** * Returns Metadata. * @return Metadata. */ - (NSDictionary*) getMetadataInfo; /** * Reports playback metric. * @param key Metric key.Please refer "PLAYBACK METRIC KEYS" section defined in CSSConstants.h for all possible keys. * @param value Metric value. */ - (void) reportPlaybackMetric:(NSString*)key value:(nullable id)value; /** * Update Handler callback function. */ typedef void (^UpdateHandler)(void); /** * Sets update handler callback function. * @param updateHandler UpdateHandler callback function. */ - (void) setUpdateHandler:(UpdateHandler)updateHandler; /** * Tells whether this is ad analytics interface or not. * @return TRUE or FALSE. */ - (BOOL) isAdAnalytics; /** * Tells whether this is video analytics interface or not. * @return TRUE or FALSE. */ - (BOOL) isVideoAnalytics; /** * Tells whether its AirPlaying or not. * @return TRUE or FALSE. */ - (BOOL) isAirPlaying; /** * Performs required cleanup. */ - (void) cleanup; @endSwift
protocol CISStreamAnalyticsProtocol : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol CISStreamerProxyFactoryProtocol <NSObject> @optional - (CISStreamerProxy)createStreamerProxy:(id)streamer playerEventsListener:(CISPlayerEventsListener)playerEventsListener logger:(id<CISLoggerProtocol>)logger shouldAllowVideoRetry:(BOOL)shouldAllowVideoRetry; - (CISStreamerProxy)createStreamerProxy:(CISPlayerEventsListener)playerEventsListener logger:(id<CISLoggerProtocol>)logger; - (CISStreamerProxy)createAdStreamerProxyWithInfo:(NSDictionary*)info adAnalytics:(CISAdAnalytics)adAnalytics videoAnalytics:(CISVideoAnalytics)videoAnalytics logger:(id<CISLoggerProtocol>)logger; @endSwift
protocol CISStreamerProxyFactoryProtocol : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol CISStreamerProxyProtocol <NSObject> - (void) cleanup; @endSwift
protocol CISStreamerProxyProtocol : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol CISVideoAnalyticsProtocol <CISStreamAnalyticsProtocol> /** * Set content metadata for an existing monitoring session. * @param contentInfo Content meta data. Please refer "METADATA CONSTANTS" section defined in CSSConstants.h for possible keys. */ - (void) setContentInfo:(NSDictionary*)contentInfo; /** * Set player metadata for an existing monitoring session. * @param playerInfo Content meta data.Please refer "PLAYER INFO CONSTANTS" section defined in CSSConstants.h for possible keys. */ - (void) setPlayerInfo:(NSDictionary*)playerInfo; /** * Reports playback start. * @param contentInfo Content meta data.Please refer "METADATA CONSTANTS" section defined in CSSConstants.h for possible keys. */ - (void) reportPlaybackRequested:(nullable NSDictionary*)contentInfo; /** * Reports playback end. */ - (void) reportPlaybackEnded; /** * Reports playback faiulure. * @param errorMessage Error message. * @param contentInfo Content meta data.Please refer "METADATA CONSTANTS" section defined in CSSConstants.h for possible keys. */ - (void) reportPlaybackFailed:(NSString*)errorMessage contentInfo:(nullable NSDictionary*)contentInfo; /** * Reports an error for this monitoring session. * @param errorMessage The error message to be reported. * @param severity The severity of the error. */ - (void) reportPlaybackError:(NSString*)errorMessage errorSeverity:(ErrorSeverity)severity; /** * Send a playback event to Conviva. * @param eventName Name of the custom event. * @param attributes A dictionary of key-value pairs associated with the event. */ - (void) reportPlaybackEvent:(NSString*)eventName withAttributes:(nullable NSDictionary*)attributes; /** * Notify Conviva that an ad is about to start for the monitoring session. * @param adPlayer Whether the ad is played by the same player as the original video content. * @param adType Whether the ad is embedded in the content stream. * @param adBreakInfo Ad Break info.Please refer "AD BREAK CONSTANTS" section defined in CSSConstants.h for possible keys. */ - (void) reportAdBreakStarted:(AdPlayer)adPlayer adType:(AdTechnology)adType adBreakInfo:(NSDictionary*)adBreakInfo; /** * Notify Conviva that an ad has ended for the monitoring session. */ - (void) reportAdBreakEnded; /** * If customer uses modules developed conviva for AVPlayer,AVQueuePlayer and Brightcove, shall use this method to pass player instance to enable auto * detecction of required metrics. * @param player Player object(Support AVPlayer,AVQueuePlayer and Brightcove). */ - (void) setPlayer:(nullable id)player; /** * Reports playback metric. * @param key Metric key.Please refer "PLAYBACK METRIC KEYS" section defined in CSSConstants.h for all possible keys. * @param value Metric value. */ - (void) reportPlaybackMetric:(NSString*)key value:(nullable id)value; /** * Set ad analytics object on video analytics to enable seamlessly passing common data from video analytics to ad analytcis. * @param adAnalytics Ad analytics. */ - (void) setAdAnalytics:(CISAdAnalytics)adAnalytics; @endSwift
protocol CISVideoAnalyticsProtocol : CISStreamAnalyticsProtocol
Protocols Reference