ServerSideAdIntegrationController
public protocol ServerSideAdIntegrationControllerA controller to be used by your ServerSideAdIntegrationHandler to update the state of your custom server-side ad integration.
- 
                  
                  The identifier for this integration, as it was passed to Ads.registerServerSideIntegration.DeclarationSwift var integration: String { get }
- 
                  
                  The scheduled ads managed by this integration. Remark UseServerSideAdIntegrationController.createAdandServerSideAdIntegrationController.removeAdto add or remove ads.DeclarationSwift var ads: [Ad] { get }
- 
                  
                  The scheduled ad breaks managed by this integration. Remark UseServerSideAdIntegrationController.createAdBreakandServerSideAdIntegrationController.removeAdBreakto add or remove ad breaks.DeclarationSwift var adBreaks: [AdBreak] { get }
- 
                  
                  Create a new ad. Remark The ad will be added to Ads.scheduledAds.ParametersparamsThe initial properties to be set on the created ad. adBreakReturn ValueThe created Adobject.
- 
                  
                  Update the playback progression of the given ad. Remark The player will fire progression events such as AdsEventTypes.AD_FIRST_QUARTILE,AdsEventTypes.AD_MIDPOINTandAdsEventTypes.AD_THIRD_QUARTILE.DeclarationSwift func updateAdProgress(ad: Ad, progress: Double)ParametersadThe ad to be updated. progressThe playback progress, as a number between 0 (at the start of the ad) and 1 (at the end of the ad). 
- 
                  
                  Begin the given ad. Remark The ad will be added to Ads.currentAds. AnAdsEventTypes.AD_BEGINevent will be fired.DeclarationSwift func beginAd(ad: Ad)ParametersadThe Adthat will begin.
- 
                  
                  End the given ad. Remark The ad will be removed from Ads.currentAds. If the ad was currently playing, anAdsEventTypes.AD_ENDevent will be fired.DeclarationSwift func endAd(ad: Ad)ParametersadThe Adthat will end.
- 
                  
                  Skip the given ad. Remark The ad will be removed from Ads.currentAds. If the ad was currently playing, anAdsEventTypes.AD_SKIPevent will be fired.DeclarationSwift func skipAd(ad: Ad)ParametersadThe Adthat will be skipped.
- 
                  
                  Remove the given ad. Remark The ad will be removed from Ads.currentAdsandAds.scheduledAds. If the ad was currently playing, it will first be ended.DeclarationSwift func removeAd(ad: Ad)ParametersadThe Adthat will be removed.
- 
                  
                  Create a new ad break. This can be used to indicate where ad breaks can be expected in advance, before populating those ad breaks with ads. Remark The ad break will be added to ServerSideAdIntegrationController.adBreaksandAds.scheduledAdBreaks.DeclarationSwift func createAdBreak(params: AdBreakInit) -> AdBreakParametersparamsThe initial properties to be set on the created ad break. Return ValueThe created AdBreakobject.
- 
                  
                  Update the given ad break. DeclarationSwift func updateAdBreak(adBreak: AdBreak, params: AdBreakInit)ParametersadBreakThe ad break to be updated. paramsThe properties to be updated on the ad break. 
- 
                  
                  Remove the given ad break and all of its ads. Remark The ad break will be removed from ServerSideAdIntegrationController.adBreaksandAds.scheduledAdBreaks. Any remaining ads in the ad break will be removed.DeclarationSwift func removeAdBreak(adBreak: AdBreak)ParametersadBreakThe ad break to be removed. 
- 
                  
                  Remove all ads and ad breaks. Remark This is a shorthand for callingServerSideAdIntegrationController.removeAdBreakon all ad breaks inServerSideAdIntegrationController.adBreaks.DeclarationSwift func removeAllAds()
- 
                  
                  Fire an AdsEventTypes.AD_ERRORevent on the player’sAdsinterface.This does not stop playback. DeclarationSwift func error(error: Error)ParameterserrorThe error. 
- 
                  
                  Fire a fatal PlayerEventMap.ERRORevent on the player.This stops playback immediately. Use THEOplayer.sourceto load a new source.DeclarationSwift func fatalError(error: Error, code: THEOErrorCode?)ParameterserrorThe error. codeThe error code. By default, this is set to THEOErrorCode.AD_ERROR.
