LivePass
@interface LivePass : NSObject
@mainpage @author Saiguang Che
The top level class for customer interaction is LivePass. Additional api is available in ConvivaLightSession.
-
@brief Initialize the LivePass module
See Conviva integration guide for details of how to use this method. \param customerKey a key assigned by Conviva to uniquely identify a Conviva customer
Declaration
Objective-C
+ (void)initWithCustomerKey:(NSString *)customerKey;
Swift
class func initWithCustomerKey(_ customerKey: String!)
-
@brief Initialize LivePass with advanced settings parameters
\param customerKey a key assigned by Conviva to uniquely identify a Conviva customer \param settings a dictionary with string keys and object values
Declaration
Objective-C
+ (void)initWithCustomerKey:(NSString *)customerKey andSettings:(NSDictionary *)settings;
Swift
class func initWithCustomerKey(_ customerKey: String!, andSettings settings: [AnyHashable : Any]!)
-
@brief Cleanup all the sessions owned by LivePass
Declaration
Objective-C
+ (void)cleanup;
Swift
class func cleanup()
-
@brief Create a session for LivePass
\param streamer can be a subclass of ConvivaStreamerProxy, AVPlayer, MPMoviePlayerController, or a null object \param contentInfo Info related to the content (url, etc)
Declaration
Objective-C
+ (ConvivaLightSession *)createSessionWithStreamer:(id)streamer andConvivaContentInfo: (ConvivaContentInfo *)contentInfo;
Swift
class func createSession(withStreamer streamer: Any!, andConvivaContentInfo contentInfo: ConvivaContentInfo!) -> ConvivaLightSession!
-
@brief Create a session for LivePass
\param streamer can be a subclass of ConvivaStreamerProxy, AVPlayer, MPMoviePlayerController or a null object \param contentInfo Info related to the content (url, etc) \param options Options that modify session behavior
Declaration
Objective-C
+ (ConvivaLightSession *)createSessionWithStreamer:(id)streamer andConvivaContentInfo: (ConvivaContentInfo *)contentInfo andOptions:(NSDictionary *)options;
Swift
class func createSession(withStreamer streamer: Any!, andConvivaContentInfo contentInfo: ConvivaContentInfo!, andOptions options: [AnyHashable : Any]! = [:]) -> ConvivaLightSession!
-
@brief Create an ad session for LivePass
\param adStreamer can be a subclass of AVPlayer or of type id \param contentSession main video content’s session \param adContentInfo Info related to the content (url, etc) \param options Options that modify session behavior
Declaration
Objective-C
+ (ConvivaLightSession *)createAdSession:(id)adStreamer contentSession:(ConvivaLightSession *)contentSession convivaContentInfo:(ConvivaContentInfo *)adContentInfo options:(NSDictionary *)options;
Swift
class func createAdSession(_ adStreamer: Any!, contentSession: ConvivaLightSession!, convivaContentInfo adContentInfo: ConvivaContentInfo!, options: [AnyHashable : Any]! = [:]) -> ConvivaLightSession!
-
@brief Cleanup session. Should be called when a video session is over.
\param session The session to be cleaned
Declaration
Objective-C
+ (void)cleanupSession:(ConvivaLightSession *)session;
Swift
class func cleanupSession(_ session: ConvivaLightSession!)
-
@brief Toggle on/off console traces.
\param on pass true to enable console trace, false otherwise
Declaration
Objective-C
+ (void)toggleTraces:(BOOL)on;
Swift
class func toggleTraces(_ on: Bool)
-
@brief This function is used to send Conviva Player Insights Event, not associated with a video session. Events have a name and a list of key value pairs as event attributes
\param name A name for the event \param attributes A dictionary of key value pair associated with the event
Declaration
Objective-C
+ (void)sendEvent:(NSString *)name withAttributes:(NSDictionary *)attributes;
Swift
class func sendEvent(_ name: String!, withAttributes attributes: [AnyHashable : Any]! = [:])
-
Notify that ad has started
Declaration
Objective-C
+ (void)adStart:(ConvivaLightSession *)session;
Swift
class func adStart(_ session: ConvivaLightSession!)
-
Notify that ad has ended
Declaration
Objective-C
+ (void)adEnd:(ConvivaLightSession *)session;
Swift
class func adEnd(_ session: ConvivaLightSession!)
-
@brief The delegate object to use when handling network requests.
Declaration
Objective-C
+ (id<ConvivaRequestDelegate>)requestDelegate;
Swift
class func requestDelegate() -> ConvivaRequestDelegate!
-
@brief Sets the delegate object to use when handling network requests. Conviva does not store a strong reference to the delegate object.
Declaration
Objective-C
+ (void)setRequestDelegate:(id<ConvivaRequestDelegate>)delegate;
Swift
class func setRequestDelegate(_ delegate: ConvivaRequestDelegate!)
-
Deprecated
@brief True if library has been initialized
\deprecated Not used and to be phased out
Declaration
Objective-C
+ (BOOL)ready;
Swift
class func ready() -> Bool
-
Expected Values: YES - Will collect id for mentioned key. NO - Will stop collecting id for mentioned key. If not been set, by default its considered as YES.
Sample usage: [LivePass setUserPreferenceForDataCollection: [NSDictionary dictionaryWithObjectsAndKeys: @YES, @“idfa”, @NO, @“idfv”, nil]];
Declaration
Objective-C
+ (void)setUserPreferenceForDataCollection:(NSDictionary *)userPrefs;
Swift
class func setUserPreferenceForDataCollection(_ userPrefs: [AnyHashable : Any]!)
-
Sample usage: [LivePass setUserPreferenceForDataDeletion: [NSDictionary dictionaryWithObjectsAndKeys: @NO, @“idfa”, @YES, @“idfv”, nil]];
Declaration
Objective-C
+ (void)setUserPreferenceForDataDeletion:(NSDictionary *)userPrefs;
Swift
class func setUserPreferenceForDataDeletion(_ userPrefs: [AnyHashable : Any]!)
-
@brief Useful for cross integration when customers want to use simplified sdk api’s for ad integration.
Declaration
Objective-C
+ (id<CISClientProtocol>)getClient;
Swift
class func getClient() -> CISClientProtocol!