XAStreamingMonitor Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | XAStreamingMonitor.h |
Overview
The streaming monitor provides functionality that makes audio that is injected into live streams interactive.
Other Methods
+ initMonitorWithAPIKey:withApplicationKey:withAdsDelegate:
Start the facade/plugin
+ (void)initMonitorWithAPIKey:(NSString *)theAPIKey withApplicationKey:(NSString *)theApplicationKey withAdsDelegate:(NSObject<XAStreamingDelegate> *)theDelegateParameters
theAPIKey |
Developer specific API key |
|---|---|
theApplicationKey |
Application key associated with application the plugin will be embedded in |
theDelegate |
XAPPDelegate @see XAPPDelegate for receiving call backs from the plugin |
Return Value
singelton instance
Availability
3.12.0
Discussion
Start the facade/plugin
Declared In
XAStreamingMonitor.h
Callback Management
+ onXappMark:loadXapp:startedPlayback:xappComplete:
When host player detects “Xapp” string in metadata it needs to parse that meta data and call onXappMark block with correct paramaters to play a xapp. If host player designed to receive one metadata per audio, please use this method to play a xapp.
+ (void)onXappMark:(XAStreamingAd *)xapp loadXapp:(XappLoaded)loadBlock startedPlayback:(XappStartedPlayback)startBlock xappComplete:(XappCompleted)completeBlockParameters
xapp |
a XAStreamingAd object with Xapp name and start time of the Xapp. |
|---|---|
loadBlock |
loadBlock that will return when ad is loaded |
startBlock |
startBlock that will return when ad starts to play |
completeBlock |
completeBlock that will return when ad is completed |
Availability
3.12.0
Discussion
When host player detects “Xapp” string in metadata it needs to parse that meta data and call onXappMark block with correct paramaters to play a xapp. If host player designed to receive one metadata per audio, please use this method to play a xapp.
Declared In
XAStreamingMonitor.h
+ loadXapp:xappLoadCallBack:
- Host player has the ability to call loadXapp method first and then to call the playXapp method
- at will. This way host player has the option of when to play the loaded xapp. If host player
- designed to receive multiple metadata per audio, please use this method to play a xapp.
+ (void)loadXapp:(XAStreamingAd *)xapp xappLoadCallBack:(XappLoaded)loadBlockDiscussion
- Host player has the ability to call loadXapp method first and then to call the playXapp method
- at will. This way host player has the option of when to play the loaded xapp. If host player
designed to receive multiple metadata per audio, please use this method to play a xapp.
For example a start speaking cue is at the 23rd second of a xapp ad, host player gets some
- metadata to load the xapp at 15th second of the audio file, then host player can call loadXapp
- method then when host player receives “play” metadata or when host player reaches 23rd second of
- the audio, host player can call playXapp method which will play loaded xapp at 15h second. *
- @since 3.12.0
- @param xapp
XAStreamingAdobject with Xapp name and start time of the Xapp. - @param loadBlock
XappLoadedblock that will return when ad is loaded
Declared In
XAStreamingMonitor.h
+ playXapp:xappComplete:
Please read @see loadXapp:(XAStreamingAd *)xapp xappLoadCallBack:(XappLoaded)loadBlock
+ (void)playXapp:(XappStartedPlayback)startBlock xappComplete:(XappCompleted)completeBlockParameters
startBlock |
startBlock that will return when ad starts to play |
|---|---|
completeBlock |
completeBlock that will return when ad is completed |
Availability
3.12.0
Discussion
Please read @see loadXapp:(XAStreamingAd *)xapp xappLoadCallBack:(XappLoaded)loadBlock
Declared In
XAStreamingMonitor.h
Audio Playback Management
+ playerStopped
Unregister timers. If called before listening cue, voice recognition doesn’t start.
+ (void)playerStoppedAvailability
3.12.0
Discussion
Unregister timers. If called before listening cue, voice recognition doesn’t start.
Declared In
XAStreamingMonitor.h
+ playerPaused
If ad requested , pauses timers. If host player is paused for any reason, this function needs to be called so Xapp will fire on time.
+ (void)playerPausedAvailability
3.12.0
Discussion
If ad requested , pauses timers. If host player is paused for any reason, this function needs to be called so Xapp will fire on time.
Declared In
XAStreamingMonitor.h
+ playerResumed
If timers are paused, resumes timers. If host player decided resuming after pausing, this function needs to be called so Xapp will fire on time.
+ (void)playerResumedAvailability
3.12.0
Discussion
If timers are paused, resumes timers. If host player decided resuming after pausing, this function needs to be called so Xapp will fire on time.
Declared In
XAStreamingMonitor.h
Playback Controls
+ adPresented
Returns if the plugin has an ad presented. The ad could not be presented but still playing audio (adPlaying) or have the audio paused (adRunning).
+ (BOOL)adPresentedReturn Value
TRUE if an ad is presented
Availability
3.12.0
Discussion
Returns if the plugin has an ad presented. The ad could not be presented but still playing audio (adPlaying) or have the audio paused (adRunning).
See Also
Declared In
XAStreamingMonitor.h
+ adPlaying
Returns if the plugin is currently playing the advertisement
+ (BOOL)adPlayingReturn Value
TRUE if an ad is playing
Availability
3.12.0
Discussion
Returns if the plugin is currently playing the advertisement
See Also
Declared In
XAStreamingMonitor.h
+ adRunning
Returns if the SDK is in the process of playing an advertisement. The ad could be not presented, and not playing audio but still in a playback mode.
+ (BOOL)adRunningReturn Value
TRUE if the SDK is currently in ad playback mode
Availability
3.12.0
Discussion
Returns if the SDK is in the process of playing an advertisement. The ad could be not presented, and not playing audio but still in a playback mode.
See Also
Declared In
XAStreamingMonitor.h