CISStreamAnalyticsProtocol
@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;
/**
* 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;
/**
* Performs required cleanup.
*/
- (void) cleanup;
@end
Undocumented
-
Reports player state. Please refer PlayerState for possible values.
Declaration
Objective-C
- (void)reportPlayerState:(PlayerState)playerState;
Swift
func report(_ playerState: PlayerState)
Parameters
playerState
Player state.
-
Returns session id.
Declaration
Objective-C
- (int)getSessionId;
Swift
func getSessionId() -> Int32
Return Value
session id.
-
Reports playback metric.
Declaration
Objective-C
- (void)reportPlaybackMetric:(nonnull NSString *)key value:(nullable id)value;
Swift
func reportPlaybackMetric(_ key: String, value: Any?)
Parameters
key
Metric key.Please refer “PLAYBACK METRIC KEYS” section defined in CSSConstants.h for all possible keys.
value
Metric value.
-
Sets update handler callback function.
Declaration
Objective-C
- (void)setUpdateHandler:(nonnull UpdateHandler)updateHandler;
Swift
func setUpdateHandler(_ updateHandler: @escaping UpdateHandler)
Parameters
updateHandler
UpdateHandler callback function.
-
Tells whether this is ad analytics interface or not.
Declaration
Objective-C
- (BOOL)isAdAnalytics;
Swift
func isAdAnalytics() -> Bool
Return Value
TRUE or FALSE.
-
Tells whether this is video analytics interface or not.
Declaration
Objective-C
- (BOOL)isVideoAnalytics;
Swift
func isVideoAnalytics() -> Bool
Return Value
TRUE or FALSE.
-
Performs required cleanup.
Declaration
Objective-C
- (void)cleanup;
Swift
func cleanup()