From 061907ee97b25f49f8ee94a00d7d4b5e4c099bff Mon Sep 17 00:00:00 2001 From: Kowshickkarthick Subramanian Date: Tue, 31 May 2022 15:20:20 +0000 Subject: [PATCH 01/13] Merge pull request #820 in MOBILE-SDK/app_mobile-sdk-ios from MS-4974_DeprecatedMethodRemoval-iOS to develop Squashed commit of the following: commit 33b427135a6f53cc78576bb8aec36073cebb2193 Author: ksubramanian Date: Tue May 24 10:53:51 2022 -0400 Fixed code review comments 2 commit 1898eb99fce352c3bcd29e98a49b1f9ac21ad12b Author: ksubramanian Date: Tue May 24 10:41:00 2022 -0400 Fix for Code review comments commit ff66138103bff3c245c9d3bc1dbc434680f43283 Author: ksubramanian Date: Mon May 23 20:48:21 2022 -0400 Fixed UnitTests commit 2e2363e373140b2f0447a2bbeae70052433e52b6 Author: ksubramanian Date: Mon May 23 14:53:25 2022 -0400 Removed deprecated properties and methods-first pass --- sdk/AppNexusNativeSDK/AppNexusNativeSDK.h | 1 - sdk/AppNexusSDK.xcodeproj/project.pbxproj | 12 -- sdk/AppNexusSDK/AppNexusSDK.h | 1 - .../Categories/ANAdView+PrivateMethods.h | 1 - sdk/sourcefiles/internal/ANAdView.m | 30 ---- sdk/sourcefiles/internal/ANBannerAdView.m | 26 +-- sdk/sourcefiles/internal/ANExternalUserId.m | 34 ---- sdk/sourcefiles/internal/ANInterstitialAd.m | 4 - .../internal/ANMediationAdViewController.m | 1 - sdk/sourcefiles/internal/ANMultiAdRequest.m | 2 - .../internal/ANUniversalTagRequestBuilder.m | 42 ----- .../internal/config/ANSDKSettings.m | 5 +- .../native/internal/ANNativeAdRequest.m | 12 -- .../internal/ANNativeMediatedAdController.m | 1 - sdk/sourcefiles/public-headers/ANAdProtocol.h | 18 -- .../public-headers/ANBannerAdView.h | 9 - .../public-headers/ANExternalUserId.h | 48 ------ .../public-headers/ANNativeAdResponse.h | 6 - .../public-headers/ANSDKSettings.h | 20 --- .../public-headers/ANTargetingParameters.h | 1 - sdk/sourcefiles/video/ANInstreamVideoAd.m | 4 - .../ANBannerAdViewVideoTestCase.m | 20 +-- .../FunctionalTests/ANBannerNativeTestCase.m | 14 +- .../ANBannerVideoAutoRefreshAdViewTestCase.m | 2 +- .../ANNativeAdRequestTestCase.m | 18 +- ...niversalTagRequestBuilderFunctionalTests.m | 161 ------------------ .../FunctionalTests/BannerAdResizeTestCase.m | 5 +- .../ANCSRUniversalTagRequestBuilderTests.m | 2 - .../MARTestCase/ANMARTestCase.m | 13 +- .../MARTestCase/MARPublicAPI.m | 12 +- ...eamVideoAdClassObjectFromUTResponseTests.m | 2 - .../NativeSDKTestAppTests.m | 4 +- .../Categories/ANAdView+ANTest.h | 2 +- .../Categories/ANBannerAdView+ANTest.h | 1 + .../testMARCombinationAllCSM.json | 2 +- ...stMARCombinationBannerRTBWithOtherCSM.json | 2 +- ...stMARCombinationNativeRTBWithOtherCSM.json | 2 +- ...onVideoAndInterstitialCSMWithOtherRTB.json | 2 +- ...binationVideoAndNativeCSMWithOtherRTB.json | 2 +- ...estMARCombinationVideoCSMWithOtherRTB.json | 2 +- .../TestANCSRUniversalFetcher.m | 2 +- .../UnitTestShared/TestANUniversalFetcher.m | 1 - .../UnitTests/ANUniversalAdFetcherTests.m | 1 - .../UnitTests/LazyLoadFeatureTests.m | 4 +- .../UnitTests/MARGeneralUnitTests.m | 57 ------- 45 files changed, 64 insertions(+), 547 deletions(-) delete mode 100644 sdk/sourcefiles/internal/ANExternalUserId.m delete mode 100644 sdk/sourcefiles/public-headers/ANExternalUserId.h diff --git a/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h b/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h index 74cf3ef01..0b1d87511 100644 --- a/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h +++ b/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h @@ -50,5 +50,4 @@ FOUNDATION_EXPORT const unsigned char AppNexusNativeSDKVersionString[]; #import -#import #import diff --git a/sdk/AppNexusSDK.xcodeproj/project.pbxproj b/sdk/AppNexusSDK.xcodeproj/project.pbxproj index 4151169f0..f09b72935 100644 --- a/sdk/AppNexusSDK.xcodeproj/project.pbxproj +++ b/sdk/AppNexusSDK.xcodeproj/project.pbxproj @@ -21,10 +21,6 @@ 0099B484228CA0F6004E80AB /* UIView+ANCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = ECE4EA9B194B768A0069D934 /* UIView+ANCategory.m */; }; 0099B485228CA18C004E80AB /* NSTimer+ANCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = ECE4EA98194B768A0069D934 /* NSTimer+ANCategory.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0099B486228CA191004E80AB /* NSTimer+ANCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = ECE4EA99194B768A0069D934 /* NSTimer+ANCategory.m */; }; - 00C4919325DF043100609E49 /* ANExternalUserId.h in Headers */ = {isa = PBXBuildFile; fileRef = 00C4919225DF043100609E49 /* ANExternalUserId.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 00C4919425DF043100609E49 /* ANExternalUserId.h in Headers */ = {isa = PBXBuildFile; fileRef = 00C4919225DF043100609E49 /* ANExternalUserId.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 00C491C325DF15AB00609E49 /* ANExternalUserId.m in Sources */ = {isa = PBXBuildFile; fileRef = 00C491C025DF15AB00609E49 /* ANExternalUserId.m */; }; - 00C491C425DF15AB00609E49 /* ANExternalUserId.m in Sources */ = {isa = PBXBuildFile; fileRef = 00C491C025DF15AB00609E49 /* ANExternalUserId.m */; }; 00D6B04820D1BC9B007A3439 /* ANOMIDImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 00D6B04720D1BC9B007A3439 /* ANOMIDImplementation.h */; }; 00D6B04B20D1BCAF007A3439 /* ANOMIDImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 00D6B04920D1BCAF007A3439 /* ANOMIDImplementation.m */; }; 0E02F07024336D570073A226 /* ANCSRNativeAdResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E3E3E62241FB73500823D66 /* ANCSRNativeAdResponse.m */; }; @@ -376,8 +372,6 @@ 006F6B9D2295F72A003D2DF0 /* ANAdFetcherBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdFetcherBase.h; sourceTree = ""; }; 0086BC9927DB006200BBDE61 /* ANUserId.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANUserId.h; sourceTree = ""; }; 0086BC9F27DB01A800BBDE61 /* ANUserId.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANUserId.m; sourceTree = ""; }; - 00C4919225DF043100609E49 /* ANExternalUserId.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANExternalUserId.h; sourceTree = ""; }; - 00C491C025DF15AB00609E49 /* ANExternalUserId.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANExternalUserId.m; sourceTree = ""; }; 00D6B04720D1BC9B007A3439 /* ANOMIDImplementation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANOMIDImplementation.h; sourceTree = ""; }; 00D6B04920D1BCAF007A3439 /* ANOMIDImplementation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANOMIDImplementation.m; sourceTree = ""; }; 0E0C5E5B2437E2EC0030B813 /* ANCSRAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANCSRAd.m; sourceTree = ""; }; @@ -848,7 +842,6 @@ 8AD618AD1981C11F00AC0780 /* ANBrowserViewController.m */, 8AD618AE1981C11F00AC0780 /* ANClickOverlayView.h */, 8AD618AF1981C11F00AC0780 /* ANClickOverlayView.m */, - 00C491C025DF15AB00609E49 /* ANExternalUserId.m */, 8AD618B01981C11F00AC0780 /* ANGlobal.h */, 8AD618B11981C11F00AC0780 /* ANGlobal.m */, 60165D252464823E00E8E07C /* ANHTTPNetworkSession.h */, @@ -1022,7 +1015,6 @@ ECE4EA8F194B768A0069D934 /* ANBannerAdView.h */, 0E3E3E61241FB73500823D66 /* ANCSRNativeAdResponse.h */, ECE4EA90194B768A0069D934 /* ANCustomAdapter.h */, - 00C4919225DF043100609E49 /* ANExternalUserId.h */, 0E35D4A92088F652000A6C27 /* ANGDPRSettings.h */, 609732B31E42E7910061EC0A /* ANInstreamVideoAd.h */, ECE4EA91194B768A0069D934 /* ANInterstitialAd.h */, @@ -1077,7 +1069,6 @@ 0E92D3B42420D06A00209580 /* ANCSRNativeAdController.h in Headers */, 0E3E3E63241FB73500823D66 /* ANCSRNativeAdResponse.h in Headers */, 8A9AEDB51A1BE8C200C58BDA /* ANCustomAdapter.h in Headers */, - 00C4919325DF043100609E49 /* ANExternalUserId.h in Headers */, 0EBE633A208F765E0008F4CC /* ANGDPRSettings.h in Headers */, 8A9AEDD41A1BF88200C58BDA /* ANGlobal.h in Headers */, 60165D282464823E00E8E07C /* ANHTTPNetworkSession.h in Headers */, @@ -1169,7 +1160,6 @@ 60435C61241A77E3004DDD7B /* ANCSRAd.h in Headers */, 0E02F07324336D6B0073A226 /* ANCSRNativeAdController.h in Headers */, 0E02F07124336D590073A226 /* ANCSRNativeAdResponse.h in Headers */, - 00C4919425DF043100609E49 /* ANExternalUserId.h in Headers */, F5731BC2228C9A4C0012B134 /* ANGDPRSettings.h in Headers */, F5731B72228C8FD60012B134 /* ANGlobal.h in Headers */, 60165D292464823E00E8E07C /* ANHTTPNetworkSession.h in Headers */, @@ -1390,7 +1380,6 @@ 0E0C5E5C2437E2EC0030B813 /* ANCSRAd.m in Sources */, 0E92D3B52420D06A00209580 /* ANCSRNativeAdController.m in Sources */, 0E3E3E64241FB73500823D66 /* ANCSRNativeAdResponse.m in Sources */, - 00C491C325DF15AB00609E49 /* ANExternalUserId.m in Sources */, 0ED85345208A94F200A5FFA0 /* ANGDPRSettings.m in Sources */, 601D2CAA26DD97400019EAAC /* NSPointerArray+ANCategory.m in Sources */, 8A9AEDF61A1BF99D00C58BDA /* ANGlobal.m in Sources */, @@ -1474,7 +1463,6 @@ 0E0C5E5D2437E2EF0030B813 /* ANCSRAd.m in Sources */, 0E02F07224336D680073A226 /* ANCSRNativeAdController.m in Sources */, 0E02F07024336D570073A226 /* ANCSRNativeAdResponse.m in Sources */, - 00C491C425DF15AB00609E49 /* ANExternalUserId.m in Sources */, F5731B6C228C8E430012B134 /* ANGDPRSettings.m in Sources */, F5731B71228C8FD20012B134 /* ANGlobal.m in Sources */, 60165D272464823E00E8E07C /* ANHTTPNetworkSession.m in Sources */, diff --git a/sdk/AppNexusSDK/AppNexusSDK.h b/sdk/AppNexusSDK/AppNexusSDK.h index 5c11db98a..04f9e393b 100644 --- a/sdk/AppNexusSDK/AppNexusSDK.h +++ b/sdk/AppNexusSDK/AppNexusSDK.h @@ -48,7 +48,6 @@ FOUNDATION_EXPORT const unsigned char AppNexusSDKVersionString[]; #import #import -#import #import diff --git a/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h b/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h index 925b212ff..26594dbaf 100644 --- a/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h +++ b/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h @@ -44,6 +44,5 @@ height: (int)height; - (void)setAdResponseInfo:(nonnull ANAdResponseInfo *)adResponseInfo; -- (void)setCreativeId:(nonnull NSString *)creativeId; @end diff --git a/sdk/sourcefiles/internal/ANAdView.m b/sdk/sourcefiles/internal/ANAdView.m index 37b90a523..644ed6028 100644 --- a/sdk/sourcefiles/internal/ANAdView.m +++ b/sdk/sourcefiles/internal/ANAdView.m @@ -76,10 +76,7 @@ @implementation ANAdView @synthesize gender = __gender; @synthesize customKeywords = __customKeywords; -@synthesize creativeId = __creativeId; @synthesize forceCreativeId = __forceCreativeId; -@synthesize adType = __adType; -@synthesize externalUid = __externalUid; @synthesize clickThroughAction = __clickThroughAction; @synthesize landingPageLoadsInBackground = __landingPageLoadsInBackground; @@ -232,17 +229,6 @@ - (void)ingestAdResponseTag: (NSDictionary *)tag #pragma mark - ANAdProtocol: Setter methods -- (void)setCreativeId:(nonnull NSString *)creativeId { - creativeId = ANConvertToNSString(creativeId); - if ([creativeId length] < 1) { - ANLogError(@"Could not set creativeId to non-string value"); - return; - } - if (creativeId != __creativeId) { - ANLogDebug(@"Setting creativeId to %@", creativeId); - __creativeId = creativeId; - } -} - (void)setForceCreativeId:(NSInteger)forceCreativeId { if (forceCreativeId <= 0) { @@ -255,13 +241,6 @@ - (void)setForceCreativeId:(NSInteger)forceCreativeId { } } -- (void)setAdType:(ANAdType)adType -{ - if (adType != __adType) { - ANLogDebug(@"Setting adType to %@", @(adType)); - __adType = adType; - } -} - (void)setAdResponseInfo:(ANAdResponseInfo *)adResponseInfo { if (!adResponseInfo) { @@ -516,15 +495,6 @@ - (ANGender)gender { return __gender; } -- (nullable NSString *)creativeId { - ANLogDebug(@"Creative Id returned %@", __creativeId); - return __creativeId; -} - --(nullable NSString *)externalUid { - ANLogDebug(@"ExternalUid returned %@", __externalUid); - return __externalUid; -} - (ANUniversalAdFetcher *)universalAdFetcher { diff --git a/sdk/sourcefiles/internal/ANBannerAdView.m b/sdk/sourcefiles/internal/ANBannerAdView.m index 882d7362a..30df01fd6 100644 --- a/sdk/sourcefiles/internal/ANBannerAdView.m +++ b/sdk/sourcefiles/internal/ANBannerAdView.m @@ -548,7 +548,7 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR // Try to get ANAdResponseInfo from anything that comes through. // - if (self.enableLazyLoad && adObjectHandler) { + if (adObjectHandler) { _adResponseInfo = (ANAdResponseInfo *) [ANGlobal valueOfGetterProperty:kANAdResponseInfo forObject:adObjectHandler]; if (_adResponseInfo) { [self setAdResponseInfo:_adResponseInfo]; @@ -602,15 +602,6 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR [self setAdResponseInfo:_adResponseInfo]; } - NSString *creativeId = (NSString *) [ANGlobal valueOfGetterProperty:kANCreativeId forObject:adObjectHandler]; - if (creativeId) { - [self setCreativeId:creativeId]; - } - - NSString *adTypeString = (NSString *) [ANGlobal valueOfGetterProperty:kANAdType forObject:adObjectHandler]; - if (adTypeString) { - [self setAdType:[ANGlobal adTypeStringToEnum:adTypeString]]; - } } // Process AdUnit according to class type of UIView. @@ -684,6 +675,7 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR NSError *registerError = nil; self.nativeAdResponse = (ANNativeAdResponse *)response.adObjectHandler; + [self setAdResponseInfo:self.nativeAdResponse.adResponseInfo]; if ((self.obstructionViews != nil) && (self.obstructionViews.count > 0)) { @@ -707,9 +699,10 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR // } else if ([adObject isKindOfClass:[ANNativeAdResponse class]]) { ANNativeAdResponse *nativeAdResponse = (ANNativeAdResponse *)response.adObject; - - self.creativeId = nativeAdResponse.creativeId; - self.adType = ANAdTypeNative; + + if(nativeAdResponse.adResponseInfo){ // For native mediation cases response info is set in the beginning and responseinfo here will be nil + [self setAdResponseInfo:nativeAdResponse.adResponseInfo]; + } nativeAdResponse.clickThroughAction = self.clickThroughAction; nativeAdResponse.landingPageLoadsInBackground = self.landingPageLoadsInBackground; @@ -793,13 +786,6 @@ - (NSString *) adTypeForMRAID { return kANInline; } -- (void)setAllowNativeDemand: (BOOL)nativeDemand - withRendererId: (NSInteger)rendererId -{ - _nativeAdRendererId = rendererId; - _shouldAllowNativeDemand = nativeDemand; -} - - (NSArray *)adAllowedMediaTypes { NSMutableArray *mediaTypes = [[NSMutableArray alloc] init]; diff --git a/sdk/sourcefiles/internal/ANExternalUserId.m b/sdk/sourcefiles/internal/ANExternalUserId.m deleted file mode 100644 index b593dcb31..000000000 --- a/sdk/sourcefiles/internal/ANExternalUserId.m +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANExternalUserId.h" - -@implementation ANExternalUserId - -@synthesize source = __source; -@synthesize userId = __userId; - -- (nullable instancetype)initWithSource:(ANExternalUserIdSource)source userId:(NSString *)userId{ - self = [super init]; - - if (self != nil) { - self.source = source; - self.userId = userId; - } - - return self; -} - -@end diff --git a/sdk/sourcefiles/internal/ANInterstitialAd.m b/sdk/sourcefiles/internal/ANInterstitialAd.m index 27264fdc2..34010be4f 100644 --- a/sdk/sourcefiles/internal/ANInterstitialAd.m +++ b/sdk/sourcefiles/internal/ANInterstitialAd.m @@ -363,10 +363,6 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR if (adResponseInfo) { [self setAdResponseInfo:adResponseInfo]; } - NSString *creativeId = (NSString *) [ANGlobal valueOfGetterProperty:kANCreativeId forObject:response.adObjectHandler]; - if(creativeId){ - [self setCreativeId:creativeId]; - } NSMutableDictionary *adViewWithDateLoaded = [NSMutableDictionary dictionaryWithObjectsAndKeys: response.adObject, kANInterstitialAdViewKey, diff --git a/sdk/sourcefiles/internal/ANMediationAdViewController.m b/sdk/sourcefiles/internal/ANMediationAdViewController.m index 52e92ace9..9d7b8c2c9 100644 --- a/sdk/sourcefiles/internal/ANMediationAdViewController.m +++ b/sdk/sourcefiles/internal/ANMediationAdViewController.m @@ -187,7 +187,6 @@ - (BOOL)requestAd:(CGSize)size targetingParameters.customKeywords = customKeywordsAsStrings; targetingParameters.age = adView.age; - targetingParameters.externalUid = adView.externalUid; targetingParameters.gender = adView.gender; targetingParameters.location = adView.location; NSString *idfa = ANAdvertisingIdentifier(); diff --git a/sdk/sourcefiles/internal/ANMultiAdRequest.m b/sdk/sourcefiles/internal/ANMultiAdRequest.m index fcd1422ee..f3143d05a 100644 --- a/sdk/sourcefiles/internal/ANMultiAdRequest.m +++ b/sdk/sourcefiles/internal/ANMultiAdRequest.m @@ -64,7 +64,6 @@ @implementation ANMultiAdRequest @synthesize gender = __gender; @synthesize location = __location; @synthesize customKeywords = __customKeywords; -@synthesize externalUid = __externalUid; @@ -283,7 +282,6 @@ - (BOOL)setupWithMemberId:(NSInteger)memberId publisherID:(NSInteger)publisherId __gender = ANGenderUnknown; __location = nil; __customKeywords = [[NSMutableDictionary alloc] init]; - __externalUid = nil; // return YES; diff --git a/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m b/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m index 9350b4980..e378031e0 100644 --- a/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m +++ b/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m @@ -575,8 +575,6 @@ -(void)getAdFramework:(NSMutableDictionary *)tag{ // Use publisherFirstPartyID if it is present. External Id in ANAdProtocol is deprecated. if (publisherUserId) { userDict[@"external_uid"] = publisherUserId; - }else if ([self.adFetcherDelegate externalUid]) { - userDict[@"external_uid"] = [self.adFetcherDelegate externalUid]; }else if (!ANAdvertisingTrackingEnabled()){ // Pass IDFV as external_uid when there is no Publisher First Party Id and IDFA NSString *idfv = ANIdentifierForVendor(); @@ -814,46 +812,6 @@ -(void)getAdFramework:(NSMutableDictionary *)tag{ } } - }else{ // if userId is not present then use externalUserId - NSArray *externalUserIdArray = [ANSDKSettings.sharedInstance externalUserIdArray]; - if ([externalUserIdArray count] <= 0) { return nil; } - for (ANExternalUserId *externaluserId in externalUserIdArray) - { - switch (externaluserId.source) { - case ANExternalUserIdSourceLiveRamp: - [transformedeuidArray addObject:@{ - @"source" : @"liveramp.com", - @"id" : externaluserId.userId - } ]; - break; - case ANExternalUserIdSourceCriteo: - [transformedeuidArray addObject:@{ - @"source" : @"criteo.com", - @"id" : externaluserId.userId - } ]; - break; - case ANExternalUserIdSourceNetId: - [transformedeuidArray addObject:@{ - @"source" : @"netid.de", - @"id" : externaluserId.userId - } ]; - break; - case ANExternalUserIdSourceTheTradeDesk: - [transformedeuidArray addObject:@{ - @"source" : @"adserver.org", - @"id" : externaluserId.userId, - @"rti_partner" : @"TDID" - } ]; - break; - case ANExternalUserIdSourceUID2: - [transformedeuidArray addObject:@{ - @"source" : @"uidapi.com", - @"id" : externaluserId.userId, - @"rti_partner" : @"UID2" - } ]; - break; - } - } } // return [transformedeuidArray copy]; diff --git a/sdk/sourcefiles/internal/config/ANSDKSettings.m b/sdk/sourcefiles/internal/config/ANSDKSettings.m index 2ad2b23cf..c3394d96c 100644 --- a/sdk/sourcefiles/internal/config/ANSDKSettings.m +++ b/sdk/sourcefiles/internal/config/ANSDKSettings.m @@ -41,14 +41,14 @@ + (instancetype)sharedInstance { } - (NSString *)webViewBaseUrl { - if((ANSDKSettings.sharedInstance.useAdnxsSimpleDomain == YES) && (ANGDPRSettings.canAccessDeviceData == NO || ANSDKSettings.sharedInstance.doNotTrack == YES)){ + if( ANGDPRSettings.canAccessDeviceData == NO || ANSDKSettings.sharedInstance.doNotTrack == YES){ return @"https://ib.adnxs-simple.com/"; } return @"https://mediation.adnxs.com/"; } -(NSString *) utAdRequestBaseUrl { - if((ANSDKSettings.sharedInstance.useAdnxsSimpleDomain == YES) && (ANGDPRSettings.canAccessDeviceData == NO || ANSDKSettings.sharedInstance.doNotTrack == YES)){ + if(ANGDPRSettings.canAccessDeviceData == NO || ANSDKSettings.sharedInstance.doNotTrack == YES){ return @"https://ib.adnxs-simple.com/ut/v3"; } return @"https://mediation.adnxs.com/ut/v3"; @@ -113,7 +113,6 @@ + (id)sharedInstance { sdkSettings.auctionTimeout = 0; sdkSettings.nativeAdAboutToExpireInterval = kAppNexusNativeAdAboutToExpireInterval; sdkSettings.countImpressionOn1PxRendering = NO; - sdkSettings.useAdnxsSimpleDomain = YES; sdkSettings.enableOMIDOptimization = NO; }); return sdkSettings; diff --git a/sdk/sourcefiles/native/internal/ANNativeAdRequest.m b/sdk/sourcefiles/native/internal/ANNativeAdRequest.m index 12bf62786..0aba227da 100644 --- a/sdk/sourcefiles/native/internal/ANNativeAdRequest.m +++ b/sdk/sourcefiles/native/internal/ANNativeAdRequest.m @@ -58,9 +58,7 @@ @implementation ANNativeAdRequest @synthesize age = __age; @synthesize gender = __gender; @synthesize customKeywords = __customKeywords; -@synthesize externalUid = __externalUid; @synthesize forceCreativeId = __forceCreativeId; -@synthesize adType = __adType; @synthesize rendererId = _rendererId; @synthesize extInvCode = __extInvCode; @synthesize trafficSourceCode = __trafficSourceCode; @@ -170,11 +168,6 @@ -(void)didFinishRequestWithResponse: (nonnull ANAdFetcherResponse *)response [self setAdResponseInfo:adResponseInfo onObject:nativeResponse forKeyPath:kANAdResponseInfo]; } } - // - if (nativeResponse.creativeId == nil) { - NSString *creativeId = (NSString *) [ANGlobal valueOfGetterProperty:kANCreativeId forObject:response.adObjectHandler]; - [self setCreativeId:creativeId onObject:nativeResponse forKeyPath:kANCreativeId]; - } // dispatch_queue_t backgroundQueue = dispatch_queue_create(__PRETTY_FUNCTION__, DISPATCH_QUEUE_SERIAL); @@ -260,11 +253,6 @@ - (void)internalUTRequestUUIDStringReset // #pragma mark - ANUniversalAdFetcherFoundationDelegate helper methods. -- (void)setCreativeId:(NSString *)creativeId - onObject:(id)object forKeyPath:(NSString *)keyPath -{ - [object setValue:creativeId forKeyPath:keyPath]; -} - (void)setAdResponseInfo:(ANAdResponseInfo *)adResponseInfo onObject:(id)object forKeyPath:(NSString *)keyPath diff --git a/sdk/sourcefiles/native/internal/ANNativeMediatedAdController.m b/sdk/sourcefiles/native/internal/ANNativeMediatedAdController.m index 9a9457514..79e4a72d9 100644 --- a/sdk/sourcefiles/native/internal/ANNativeMediatedAdController.m +++ b/sdk/sourcefiles/native/internal/ANNativeMediatedAdController.m @@ -171,7 +171,6 @@ - (ANTargetingParameters *)targetingParameters targetingParameters.customKeywords = customKeywordsAsStrings; targetingParameters.age = self.adRequestDelegate.age; targetingParameters.gender = self.adRequestDelegate.gender; - targetingParameters.externalUid = self.adRequestDelegate.externalUid; targetingParameters.location = self.adRequestDelegate.location; NSString *idfa = ANAdvertisingIdentifier(); if(idfa){ diff --git a/sdk/sourcefiles/public-headers/ANAdProtocol.h b/sdk/sourcefiles/public-headers/ANAdProtocol.h index f1a79a363..98f82b4f1 100644 --- a/sdk/sourcefiles/public-headers/ANAdProtocol.h +++ b/sdk/sourcefiles/public-headers/ANAdProtocol.h @@ -66,11 +66,6 @@ */ @property (nonatomic, readwrite, assign) ANGender gender; -/** - Specifies a string that corresponds to an external user ID for user - */ -@property (nonatomic, readwrite, strong, nullable) NSString *externalUid DEPRECATED_MSG_ATTRIBUTE("Use ANSDKSettings.publisherUserId instead."); - /** Set the user's current location. This allows ad buyers to do location @@ -150,12 +145,6 @@ */ @property (nonatomic, readwrite, assign) CGFloat reserve; -/** - Report the Ad Type of the returned ad object. - Not available until load is complete and successful. - */ -@property (nonatomic, readwrite) ANAdType adType DEPRECATED_MSG_ATTRIBUTE("Use ANAdResponse instead."); - /** Set the inventory code and member id for the place that ads will be shown. */ @@ -243,13 +232,6 @@ Set the trafficSourceCode, Specifies the third-party source of the impression. @protocol ANAdProtocol -/** - An AppNexus creativeID for the current creative that is displayed - */ -// CreativeId should be accessible from response Object only(like. ANBannerAdView, ANInterstitialAd, ANInstreamVideoAd and ANNativeAdResponse). It is placed into ANAdProtocol instead of ANAdProtocolFoundation to avoid creativeID being accessed through ANNativeAdRequest. -@property (nonatomic, readonly, strong, nullable) NSString *creativeId DEPRECATED_MSG_ATTRIBUTE("Use ANAdResponse instead."); - - /** * An AppNexus Single Unified object that will contain all the common fields of all the ads types * diff --git a/sdk/sourcefiles/public-headers/ANBannerAdView.h b/sdk/sourcefiles/public-headers/ANBannerAdView.h index edfc57387..9fbb8cde2 100644 --- a/sdk/sourcefiles/public-headers/ANBannerAdView.h +++ b/sdk/sourcefiles/public-headers/ANBannerAdView.h @@ -269,15 +269,6 @@ typedef NS_ENUM(NSUInteger, ANBannerViewAdAlignment) { @property (nonatomic, readwrite) BOOL enableLazyLoad; - -/** - * Sets whether or not Native Ads(AppNexus Media Type:12) can serve on this Ad object with nativeRendererId. - * rendererId : Native Assembly renderer_id that is associated with this placement. - * If rendererId is not set, the default is zero (0). - * A value of zero indicates that renderer_id will not be sent in the UT Request. - */ -- (void)setAllowNativeDemand:(BOOL)nativeDemand withRendererId:(NSInteger)rendererId DEPRECATED_MSG_ATTRIBUTE("Use shouldAllowNativeDemand instead."); - #pragma mark - Creating an ad view and loading an ad /** diff --git a/sdk/sourcefiles/public-headers/ANExternalUserId.h b/sdk/sourcefiles/public-headers/ANExternalUserId.h deleted file mode 100644 index 714b0051e..000000000 --- a/sdk/sourcefiles/public-headers/ANExternalUserId.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2021 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import -/* - * Supported Third Party ID Sources - * */ -typedef NS_ENUM(NSUInteger, ANExternalUserIdSource) { - ANExternalUserIdSourceLiveRamp, - ANExternalUserIdSourceNetId, - ANExternalUserIdSourceCriteo, - ANExternalUserIdSourceTheTradeDesk, - ANExternalUserIdSourceUID2 -}DEPRECATED_MSG_ATTRIBUTE("This will be removed in future releases."); - - - -/** - Defines the User Id Object from an External Thrid Party Source - */ -@interface ANExternalUserId : NSObject - -/** - Source of the External User Id - */ -@property (nonatomic, readwrite) ANExternalUserIdSource source DEPRECATED_MSG_ATTRIBUTE("This will be removed in future releases."); - -/** - The User Id String - */ -@property (nonatomic, readwrite, strong, nonnull) NSString *userId DEPRECATED_MSG_ATTRIBUTE("This will be removed in future releases."); - - -- (nullable instancetype)initWithSource:(ANExternalUserIdSource)source userId:(nonnull NSString *)userId DEPRECATED_MSG_ATTRIBUTE("This will be removed in future releases."); - -@end diff --git a/sdk/sourcefiles/public-headers/ANNativeAdResponse.h b/sdk/sourcefiles/public-headers/ANNativeAdResponse.h index 396cbd473..de9b69001 100644 --- a/sdk/sourcefiles/public-headers/ANNativeAdResponse.h +++ b/sdk/sourcefiles/public-headers/ANNativeAdResponse.h @@ -120,12 +120,6 @@ extern NSString * __nonnull const kANNativeCSRObject; @property (nonatomic, readonly, strong, nullable) NSString *sponsoredBy; -/*! - * An AppNexus creativeID for the current creative that is displayed - */ -@property (nonatomic, readonly, strong, nullable) NSString *creativeId DEPRECATED_MSG_ATTRIBUTE("Use ANAdResponse instead."); - - /** An AppNexus Single Unified object that will contain all the common fields of all the ads types */ diff --git a/sdk/sourcefiles/public-headers/ANSDKSettings.h b/sdk/sourcefiles/public-headers/ANSDKSettings.h index 6767503ca..7e815c283 100644 --- a/sdk/sourcefiles/public-headers/ANSDKSettings.h +++ b/sdk/sourcefiles/public-headers/ANSDKSettings.h @@ -14,19 +14,12 @@ */ #import -#import "ANExternalUserId.h" #import "ANUserId.h" typedef void (^sdkInitCompletion)(BOOL); @interface ANSDKSettings : NSObject -/** - If YES, the SDK will make all requests in HTTPS. Default is NO. - */ -@property (nonatomic) BOOL HTTPSEnabled DEPRECATED_MSG_ATTRIBUTE("All network calls are secure. HTTPSEnabled property is deprecated."); - - /** If YES, the SDK will allow to perform Open-Measurement Optimisation for viewability and verification measurement for ads served. Default is NO. @@ -129,23 +122,10 @@ An AppNexus disableIDFVUsage is a boolean value which exclude the IDFV field in @property (nonatomic, readwrite, strong, nullable) NSString *publisherUserId; -/** - A Dictionary containing objects that hold External UserId parameters. - */ -@property (nonatomic, readwrite, strong, nullable) NSArray *externalUserIdArray DEPRECATED_MSG_ATTRIBUTE("This will be removed in future releases. Use ANSDKSettings.userIdArray as alternative."); - - /** A Dictionary containing objects that hold UserId parameters. */ @property (nonatomic, readwrite, strong, nullable) NSArray *userIdArray ; -/** - Disable usage of ib.adnxs-simple.com. - If YES, SDK will make all requests to the approriate domain based on user consent and need for cookies. - If NO, SDK will make all requests to mediation.adnxs.com domain. - Default is YES. - */ -@property (nonatomic) BOOL useAdnxsSimpleDomain DEPRECATED_MSG_ATTRIBUTE("This will be removed in future releases. This is introduced just a fail safe kill switch for initial rollout. No Alternative."); @end diff --git a/sdk/sourcefiles/public-headers/ANTargetingParameters.h b/sdk/sourcefiles/public-headers/ANTargetingParameters.h index c1a6116f4..f789b3611 100644 --- a/sdk/sourcefiles/public-headers/ANTargetingParameters.h +++ b/sdk/sourcefiles/public-headers/ANTargetingParameters.h @@ -31,7 +31,6 @@ @property (nonatomic, readwrite, strong, nullable) NSString *age; @property (nonatomic, readwrite, assign) ANGender gender; -@property (nonatomic, readwrite, strong, nullable) NSString *externalUid DEPRECATED_MSG_ATTRIBUTE("No Alternatives"); /** location may be nil if not specified by app. */ diff --git a/sdk/sourcefiles/video/ANInstreamVideoAd.m b/sdk/sourcefiles/video/ANInstreamVideoAd.m index 93379faf6..24eda8d70 100644 --- a/sdk/sourcefiles/video/ANInstreamVideoAd.m +++ b/sdk/sourcefiles/video/ANInstreamVideoAd.m @@ -442,10 +442,6 @@ - (void) universalAdFetcher: (ANUniversalAdFetcher *)fetcher } [self setFriendlyObstruction]; - NSString *creativeId = (NSString *) [ANGlobal valueOfGetterProperty:kANCreativeId forObject:response.adObjectHandler]; - if(creativeId){ - [self setCreativeId:creativeId]; - } [self videoAdReady]; diff --git a/tests/UnitTestApp/FunctionalTests/ANBannerAdViewVideoTestCase.m b/tests/UnitTestApp/FunctionalTests/ANBannerAdViewVideoTestCase.m index 8bf2ff79e..d3a81f598 100644 --- a/tests/UnitTestApp/FunctionalTests/ANBannerAdViewVideoTestCase.m +++ b/tests/UnitTestApp/FunctionalTests/ANBannerAdViewVideoTestCase.m @@ -122,8 +122,8 @@ - (void) testBannerVideo handler:^(NSError *error) { }]; - XCTAssertEqual(self.banner.adType , ANAdTypeVideo); - XCTAssertEqualObjects(self.banner.creativeId, @"65588716"); + XCTAssertEqual(self.banner.adResponseInfo.adType , ANAdTypeVideo); + XCTAssertEqualObjects(self.banner.adResponseInfo.creativeId, @"65588716"); XCTAssert([self.banner.universalAdFetcher.adView isKindOfClass:[ANMRAIDContainerView class]]); } @@ -139,7 +139,7 @@ - (void)testBannerVideoWithoutCreativeId { handler:^(NSError *error) { }]; - XCTAssertEqual(self.banner.creativeId.length, 0); + XCTAssertEqual(self.banner.adResponseInfo.creativeId.length, 0); } @@ -160,8 +160,8 @@ - (void)testRTBHTMLBanner { XCTAssertNotNil(self.banner.universalAdFetcher.adView); XCTAssert([self.banner.universalAdFetcher.adView isKindOfClass:[ANMRAIDContainerView class]]); - XCTAssertEqual(self.banner.adType, ANAdTypeBanner); - XCTAssertEqualObjects(self.banner.creativeId, @"6332753"); + XCTAssertEqual(self.banner.adResponseInfo.adType, ANAdTypeBanner); + XCTAssertEqualObjects(self.banner.adResponseInfo.creativeId, @"6332753"); } @@ -193,8 +193,8 @@ - (void) testadSDKMediationFailVideoSuccessCase handler:^(NSError *error) { }]; - XCTAssertEqual(self.banner.adType, ANAdTypeVideo); - XCTAssertEqualObjects(self.banner.creativeId, @"65588716"); + XCTAssertEqual(self.banner.adResponseInfo.adType, ANAdTypeVideo); + XCTAssertEqualObjects(self.banner.adResponseInfo.creativeId, @"65588716"); XCTAssert([self.banner.universalAdFetcher.adObjectHandler isKindOfClass:[ANRTBVideoAd class]]); XCTAssert(![self.banner.universalAdFetcher.adObjectHandler isKindOfClass:[ANCSMVideoAd class]]); } @@ -211,7 +211,7 @@ - (void) testBannerVideoVerticalOrientation handler:^(NSError *error) { }]; - XCTAssertEqual(self.banner.adType , ANAdTypeVideo); + XCTAssertEqual(self.banner.adResponseInfo.adType , ANAdTypeVideo); XCTAssertEqual(self.banner.getVideoOrientation, ANPortrait); } @@ -226,7 +226,7 @@ - (void) testBannerVideoLandscapeOrientation handler:^(NSError *error) { }]; - XCTAssertEqual(self.banner.adType , ANAdTypeVideo); + XCTAssertEqual(self.banner.adResponseInfo.adType , ANAdTypeVideo); XCTAssertEqual(self.banner.getVideoOrientation, ANLandscape); } @@ -241,7 +241,7 @@ - (void) testBannerVideoSquareOrientation handler:^(NSError *error) { }]; - XCTAssertEqual(self.banner.adType , ANAdTypeVideo); + XCTAssertEqual(self.banner.adResponseInfo.adType , ANAdTypeVideo); XCTAssertEqual(self.banner.getVideoOrientation, ANSquare); } diff --git a/tests/UnitTestApp/FunctionalTests/ANBannerNativeTestCase.m b/tests/UnitTestApp/FunctionalTests/ANBannerNativeTestCase.m index 09c8a4044..a972cb227 100644 --- a/tests/UnitTestApp/FunctionalTests/ANBannerNativeTestCase.m +++ b/tests/UnitTestApp/FunctionalTests/ANBannerNativeTestCase.m @@ -18,6 +18,7 @@ #import "XCTestCase+ANBannerAdView.h" #import "XCTestCase+ANAdResponse.h" +#import "ANAdView+PrivateMethods.h" #import "ANUniversalAdFetcher+ANTest.h" #import "ANBannerAdView+ANTest.h" @@ -228,7 +229,7 @@ - (void)testIsBannerNativeVideoEnabled - (void) checkTypeURLsAndRefreshTimer { - XCTAssertTrue(ANAdTypeNative == self.multiFormatAd.adType); + XCTAssertTrue(ANAdTypeNative == self.multiFormatAd.adResponseInfo.adType); XCTAssertNotNil(self.nativeAd.mainImageURL); XCTAssertNotNil(self.nativeAd.iconImageURL); @@ -290,7 +291,8 @@ - (void)testReceiveBannerNativeVideoUsingRendererIdObject self.multiFormatAd = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0, 0, 300, 250) placementId:@"2"]; self.multiFormatAd.delegate = self; - [self.multiFormatAd setAllowNativeDemand:YES withRendererId:127]; + [self.multiFormatAd setShouldAllowNativeDemand:YES]; + [self.multiFormatAd setNativeAdRendererId:127]; [self.multiFormatAd setAdSize:CGSizeMake(300, 250)]; self.expectationRequest = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; @@ -319,7 +321,7 @@ - (void)testAdTypeValueAcrossRefreshToDifferentMediaType [self waitForExpectationsWithTimeout:self.timeoutForImpbusRequest handler:nil]; - XCTAssertTrue(ANAdTypeBanner == self.multiFormatAd.adType); + XCTAssertTrue(ANAdTypeBanner == self.multiFormatAd.adResponseInfo.adType); XCTAssertNotNil(self.multiFormatAd.universalAdFetcher.autoRefreshTimer); @@ -338,7 +340,7 @@ - (void)testAdTypeValueAcrossRefreshToDifferentMediaType [self.multiFormatAd loadAd]; [self waitForExpectationsWithTimeout:self.timeoutForImpbusRequest handler:nil]; - XCTAssertTrue(ANAdTypeNative == self.multiFormatAd.adType); + XCTAssertTrue(ANAdTypeNative == self.multiFormatAd.adResponseInfo.adType); } @@ -358,8 +360,8 @@ - (void)testCreativeIdIsStoredInBannerAdViewObject [self.multiFormatAd loadAd]; [self waitForExpectationsWithTimeout:self.timeoutForImpbusRequest handler:nil]; - XCTAssertNotNil(self.multiFormatAd.creativeId); - XCTAssertEqual(self.multiFormatAd.creativeId, self.nativeAd.creativeId); + XCTAssertNotNil(self.multiFormatAd.adResponseInfo.creativeId); + XCTAssertEqual(self.multiFormatAd.adResponseInfo.creativeId, self.nativeAd.adResponseInfo.creativeId); } - (void)testClickThruSettingsWithOpenSDKBrowser diff --git a/tests/UnitTestApp/FunctionalTests/ANBannerVideoAutoRefreshAdViewTestCase.m b/tests/UnitTestApp/FunctionalTests/ANBannerVideoAutoRefreshAdViewTestCase.m index 470038945..ddc3b434b 100644 --- a/tests/UnitTestApp/FunctionalTests/ANBannerVideoAutoRefreshAdViewTestCase.m +++ b/tests/UnitTestApp/FunctionalTests/ANBannerVideoAutoRefreshAdViewTestCase.m @@ -82,7 +82,7 @@ - (void) testBannerAutoRefresh }]; XCTAssertNotNil(self.banner.universalAdFetcher.autoRefreshTimer); - XCTAssertEqual(self.banner.adType, ANAdTypeBanner); + XCTAssertEqual(self.banner.adResponseInfo.adType, ANAdTypeBanner); } diff --git a/tests/UnitTestApp/FunctionalTests/ANNativeAdRequestTestCase.m b/tests/UnitTestApp/FunctionalTests/ANNativeAdRequestTestCase.m index b980bc238..7a8cd58fd 100644 --- a/tests/UnitTestApp/FunctionalTests/ANNativeAdRequestTestCase.m +++ b/tests/UnitTestApp/FunctionalTests/ANNativeAdRequestTestCase.m @@ -78,6 +78,7 @@ - (void)tearDown { self.successfulAdCall = NO; self.adResponseInfo = nil; self.adRequestError = nil; + ANSDKSettings.sharedInstance.publisherUserId = nil; self.nativeAdWillExpireExpectation = nil; [ANHTTPStubbingManager sharedStubbingManager].broadcastRequests = NO; [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; @@ -115,7 +116,7 @@ - (void)testSetPlacementIdOnlyOnNative [self.adRequest getIncrementCountEnabledOrIfSet:YES thenValue:NO]; [self stubRequestWithResponse:@"appnexus_standard_response"]; [self.adRequest setPlacementId:@"1"]; - [self.adRequest setExternalUid:@"AppNexus"]; + ANSDKSettings.sharedInstance.publisherUserId = @"AppNexus"; self.requestExpectation = [self expectationWithDescription:NSStringFromSelector(_cmd)]; [self.adRequest loadAd]; @@ -296,7 +297,7 @@ - (void)testSetInventoryCodeAndMemberIdOnlyOnNative { [self.adRequest getIncrementCountEnabledOrIfSet:YES thenValue:NO]; [self stubRequestWithResponse:@"appnexus_standard_response"]; [self.adRequest setInventoryCode:@"test" memberId:2]; - [self.adRequest setExternalUid:@"AppNexus"]; + ANSDKSettings.sharedInstance.publisherUserId = @"AppNexus"; self.requestExpectation = [self expectationWithDescription:NSStringFromSelector(_cmd)]; [self.adRequest loadAd]; [self waitForExpectationsWithTimeout:2 * kAppNexusRequestTimeoutInterval @@ -325,7 +326,7 @@ - (void)testSetBothInventoryCodeAndPlacementIdOnNative { [self stubRequestWithResponse:@"appnexus_standard_response"]; [self.adRequest setInventoryCode:@"test" memberId:2]; [self.adRequest setPlacementId:@"1"]; - [self.adRequest setExternalUid:@"AppNexus"]; + ANSDKSettings.sharedInstance.publisherUserId = @"AppNexus"; self.requestExpectation = [self expectationWithDescription:NSStringFromSelector(_cmd)]; [self.adRequest loadAd]; @@ -399,7 +400,7 @@ - (void)testFacebook { XCTAssertEqual(self.adResponseInfo.networkCode, ANNativeAdNetworkCodeFacebook); XCTAssertNil(self.adResponseInfo.iconImage); XCTAssertNil(self.adResponseInfo.mainImage); - XCTAssertEqualObjects(self.adResponseInfo.creativeId, @"111"); + XCTAssertEqualObjects(self.adResponseInfo.adResponseInfo.creativeId, @"111"); } else { XCTAssertNotNil(self.adRequestError); } @@ -479,7 +480,7 @@ - (void)testCustomAdapterFailToStandardResponse { [self validateGenericNativeAdObject]; XCTAssertEqual(self.adResponseInfo.networkCode, ANNativeAdNetworkCodeAppNexus); XCTAssertNil(self.adResponseInfo.iconImage); - XCTAssertEqualObjects(self.adResponseInfo.creativeId, @"125"); + XCTAssertEqualObjects(self.adResponseInfo.adResponseInfo.creativeId, @"125"); self.adResponseInfo.mainImageURL ? XCTAssertNotNil(self.adResponseInfo.mainImage) : XCTAssertNil(self.adResponseInfo.mainImage); self.adResponseInfo.mainImageURL ? XCTAssertTrue([self.adResponseInfo.mainImage isKindOfClass:[UIImage class]]) : nil; } @@ -602,10 +603,9 @@ - (void)testNativeAdRequestJSONOnBackgroundThread - (void)loadNativeAdRequest{ self.adRequest= [[ANNativeAdRequest alloc] init]; [self.adRequest setPlacementId:@"1"]; - [self.adRequest setExternalUid:@"AppNexus"]; + ANSDKSettings.sharedInstance.publisherUserId = @"AppNexus"; self.adRequest.forceCreativeId = 135482485; [self.adRequest setRendererId:127]; - [self.adRequest setExternalUid:@"AppNexus"]; [self.adRequest getIncrementCountEnabledOrIfSet:YES thenValue:NO]; self.adRequest.gender = ANGenderMale; self.adRequest.shouldLoadIconImage = YES; @@ -741,8 +741,8 @@ - (void)validateGenericNativeAdObject { if (self.adResponseInfo.customElements) { XCTAssert([self.adResponseInfo.customElements isKindOfClass:[NSDictionary class]]); } - if (self.adResponseInfo.creativeId) { - XCTAssert([self.adResponseInfo.creativeId isKindOfClass:[NSString class]]); + if (self.adResponseInfo.adResponseInfo.creativeId) { + XCTAssert([self.adResponseInfo.adResponseInfo.creativeId isKindOfClass:[NSString class]]); } } diff --git a/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m b/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m index bb59d0452..98aa61f30 100644 --- a/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m +++ b/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m @@ -24,7 +24,6 @@ #import "ANGDPRSettings.h" #import "ANUSPrivacySettings.h" #import "ANOMIDImplementation.h" -#import "ANExternalUserId.h" #if __has_include() #import #endif @@ -65,7 +64,6 @@ - (void)tearDown { ANSDKSettings.sharedInstance.geoOverrideCountryCode = nil; ANSDKSettings.sharedInstance.geoOverrideZipCode = nil; ANSDKSettings.sharedInstance.publisherUserId = nil; - ANSDKSettings.sharedInstance.externalUserIdArray = nil; ANSDKSettings.sharedInstance.userIdArray = nil; ANSDKSettings.sharedInstance.doNotTrack = NO; // Reset Donot Track to default value @@ -948,9 +946,6 @@ - (void)testUTRequestPublisherUserIDS ANSDKSettings.sharedInstance.publisherUserId = @"foobar-publisherfirstpartyid"; // This value should be seen in UT Request body TestANUniversalFetcher *adFetcher = [[TestANUniversalFetcher alloc] initWithPlacementId:placementID]; - //publisherFirstPartyID should be used instead of externalUid. - // If both publisherFirstPartyID and externalUid are set, publisherFirstPartyID will override externalUID - adFetcher.externalUid = @"AppNexus"; // This value should not be seen in UT Request body. NSURLRequest *request = [ANUniversalTagRequestBuilder buildRequestWithAdFetcherDelegate:adFetcher.delegate]; XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; @@ -982,162 +977,6 @@ - (void)testUTRequestPublisherUserIDS } -- (void)testUTRequestExternalUserIds -{ -// ANSDKSettings.sharedInstance.externalUserIds=@{ -// ANExternalUserIdNetId : @"999888777", -// ANExternalUserIdLiveRamp : @"AjfowMv4ZHZQJFM8TpiUnYEyA81Vdgg", -// ANExternalUserIdTheTradeDesk : @"00000111-91b1-49b2-ae37-17a8173dc36f", -// ANExternalUserIdCriteo : @"_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N" -// }; - - NSMutableArray *tempExternalUserIdArray = [[NSMutableArray alloc] init]; - - ANExternalUserId *netIdUser = [ANExternalUserId alloc]; - netIdUser.source = ANExternalUserIdSourceNetId; - netIdUser.userId = @"999888777"; - - ANExternalUserId *tradeDeskUser = [ANExternalUserId alloc]; - tradeDeskUser.source = ANExternalUserIdSourceTheTradeDesk; - tradeDeskUser.userId = @"00000111-91b1-49b2-ae37-17a8173dc36f"; - - ANExternalUserId *uid2User = [ANExternalUserId alloc]; - uid2User.source = ANExternalUserIdSourceUID2; - uid2User.userId = @"uid2_3948249329482ok"; - - [tempExternalUserIdArray addObject:[[ANExternalUserId alloc] initWithSource:ANExternalUserIdSourceCriteo userId:@"_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N"]]; - [tempExternalUserIdArray addObject:[[ANExternalUserId alloc] initWithSource:ANExternalUserIdSourceLiveRamp userId:@"AjfowMv4ZHZQJFM8TpiUnYEyA81Vdgg" ]]; - - [tempExternalUserIdArray addObject:netIdUser]; - [tempExternalUserIdArray addObject:tradeDeskUser]; - [tempExternalUserIdArray addObject:uid2User]; - - ANSDKSettings.sharedInstance.externalUserIdArray = tempExternalUserIdArray; - - - TestANUniversalFetcher *adFetcher = [[TestANUniversalFetcher alloc] initWithPlacementId:placementID]; - NSURLRequest *request = [ANUniversalTagRequestBuilder buildRequestWithAdFetcherDelegate:adFetcher.delegate]; - - XCTestExpectation *netIDExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; - XCTestExpectation *liveRampExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; - XCTestExpectation *tradeDeskExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; - XCTestExpectation *criteoExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; - XCTestExpectation *uid2Expectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; - - - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), - ^{ - NSError *error; - - id jsonObject = [NSJSONSerialization JSONObjectWithData:request.HTTPBody - options:kNilOptions - error:&error]; - TESTTRACEM(@"jsonObject=%@", jsonObject); - XCTAssertNil(error); - XCTAssertNotNil(jsonObject); - XCTAssertTrue([jsonObject isKindOfClass:[NSDictionary class]]); - NSDictionary *jsonDict = (NSDictionary *)jsonObject; - NSArray *eidsArray = jsonDict[@"eids"]; - NSDictionary *eidDictionary = jsonDict[@"eids"]; - - if (@available(iOS 14, *)) { - // External UIDs should be sent in /ut/v3 request only when ATT Tracking status is authorized - #if __has_include() - if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized){ - XCTAssertEqual(eidDictionary.count, 5 ); - - NSUInteger count = [eidsArray count]; - for (NSUInteger index = 0; index < count ; index++) { - TESTTRACEM(@"source==============%@", eidsArray[index][@"source"]); - if([eidsArray[index][@"source"] isEqualToString: @"criteo.com"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"criteo.com"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N"); - [criteoExpectation fulfill]; - } - - if([eidsArray[index][@"source"] isEqualToString: @"netid.de"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"netid.de"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"999888777"); - [netIDExpectation fulfill]; - } - - if([eidsArray[index][@"source"] isEqualToString: @"liveramp.com"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"liveramp.com"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"AjfowMv4ZHZQJFM8TpiUnYEyA81Vdgg"); - [liveRampExpectation fulfill]; - } - - if([eidsArray[index][@"source"] isEqualToString: @"adserver.org"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"adserver.org"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"00000111-91b1-49b2-ae37-17a8173dc36f"); - XCTAssertEqualObjects(eidsArray[index][@"rti_partner"], @"TDID"); - [tradeDeskExpectation fulfill]; - } - if([eidsArray[index][@"source"] isEqualToString: @"uidapi.com"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"uidapi.com"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"uid2_3948249329482ok"); - XCTAssertEqualObjects(eidsArray[index][@"rti_partner"], @"UID2"); - [uid2Expectation fulfill]; - } - } - }else { - - XCTAssertNil(eidDictionary ); - [tradeDeskExpectation fulfill]; - [criteoExpectation fulfill]; - [netIDExpectation fulfill]; - [liveRampExpectation fulfill]; - [uid2Expectation fulfill]; - - } - #endif - }else{ - XCTAssertEqual(eidDictionary.count, 5 ); - - NSUInteger count = [eidsArray count]; - for (NSUInteger index = 0; index < count ; index++) { - TESTTRACEM(@"source==============%@", eidsArray[index][@"source"]); - if([eidsArray[index][@"source"] isEqualToString: @"criteo.com"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"criteo.com"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N"); - [criteoExpectation fulfill]; - } - - if([eidsArray[index][@"source"] isEqualToString: @"netid.de"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"netid.de"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"999888777"); - [netIDExpectation fulfill]; - } - - if([eidsArray[index][@"source"] isEqualToString: @"liveramp.com"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"liveramp.com"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"AjfowMv4ZHZQJFM8TpiUnYEyA81Vdgg"); - [liveRampExpectation fulfill]; - } - - if([eidsArray[index][@"source"] isEqualToString: @"adserver.org"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"adserver.org"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"00000111-91b1-49b2-ae37-17a8173dc36f"); - XCTAssertEqualObjects(eidsArray[index][@"rti_partner"], @"TDID"); - [tradeDeskExpectation fulfill]; - } - - if([eidsArray[index][@"source"] isEqualToString: @"uidapi.com"]){ - XCTAssertEqualObjects(eidsArray[index][@"source"], @"uidapi.com"); - XCTAssertEqualObjects(eidsArray[index][@"id"], @"uid2_3948249329482ok"); - XCTAssertEqualObjects(eidsArray[index][@"rti_partner"], @"UID2"); - [uid2Expectation fulfill]; - } - } - } - - - }); - - [self waitForExpectationsWithTimeout:UTMODULETESTS_TIMEOUT handler:nil]; - -} - diff --git a/tests/UnitTestApp/FunctionalTests/BannerAdResizeTestCase.m b/tests/UnitTestApp/FunctionalTests/BannerAdResizeTestCase.m index 11fbc5cfc..a17268eec 100644 --- a/tests/UnitTestApp/FunctionalTests/BannerAdResizeTestCase.m +++ b/tests/UnitTestApp/FunctionalTests/BannerAdResizeTestCase.m @@ -125,7 +125,7 @@ - (void)testBannerRTBShouldResizeAdToFitContainerFalse { }]; - XCTAssertEqual(self.banner.adType, ANAdTypeBanner); + XCTAssertEqual(self.banner.adResponseInfo.adType, ANAdTypeBanner); } @@ -160,8 +160,7 @@ - (void)testBannerRTBShouldResizeAdToFitContainerTrue { handler:^(NSError *error) { }]; - - XCTAssertEqual(self.banner.adType, ANAdTypeBanner); + XCTAssertEqual(self.banner.adResponseInfo.adType, ANAdTypeBanner); XCTAssertTrue(self.receiveAdSuccess); } diff --git a/tests/UnitTestApp/FunctionalTests/CSR/ANCSRUniversalTagRequestBuilderTests.m b/tests/UnitTestApp/FunctionalTests/CSR/ANCSRUniversalTagRequestBuilderTests.m index 92839b791..8b63169f2 100644 --- a/tests/UnitTestApp/FunctionalTests/CSR/ANCSRUniversalTagRequestBuilderTests.m +++ b/tests/UnitTestApp/FunctionalTests/CSR/ANCSRUniversalTagRequestBuilderTests.m @@ -183,8 +183,6 @@ - (void)testUTRequestForCSR TestANCSRUniversalFetcher *adFetcher = [[TestANCSRUniversalFetcher alloc] initWithPlacementId:PlacementID]; - adFetcher.externalUid = @"AppNexus"; - NSURLRequest *request = [ANUniversalTagRequestBuilder buildRequestWithAdFetcherDelegate:adFetcher.delegate]; XCTestExpectation *expectation = [self expectationWithDescription:@"Dummy expectation"]; diff --git a/tests/UnitTestApp/FunctionalTests/MARTestCase/ANMARTestCase.m b/tests/UnitTestApp/FunctionalTests/MARTestCase/ANMARTestCase.m index dfe959904..00cb1afed 100644 --- a/tests/UnitTestApp/FunctionalTests/MARTestCase/ANMARTestCase.m +++ b/tests/UnitTestApp/FunctionalTests/MARTestCase/ANMARTestCase.m @@ -27,6 +27,7 @@ #import "ANBannerAdView+ANTest.h" #import "ANUniversalAdFetcher+ANTest.h" #import "ANInterstitialAd+ANTest.h" +#import "ANAdView+PrivateMethods.h" #import "ANNativeAdRequest+ANTest.h" #import "ANInstreamVideoAd+Test.h" #import "ANAdView+ANTest.h" @@ -746,27 +747,27 @@ - (void)waitForTimeInterval:(NSTimeInterval)delay -(void)assertBannerAd:(ANBannerAdView *)ad size:(CGSize )size withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { XCTAssertEqual(ad.frame.size.width, size.width); XCTAssertEqual(ad.frame.size.height, size.height); - XCTAssertEqual(ad.adType, ANAdTypeBanner); - XCTAssertEqualObjects(ad.creativeId, creativeId); + XCTAssertEqual(ad.adResponseInfo.adType, ANAdTypeBanner); + XCTAssertEqualObjects(ad.adResponseInfo.creativeId, creativeId); XCTAssertEqualObjects(ad.placementId, placement); } -(void)assertInterstitialAd:(ANInterstitialAd *)ad withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { - XCTAssertEqualObjects(ad.creativeId, creativeId); + XCTAssertEqualObjects(ad.adResponseInfo.creativeId, creativeId); XCTAssertEqualObjects(ad.placementId, placement); } -(void)assertNativeAd:(ANNativeAdRequest *)request response:(ANNativeAdResponse *)response withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { if(response != nil){ - XCTAssertEqualObjects(response.creativeId, creativeId); + XCTAssertEqualObjects(response.adResponseInfo.creativeId, creativeId); } XCTAssertEqualObjects(request.placementId, placement); } -(void)assertVideoAd:(ANInstreamVideoAd *)ad withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { - if(ad.creativeId != nil){ - XCTAssertEqualObjects(ad.creativeId, creativeId); + if(ad.adResponseInfo.creativeId != nil){ + XCTAssertEqualObjects(ad.adResponseInfo.creativeId, creativeId); } XCTAssertEqualObjects(ad.placementId, placement); } diff --git a/tests/UnitTestApp/FunctionalTests/MARTestCase/MARPublicAPI.m b/tests/UnitTestApp/FunctionalTests/MARTestCase/MARPublicAPI.m index 8cefb4167..1e466cf95 100644 --- a/tests/UnitTestApp/FunctionalTests/MARTestCase/MARPublicAPI.m +++ b/tests/UnitTestApp/FunctionalTests/MARTestCase/MARPublicAPI.m @@ -354,27 +354,27 @@ - (void)waitForTimeInterval:(NSTimeInterval)delay -(void)assertBannerAd:(ANBannerAdView *)ad size:(CGSize )size withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { XCTAssertEqual(ad.frame.size.width, size.width); XCTAssertEqual(ad.frame.size.height, size.height); - XCTAssertEqual(ad.adType, ANAdTypeBanner); - XCTAssertEqualObjects(ad.creativeId, creativeId); + XCTAssertEqual(ad.adResponseInfo.adType, ANAdTypeBanner); + XCTAssertEqualObjects(ad.adResponseInfo.creativeId, creativeId); XCTAssertEqualObjects(ad.placementId, placement); } -(void)assertInterstitialAd:(ANInterstitialAd *)ad withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { - XCTAssertEqualObjects(ad.creativeId, creativeId); + XCTAssertEqualObjects(ad.adResponseInfo.creativeId, creativeId); XCTAssertEqualObjects(ad.placementId, placement); } -(void)assertNativeAd:(ANNativeAdRequest *)request response:(ANNativeAdResponse *)response withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { if(response != nil){ - XCTAssertEqualObjects(response.creativeId, creativeId); + XCTAssertEqualObjects(response.adResponseInfo.creativeId, creativeId); } XCTAssertEqualObjects(request.placementId, placement); } -(void)assertVideoAd:(ANInstreamVideoAd *)ad withPlacement:(NSString *)placement andCreativeId:(NSString *)creativeId { - if(ad.creativeId != nil){ - XCTAssertEqualObjects(ad.creativeId, creativeId); + if(ad.adResponseInfo.creativeId != nil){ + XCTAssertEqualObjects(ad.adResponseInfo.creativeId, creativeId); } XCTAssertEqualObjects(ad.placementId, placement); } diff --git a/tests/UnitTestApp/FunctionalTests/OutstreamVideoAdClassObjectFromUTResponseTests.m b/tests/UnitTestApp/FunctionalTests/OutstreamVideoAdClassObjectFromUTResponseTests.m index 0e2d23733..a5bb0b22a 100644 --- a/tests/UnitTestApp/FunctionalTests/OutstreamVideoAdClassObjectFromUTResponseTests.m +++ b/tests/UnitTestApp/FunctionalTests/OutstreamVideoAdClassObjectFromUTResponseTests.m @@ -42,7 +42,6 @@ @interface OutstreamVideoAdClassObjectFromUTResponseTests : XCTestCase< ANUniver @implementation OutstreamVideoAdClassObjectFromUTResponseTests -@synthesize externalUid; @synthesize publisherId; @@ -263,7 +262,6 @@ - (BOOL)landingPageLoadsInBackground { @synthesize landingPageLoadsInBackground; @synthesize extInvCode; @synthesize trafficSourceCode; -@synthesize adType; @synthesize clickThroughAction; @synthesize forceCreativeId; diff --git a/tests/UnitTestApp/NativeSDKTestAppTests/NativeSDKTestAppTests.m b/tests/UnitTestApp/NativeSDKTestAppTests/NativeSDKTestAppTests.m index 57d2d9d26..40f25d86f 100644 --- a/tests/UnitTestApp/NativeSDKTestAppTests/NativeSDKTestAppTests.m +++ b/tests/UnitTestApp/NativeSDKTestAppTests/NativeSDKTestAppTests.m @@ -221,8 +221,8 @@ - (void)validateGenericNativeAdObject { }else{ XCTAssertTrue(false); } - if (self.adResponseInfo.creativeId) { - XCTAssert([self.adResponseInfo.creativeId isKindOfClass:[NSString class]]); + if (self.adResponseInfo.adResponseInfo.creativeId) { + XCTAssert([self.adResponseInfo.adResponseInfo.creativeId isKindOfClass:[NSString class]]); }else{ XCTAssertTrue(false); } diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANAdView+ANTest.h b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANAdView+ANTest.h index 2da27ec5d..c0e615b30 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANAdView+ANTest.h +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANAdView+ANTest.h @@ -13,7 +13,7 @@ limitations under the License. */ -#import "ANAdView.h" +#import "ANAdView+PrivateMethods.h" #import "ANAdViewInternalDelegate.h" diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANBannerAdView+ANTest.h b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANBannerAdView+ANTest.h index 464d37c80..8ed4c4f2e 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANBannerAdView+ANTest.h +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/Categories/ANBannerAdView+ANTest.h @@ -14,6 +14,7 @@ */ #import "ANBannerAdView.h" +#import "ANAdView+PrivateMethods.h" #import "ANUniversalAdFetcher.h" @interface ANBannerAdView (ANTest) diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationAllCSM.json b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationAllCSM.json index 31e166ce3..fd2fdcdf0 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationAllCSM.json +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationAllCSM.json @@ -204,7 +204,7 @@ "notify_url": "https://nym1-mobile.adnxs.com/vast_track/v2?info=ZgAAAAMArgAFAQn7jRVeAAAAABG4JO9F3C7YIBn7jRVeAAAAACDR7rFfKAAw7k447k5AhM9XSJHxogJQiIbSCFjo9CliAi0taAFwAXgAgAEAiAEAkAEAmAEAoAEAqAHR7rFfsAEB&s=d65955292a551d8263e15c6402b518b486721a6d&event_type=1", "usersync_url": "https%3A%2F%2Facdn.adnxs.com%2Fdmp%2Fasync_usersync.html", "buyer_member_id": 10094, - "creative_id": 162035356, + "creative_id": 162035357, "media_type_id": 4, "media_subtype_id": 64, "brand_category_id": 17, diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationBannerRTBWithOtherCSM.json b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationBannerRTBWithOtherCSM.json index d9c897383..af1829d55 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationBannerRTBWithOtherCSM.json +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationBannerRTBWithOtherCSM.json @@ -157,7 +157,7 @@ "notify_url": "https://nym1-mobile.adnxs.com/vast_track/v2?info=ZgAAAAMArgAFAQn7jRVeAAAAABG4JO9F3C7YIBn7jRVeAAAAACDR7rFfKAAw7k447k5AhM9XSJHxogJQiIbSCFjo9CliAi0taAFwAXgAgAEAiAEAkAEAmAEAoAEAqAHR7rFfsAEB&s=d65955292a551d8263e15c6402b518b486721a6d&event_type=1", "usersync_url": "https%3A%2F%2Facdn.adnxs.com%2Fdmp%2Fasync_usersync.html", "buyer_member_id": 10094, - "creative_id": 162035356, + "creative_id": 162035357, "media_type_id": 4, "media_subtype_id": 64, "brand_category_id": 17, diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationNativeRTBWithOtherCSM.json b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationNativeRTBWithOtherCSM.json index b0f232ed6..8b526e541 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationNativeRTBWithOtherCSM.json +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationNativeRTBWithOtherCSM.json @@ -209,7 +209,7 @@ "notify_url": "https://nym1-mobile.adnxs.com/vast_track/v2?info=ZgAAAAMArgAFAQn7jRVeAAAAABG4JO9F3C7YIBn7jRVeAAAAACDR7rFfKAAw7k447k5AhM9XSJHxogJQiIbSCFjo9CliAi0taAFwAXgAgAEAiAEAkAEAmAEAoAEAqAHR7rFfsAEB&s=d65955292a551d8263e15c6402b518b486721a6d&event_type=1", "usersync_url": "https%3A%2F%2Facdn.adnxs.com%2Fdmp%2Fasync_usersync.html", "buyer_member_id": 10094, - "creative_id": 162035356, + "creative_id": 162035357, "media_type_id": 4, "media_subtype_id": 64, "brand_category_id": 17, diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndInterstitialCSMWithOtherRTB.json b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndInterstitialCSMWithOtherRTB.json index 015734d9c..eb5144f8b 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndInterstitialCSMWithOtherRTB.json +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndInterstitialCSMWithOtherRTB.json @@ -164,7 +164,7 @@ "notify_url": "https://nym1-mobile.adnxs.com/vast_track/v2?info=ZgAAAAMArgAFAQn7jRVeAAAAABG4JO9F3C7YIBn7jRVeAAAAACDR7rFfKAAw7k447k5AhM9XSJHxogJQiIbSCFjo9CliAi0taAFwAXgAgAEAiAEAkAEAmAEAoAEAqAHR7rFfsAEB&s=d65955292a551d8263e15c6402b518b486721a6d&event_type=1", "usersync_url": "https%3A%2F%2Facdn.adnxs.com%2Fdmp%2Fasync_usersync.html", "buyer_member_id": 10094, - "creative_id": 162035356, + "creative_id": 162035357, "media_type_id": 4, "media_subtype_id": 64, "brand_category_id": 17, diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndNativeCSMWithOtherRTB.json b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndNativeCSMWithOtherRTB.json index b18b392bb..752f2688e 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndNativeCSMWithOtherRTB.json +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoAndNativeCSMWithOtherRTB.json @@ -144,7 +144,7 @@ "notify_url": "https://nym1-mobile.adnxs.com/vast_track/v2?info=ZgAAAAMArgAFAQn7jRVeAAAAABG4JO9F3C7YIBn7jRVeAAAAACDR7rFfKAAw7k447k5AhM9XSJHxogJQiIbSCFjo9CliAi0taAFwAXgAgAEAiAEAkAEAmAEAoAEAqAHR7rFfsAEB&s=d65955292a551d8263e15c6402b518b486721a6d&event_type=1", "usersync_url": "https%3A%2F%2Facdn.adnxs.com%2Fdmp%2Fasync_usersync.html", "buyer_member_id": 10094, - "creative_id": 162035356, + "creative_id": 162035357, "media_type_id": 4, "media_subtype_id": 64, "brand_category_id": 17, diff --git a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoCSMWithOtherRTB.json b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoCSMWithOtherRTB.json index 1a54c6805..515730898 100644 --- a/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoCSMWithOtherRTB.json +++ b/tests/UnitTestApp/UnitTestApp/SharedMockFiles/StubResponse/MARStubResponse/testMARCombinationVideoCSMWithOtherRTB.json @@ -149,7 +149,7 @@ "notify_url": "https://nym1-mobile.adnxs.com/vast_track/v2?info=ZgAAAAMArgAFAQn7jRVeAAAAABG4JO9F3C7YIBn7jRVeAAAAACDR7rFfKAAw7k447k5AhM9XSJHxogJQiIbSCFjo9CliAi0taAFwAXgAgAEAiAEAkAEAmAEAoAEAqAHR7rFfsAEB&s=d65955292a551d8263e15c6402b518b486721a6d&event_type=1", "usersync_url": "https%3A%2F%2Facdn.adnxs.com%2Fdmp%2Fasync_usersync.html", "buyer_member_id": 10094, - "creative_id": 162035356, + "creative_id": 162035357, "media_type_id": 4, "media_subtype_id": 64, "brand_category_id": 17, diff --git a/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANCSRUniversalFetcher.m b/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANCSRUniversalFetcher.m index 2ba3bdb2b..31e01d944 100644 --- a/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANCSRUniversalFetcher.m +++ b/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANCSRUniversalFetcher.m @@ -26,7 +26,7 @@ -(instancetype)initWithPlacementId:(NSString *)placementId if (!self) { return nil; } self.placementId = placementId; - self.externalUid = @"AppNexus"; + ANSDKSettings.sharedInstance.publisherUserId = @"AppNexus"; self.allowedAdSizes = [[NSMutableSet alloc] initWithArray:@[ [NSValue valueWithCGSize:kANAdSize1x1] ]]; self.delegate = self; diff --git a/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANUniversalFetcher.m b/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANUniversalFetcher.m index 5b99b40d0..d467310ca 100644 --- a/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANUniversalFetcher.m +++ b/tests/UnitTestApp/UnitTestApp/UnitMockFiles/UnitTestShared/TestANUniversalFetcher.m @@ -40,7 +40,6 @@ -(instancetype)initWithPlacementId:(NSString *)placementId andAllowMediaType:(NS if (!self) { return nil; } self.placementId = placementId; - self.externalUid = @"AppNexus"; self.allowedAdSizes = [[NSMutableSet alloc] initWithArray:@[ [NSValue valueWithCGSize:kANAdSize1x1] ]]; self.adAllowedMediaTypes = [mediaType copy]; self.delegate = self; diff --git a/tests/UnitTestApp/UnitTests/ANUniversalAdFetcherTests.m b/tests/UnitTestApp/UnitTests/ANUniversalAdFetcherTests.m index 0947a9b78..419290aa9 100644 --- a/tests/UnitTestApp/UnitTests/ANUniversalAdFetcherTests.m +++ b/tests/UnitTestApp/UnitTests/ANUniversalAdFetcherTests.m @@ -51,7 +51,6 @@ @implementation ANUniversalAdFetcherTests @synthesize landingPageLoadsInBackground; @synthesize memberId; @synthesize customKeywords; -@synthesize externalUid; @synthesize publisherId; @synthesize extInvCode; @synthesize trafficSourceCode; diff --git a/tests/UnitTestApp/UnitTests/LazyLoadFeatureTests.m b/tests/UnitTestApp/UnitTests/LazyLoadFeatureTests.m index c1cd93da9..523f6d6e8 100644 --- a/tests/UnitTestApp/UnitTests/LazyLoadFeatureTests.m +++ b/tests/UnitTestApp/UnitTests/LazyLoadFeatureTests.m @@ -170,7 +170,7 @@ - (void)createAdUnits self.lazyBanner.shouldServePublicServiceAnnouncements = NO; - self.lazyBanner.externalUid = @"banner-banner"; + // self.lazyBanner.externalUid = @"banner-banner"; self.lazyBanner.enableLazyLoad = YES; @@ -186,7 +186,7 @@ - (void)createAdUnits self.lazyBanner.shouldServePublicServiceAnnouncements = NO; - self.multiFormatBanner.externalUid = @"banner-multiformat"; + //self.multiFormatBanner.externalUid = @"banner-multiformat"; self.multiFormatBanner.enableLazyLoad = NO; diff --git a/tests/UnitTestApp/UnitTests/MARGeneralUnitTests.m b/tests/UnitTestApp/UnitTests/MARGeneralUnitTests.m index 75a451337..0a5bf006e 100644 --- a/tests/UnitTestApp/UnitTests/MARGeneralUnitTests.m +++ b/tests/UnitTestApp/UnitTests/MARGeneralUnitTests.m @@ -174,48 +174,6 @@ - (ANMultiAdRequest *)addAdUnitWhileInInnerScope:(NSUInteger)currentNumberOfTags return marObject; } -- (void)testDropMultiAdRequestThatIsOutOfScopeDuringAdUnitLoad -{ -TMARK(); - self.adUnitsForTest.bannerBanner.externalUid = kLocalScope; - - [self declareEphemeralMultiAdRequestAtInnerScope]; - - - // Demonstrate that AdUnit is independent of ephemeral MAR instance after a brief delay. - // - - [TestGlobal waitForSeconds: kWaitOneSecond - thenExecuteBlock: ^{ - NSDictionary *jsonBody = [MARHelper getJSONBodyFromAdUnit:self.adUnitsForTest.bannerBanner]; - - NSString *externalUID = jsonBody[@"user"][@"external_uid"]; - - XCTAssertTrue([externalUID isEqualToString:kLocalScope]); - } ]; -} - -- (void)declareEphemeralMultiAdRequestAtInnerScope -{ -TMARK(); - ANMultiAdRequest *localMAR = [[ANMultiAdRequest alloc] initWithMemberId: self.adUnitsForTest.memberIDGood - delegate: self - adUnits: self.adUnitsForTest.bannerBanner, - self.adUnitsForTest.bannerPlusNative, - self.adUnitsForTest.bannerPlusVideo, - nil ]; - localMAR.externalUid = kGlobalScope; - - - // Demonstrate that newly added AdUnit is cleared from MAR instance after a brief delay. - // - NSDictionary *jsonBody = [MARHelper getJSONBodyFromAdUnit:self.adUnitsForTest.bannerBanner withMultiAdRequest:localMAR]; - - NSString *externalUID = jsonBody[@"user"][@"external_uid"]; - - XCTAssertTrue([externalUID isEqualToString:kGlobalScope]); - -} - (void)testSetLastAdUnitStrongPropertyToNil { @@ -282,8 +240,6 @@ - (void)testUserInfoInMARInstanceAndInAdUnit adUnits: self.adUnitsForTest.banner, nil ]; - // - self.adUnitsForTest.banner.externalUid = bobName; self.adUnitsForTest.banner.gender = bobGender; self.adUnitsForTest.banner.age = bobAge; @@ -293,21 +249,16 @@ - (void)testUserInfoInMARInstanceAndInAdUnit XCTAssertEqual([jsonBody[@"user"][@"gender"] integerValue], ANGenderUnknown); XCTAssertNil(jsonBody[@"user"][@"age"]); - // - self.mar.externalUid = aliceName; self.mar.gender = aliceGender; self.mar.age = aliceAge; jsonBody = [MARHelper getJSONBodyFromMultiAdRequestInstance:self.mar]; - XCTAssertTrue([jsonBody[@"user"][@"external_uid"] isEqualToString:aliceName]); XCTAssertEqual([jsonBody[@"user"][@"gender"] integerValue], aliceGender); XCTAssertEqual([jsonBody[@"user"][@"age"] integerValue], [aliceAge integerValue]); - // jsonBody = [MARHelper getJSONBodyFromAdUnit:self.adUnitsForTest.banner]; - XCTAssertTrue([jsonBody[@"user"][@"external_uid"] isEqualToString:bobName]); XCTAssertEqual([jsonBody[@"user"][@"gender"] integerValue], bobGender); XCTAssertEqual([jsonBody[@"user"][@"age"] integerValue], [bobAge integerValue]); } @@ -334,7 +285,6 @@ - (void)testCustomKeywordsInMARInstanceAndInAdUnit adUnits: self.adUnitsForTest.banner, nil ]; - // jsonBody = [MARHelper getJSONBodyFromAdUnit:self.adUnitsForTest.banner withMultiAdRequest:self.mar]; marCK = jsonBody[@"keywords"]; @@ -344,7 +294,6 @@ - (void)testCustomKeywordsInMARInstanceAndInAdUnit XCTAssertNil(adunitCK); - // [self.mar addCustomKeywordWithKey:marKeywordOne value:marValueOne]; [self.mar addCustomKeywordWithKey:marKeywordTwo value:marValueTwo]; @@ -519,8 +468,6 @@ - (void)testMaskingAndUnmaskingAdUnitNamespaceWithMARAssociation adUnits: self.adUnitsForTest.banner, nil ]; - // - self.adUnitsForTest.banner.externalUid = bobName; self.adUnitsForTest.banner.gender = bobGender; self.adUnitsForTest.banner.age = bobAge; @@ -534,8 +481,6 @@ - (void)testMaskingAndUnmaskingAdUnitNamespaceWithMARAssociation XCTAssertNil(jsonBody[@"device"][@"geo"][@"latitude"]); - // - self.mar.externalUid = aliceName; self.mar.gender = aliceGender; self.mar.age = aliceAge; @@ -544,7 +489,6 @@ - (void)testMaskingAndUnmaskingAdUnitNamespaceWithMARAssociation jsonBody = [MARHelper getJSONBodyFromAdUnit:self.adUnitsForTest.banner withMultiAdRequest:self.mar]; - XCTAssertTrue([jsonBody[@"user"][@"external_uid"] isEqualToString:aliceName]); XCTAssertEqual([jsonBody[@"user"][@"gender"] integerValue], aliceGender); XCTAssertEqual([jsonBody[@"user"][@"age"] integerValue], [aliceAge integerValue]); XCTAssertEqual([jsonBody[@"device"][@"geo"][@"lat"] integerValue], aliceLatitude); @@ -552,7 +496,6 @@ - (void)testMaskingAndUnmaskingAdUnitNamespaceWithMARAssociation // jsonBody = [MARHelper getJSONBodyFromAdUnit:self.adUnitsForTest.banner]; - XCTAssertTrue([jsonBody[@"user"][@"external_uid"] isEqualToString:bobName]); XCTAssertEqual([jsonBody[@"user"][@"gender"] integerValue], bobGender); XCTAssertEqual([jsonBody[@"user"][@"age"] integerValue], [bobAge integerValue]); XCTAssertEqual([jsonBody[@"device"][@"geo"][@"lat"] integerValue], bobLatitude); From 6301e76a9fe6d3f8a36efdcf0d37a629830714c1 Mon Sep 17 00:00:00 2001 From: Kowshickkarthick Subramanian Date: Tue, 31 May 2022 15:20:37 +0000 Subject: [PATCH 02/13] Merge pull request #821 in MOBILE-SDK/app_mobile-sdk-ios from MS-5043-Remove-Discontinued-CSM-Adapters to develop Squashed commit of the following: commit 9cf576fd207b9d33e3175f360a043cbebebb16b4 Author: ksubramanian Date: Mon May 23 21:22:27 2022 -0400 Removed Discontinued mediation adapters --- mediation/discontinued/README.txt | 15 - .../Amazon/ANAdAdapterBannerAmazon.h | 21 - .../Amazon/ANAdAdapterBannerAmazon.m | 84 ---- .../ANAdAdapterBaseAmazon+PrivateMethods.h | 26 - .../Amazon/ANAdAdapterBaseAmazon.h | 31 -- .../Amazon/ANAdAdapterBaseAmazon.m | 90 ---- .../Amazon/ANAdAdapterInterstitialAmazon.h | 21 - .../Amazon/ANAdAdapterInterstitialAmazon.m | 79 --- .../mediatedviews/Amazon/Amazon.pch | 23 - .../Facebook/ANAdAdapterBannerFacebook.h | 26 - .../Facebook/ANAdAdapterBannerFacebook.m | 90 ---- .../ANAdAdapterInterstitialFacebook.h | 26 - .../ANAdAdapterInterstitialFacebook.m | 81 ---- .../Facebook/ANAdAdapterNativeFacebook.h | 30 -- .../Facebook/ANAdAdapterNativeFacebook.m | 145 ------ .../InMobi/ANAdAdapterBannerInMobi.h | 28 -- .../InMobi/ANAdAdapterBannerInMobi.m | 108 ----- .../ANAdAdapterBaseInMobi+PrivateMethods.h | 35 -- .../InMobi/ANAdAdapterBaseInMobi.h | 31 -- .../InMobi/ANAdAdapterBaseInMobi.m | 130 ----- .../InMobi/ANAdAdapterInterstitialInMobi.h | 27 -- .../InMobi/ANAdAdapterInterstitialInMobi.m | 130 ----- .../InMobi/ANAdAdapterNativeInMobi.h | 40 -- .../InMobi/ANAdAdapterNativeInMobi.m | 265 ----------- .../ANAdAdapterBannerMillennialMedia.h | 21 - .../ANAdAdapterBannerMillennialMedia.m | 169 ------- .../ANAdAdapterInterstitialMillennialMedia.h | 21 - .../ANAdAdapterInterstitialMillennialMedia.m | 170 ------- .../ANAdAdapterMillennialMediaBase.h | 29 -- .../ANAdAdapterMillennialMediaBase.m | 84 ---- .../MillennialMediaSDK/CHANGELOG.txt | 39 -- .../MillennialMediaSDK/LICENSE.txt | 73 --- .../MMAdSDK.framework/Headers | 1 - .../MMAdSDK.framework/MMAdSDK | 1 - .../Versions/A/Headers/MMAd+Experimental.h | 51 -- .../Versions/A/Headers/MMAd.h | 38 -- .../Versions/A/Headers/MMAdSDK.h | 22 - .../Versions/A/Headers/MMAppSettings.h | 44 -- .../Versions/A/Headers/MMCreativeInfo.h | 33 -- .../Versions/A/Headers/MMInlineAd.h | 297 ------------ .../Versions/A/Headers/MMInterstitialAd.h | 180 ------- .../Versions/A/Headers/MMNativeAd.h | 448 ------------------ .../Versions/A/Headers/MMRequestInfo.h | 45 -- .../Versions/A/Headers/MMSDK.h | 138 ------ .../Versions/A/Headers/MMSDKErrors.h | 93 ---- .../Versions/A/Headers/MMUserSettings.h | 109 ----- .../Versions/A/Headers/MMXIncentiveEvent.h | 24 - .../A/Headers/mediation/MMCustomEvent.h | 45 -- .../A/Headers/mediation/MMCustomEventBanner.h | 145 ------ .../mediation/MMCustomEventInterstitial.h | 142 ------ .../A/Headers/mediation/MMCustomEventNative.h | 112 ----- .../Headers/mediation/MMCustomEventRequest.h | 46 -- .../A/Headers/mediation/MMNativeAsset.h | 83 ---- .../A/Headers/mediation/MMNativeWrapper.h | 71 --- .../A/Headers/mediation/MMSDK+CustomEvent.h | 47 -- .../MMAdSDK.framework/Versions/A/MMAdSDK | Bin 53638952 -> 0 bytes .../MMAdSDK.framework/Versions/Current | 1 - .../MillennialMediaSDK/README.md | 10 - .../MoPub/ANAdAdapterBannerMoPub.h | 35 -- .../MoPub/ANAdAdapterBannerMoPub.m | 97 ---- .../MoPub/ANAdAdapterInterstitialMoPub.h | 34 -- .../MoPub/ANAdAdapterInterstitialMoPub.m | 98 ---- .../MoPub/ANAdAdapterMoPubBase.h | 28 -- .../MoPub/ANAdAdapterMoPubBase.m | 61 --- .../GoogleAdMob/ANGADCustomBannerAd.h | 29 -- .../GoogleAdMob/ANGADCustomBannerAd.m | 91 ---- .../GoogleAdMob/ANGADCustomInterstitialAd.h | 26 - .../GoogleAdMob/ANGADCustomInterstitialAd.m | 100 ---- .../mediating/MoPub/ANMoPubMediationBanner.h | 35 -- .../mediating/MoPub/ANMoPubMediationBanner.m | 108 ----- .../MoPub/ANMoPubMediationInterstitial.h | 35 -- .../MoPub/ANMoPubMediationInterstitial.m | 119 ----- 72 files changed, 5310 deletions(-) delete mode 100644 mediation/discontinued/README.txt delete mode 100644 mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.h delete mode 100644 mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.m delete mode 100644 mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon+PrivateMethods.h delete mode 100644 mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.h delete mode 100644 mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.m delete mode 100644 mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.h delete mode 100644 mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.m delete mode 100644 mediation/discontinued/mediatedviews/Amazon/Amazon.pch delete mode 100644 mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.h delete mode 100644 mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.m delete mode 100644 mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.h delete mode 100644 mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.m delete mode 100644 mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.h delete mode 100644 mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.m delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.h delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.m delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi+PrivateMethods.h delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.h delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.m delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.h delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.m delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.h delete mode 100644 mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.m delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.m delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.m delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.m delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/CHANGELOG.txt delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/LICENSE.txt delete mode 120000 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Headers delete mode 120000 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/MMAdSDK delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMAd+Experimental.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMAd.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMAdSDK.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMAppSettings.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMCreativeInfo.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMInlineAd.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMInterstitialAd.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMNativeAd.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMRequestInfo.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMSDK.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMSDKErrors.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMUserSettings.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/MMXIncentiveEvent.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMCustomEvent.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMCustomEventBanner.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMCustomEventInterstitial.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMCustomEventNative.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMCustomEventRequest.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMNativeAsset.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMNativeWrapper.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/Headers/mediation/MMSDK+CustomEvent.h delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/A/MMAdSDK delete mode 120000 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/MMAdSDK.framework/Versions/Current delete mode 100644 mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/README.md delete mode 100644 mediation/discontinued/mediatedviews/MoPub/ANAdAdapterBannerMoPub.h delete mode 100644 mediation/discontinued/mediatedviews/MoPub/ANAdAdapterBannerMoPub.m delete mode 100644 mediation/discontinued/mediatedviews/MoPub/ANAdAdapterInterstitialMoPub.h delete mode 100644 mediation/discontinued/mediatedviews/MoPub/ANAdAdapterInterstitialMoPub.m delete mode 100644 mediation/discontinued/mediatedviews/MoPub/ANAdAdapterMoPubBase.h delete mode 100644 mediation/discontinued/mediatedviews/MoPub/ANAdAdapterMoPubBase.m delete mode 100644 mediation/discontinued/mediating/GoogleAdMob/ANGADCustomBannerAd.h delete mode 100644 mediation/discontinued/mediating/GoogleAdMob/ANGADCustomBannerAd.m delete mode 100644 mediation/discontinued/mediating/GoogleAdMob/ANGADCustomInterstitialAd.h delete mode 100644 mediation/discontinued/mediating/GoogleAdMob/ANGADCustomInterstitialAd.m delete mode 100644 mediation/discontinued/mediating/MoPub/ANMoPubMediationBanner.h delete mode 100644 mediation/discontinued/mediating/MoPub/ANMoPubMediationBanner.m delete mode 100644 mediation/discontinued/mediating/MoPub/ANMoPubMediationInterstitial.h delete mode 100644 mediation/discontinued/mediating/MoPub/ANMoPubMediationInterstitial.m diff --git a/mediation/discontinued/README.txt b/mediation/discontinued/README.txt deleted file mode 100644 index 63c8f1364..000000000 --- a/mediation/discontinued/README.txt +++ /dev/null @@ -1,15 +0,0 @@ -discontinued folder contains adapters that are no longer actively maintained or supported - -We saw little to no usage for some of the mediation adapters that are included in the Mobile SDK. We will NOT be actively maintaining or supporting the adapters in the list (see below) from the SDKv7.7 release onwards. - -Amazon -InMobi -Millennial Media -Mopub -Facebook - -The adapters will be removed from Podspec(Cocoapods). - -These Adapters will be removed in SDK v8.0 - -If you have any questions/comments please let us know either via GitHub/or via Xandr Support. \ No newline at end of file diff --git a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.h b/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.h deleted file mode 100644 index 433fc226d..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import -#import "ANAdAdapterBaseAmazon.h" - -@interface ANAdAdapterBannerAmazon : ANAdAdapterBaseAmazon - -@end \ No newline at end of file diff --git a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.m b/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.m deleted file mode 100644 index ab4a673c7..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBannerAmazon.m +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import -#import -#import "ANAdAdapterBannerAmazon.h" -#import "ANAdAdapterBaseAmazon+PrivateMethods.h" - -@interface ANAdAdapterBannerAmazon () -@property (nonatomic, weak) UIViewController *rootViewController; -@property (nonatomic) AmazonAdView *adView; -@end - -@implementation ANAdAdapterBannerAmazon - - -@synthesize delegate = _delegate; - -- (void)requestBannerAdWithSize:(CGSize)size - rootViewController:(nullable UIViewController *)rootViewController - serverParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogDebug(@"Requesting Amazon banner with size: %@", NSStringFromCGSize(size)); - AmazonAdView *adView = [AmazonAdView amazonAdViewWithAdSize:size]; - adView.delegate = self; - self.rootViewController = rootViewController; - [adView loadAd:[self adOptionsForTargetingParameters:targetingParameters]]; - self.adView = adView; -} - -- (UIViewController *)viewControllerForPresentingModalView { - return self.rootViewController; -} - -- (void)adViewDidLoad:(AmazonAdView *)view { - ANLogDebug(@"Amazon banner did load"); - [self.delegate didLoadBannerAd:view]; -} - -- (void)adViewDidFailToLoad:(AmazonAdView *)view - withError:(AmazonAdError *)error { - ANLogDebug(@"Amazon banner did fail to load"); - [self handleAmazonError:error]; -} - -- (void)adViewWillExpand:(AmazonAdView *)view { - ANLogDebug(@"Amazon banner will expand"); - [self.delegate willPresentAd]; - [self.delegate didPresentAd]; -} - -- (void)adViewDidCollapse:(AmazonAdView *)view { - ANLogDebug(@"Amazon banner will collapse"); - [self.delegate willCloseAd]; - [self.delegate didCloseAd]; -} - -- (void)adViewWillResize:(AmazonAdView *)view toFrame:(CGRect)frame { - ANLogDebug(@"Amazon view will resize to frame: %@", NSStringFromCGRect(frame)); - // Do nothing. -} - -- (BOOL)willHandleAdViewResize:(AmazonAdView *)view toFrame:(CGRect)frame { - return NO; -} - -- (void)dealloc { - self.adView.delegate = nil; // clearing unsafe_unretained property -} - -@end diff --git a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon+PrivateMethods.h b/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon+PrivateMethods.h deleted file mode 100644 index 963a4b198..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon+PrivateMethods.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterBaseAmazon.h" - -@class AmazonAdOptions; -@class AmazonAdError; - -@interface ANAdAdapterBaseAmazon (PrivateMethods) - -- (AmazonAdOptions *)adOptionsForTargetingParameters:(ANTargetingParameters *)targetingParameters; -- (void)handleAmazonError:(AmazonAdError *)amazonError; - -@end \ No newline at end of file diff --git a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.h b/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.h deleted file mode 100644 index faaf8c11c..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - - -#if __has_include() -#import -#else -#import "ANCustomAdapter.h" -#import "ANLogging.h" -#endif -/** - The Amazon app key should be set before ads are loaded. All invocations of the Amazon mediation adapters - will fail to return an ad if the key is not set. - */ -@interface ANAdAdapterBaseAmazon : NSObject - -+ (void)setAmazonAppKey:(NSString *)appKey; - -@end diff --git a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.m b/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.m deleted file mode 100644 index ba55ad37d..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterBaseAmazon.m +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterBaseAmazon.h" -#import -#import -#import -#import - -static NSString *const kANAdAdapterBaseAmazonAgeKey = @"age"; - -static NSString *const kANAdAdapterBaseAmazonGenderKey = @"gender"; -static NSString *const kANAdAdapterBaseAmazonGenderMaleValue = @"m"; -static NSString *const kANAdAdapterBaseAmazonGenderFemaleValue = @"f"; - -@implementation ANAdAdapterBaseAmazon - -@synthesize delegate = _delegate; - -+ (void)setAmazonAppKey:(NSString *)appKey { - [[AmazonAdRegistration sharedRegistration] setAppKey:appKey]; -} - -- (AmazonAdOptions *)adOptionsForTargetingParameters:(ANTargetingParameters *)targetingParameters { - AmazonAdOptions *options = [AmazonAdOptions options]; - [targetingParameters.customKeywords enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { - [options setAdvancedOption:[obj description] - forKey:[key description]]; - }]; - if (targetingParameters.location) { - options.usesGeoLocation = YES; - } - switch (targetingParameters.gender) { - case ANGenderMale: - [options setAdvancedOption:kANAdAdapterBaseAmazonGenderMaleValue - forKey:kANAdAdapterBaseAmazonGenderKey]; - break; - case ANGenderFemale: - [options setAdvancedOption:kANAdAdapterBaseAmazonGenderFemaleValue - forKey:kANAdAdapterBaseAmazonGenderKey]; - break; - default: - break; - } - if (targetingParameters.age) { - [options setAdvancedOption:targetingParameters.age - forKey:kANAdAdapterBaseAmazonAgeKey]; - } - return options; -} - -- (void)handleAmazonError:(AmazonAdError *)amazonError { - ANLogDebug(@"Received error from Amazon with description: %@", amazonError.description); - ANAdResponseCode *responseCode = ANAdResponseCode.INTERNAL_ERROR; - switch (amazonError.errorCode) { - case AmazonAdErrorRequest: - responseCode = ANAdResponseCode.INVALID_REQUEST; - break; - case AmazonAdErrorNoFill: - responseCode = ANAdResponseCode.UNABLE_TO_FILL; - break; - case AmazonAdErrorInternalServer: - responseCode = ANAdResponseCode.INTERNAL_ERROR; - break; - case AmazonAdErrorNetworkConnection: - responseCode = ANAdResponseCode.NETWORK_ERROR; - break; - case AmazonAdErrorReserved: - responseCode = ANAdResponseCode.INTERNAL_ERROR; - break; - default: - break; - } - - [self.delegate didFailToLoadAd:responseCode]; -} - -@end diff --git a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.h b/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.h deleted file mode 100644 index 2116da70a..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import -#import "ANAdAdapterBaseAmazon.h" - -@interface ANAdAdapterInterstitialAmazon : ANAdAdapterBaseAmazon - -@end diff --git a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.m b/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.m deleted file mode 100644 index e60c97207..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/ANAdAdapterInterstitialAmazon.m +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterInterstitialAmazon.h" -#import "ANAdAdapterBaseAmazon+PrivateMethods.h" - - -@interface ANAdAdapterInterstitialAmazon () -@property (nonatomic) AmazonAdInterstitial *amazonInterstitial; -@end - -@implementation ANAdAdapterInterstitialAmazon - -- (void)requestInterstitialAdWithParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogDebug(@"Requesting Amazon interstitial"); - AmazonAdInterstitial *amazonInterstitial = [AmazonAdInterstitial amazonAdInterstitial]; - amazonInterstitial.delegate = self; - [amazonInterstitial load:[self adOptionsForTargetingParameters:targetingParameters]]; - self.amazonInterstitial = amazonInterstitial; -} - -- (void)presentFromViewController:(UIViewController *)viewController { - if (![self isReady]) { - ANLogDebug(@"Amazon interstitial was unavailable"); - [self.delegate failedToDisplayAd]; - return; - } - - [self.amazonInterstitial presentFromViewController:viewController]; -} - -- (BOOL)isReady { - return self.amazonInterstitial.isReady; -} - -- (void)interstitialDidLoad:(AmazonAdInterstitial *)interstitial { - ANLogDebug(@"Amazon interstitial did load"); - [self.delegate didLoadInterstitialAd:self]; -} - -- (void)interstitialDidFailToLoad:(AmazonAdInterstitial *)interstitial - withError:(AmazonAdError *)error { - ANLogDebug(@"Amazon interstitial did fail to load"); - [self handleAmazonError:error]; -} - -- (void)interstitialWillPresent:(AmazonAdInterstitial *)interstitial { - // Do nothing. -} - -- (void)interstitialDidPresent:(AmazonAdInterstitial *)interstitial { - // Do nothing. -} - -- (void)interstitialWillDismiss:(AmazonAdInterstitial *)interstitial { - ANLogDebug(@"Amazon interstitial will dismiss"); - [self.delegate willCloseAd]; -} - -- (void)interstitialDidDismiss:(AmazonAdInterstitial *)interstitial { - ANLogDebug(@"Amazon interstitial did dismiss"); - [self.delegate didCloseAd]; -} - -@end diff --git a/mediation/discontinued/mediatedviews/Amazon/Amazon.pch b/mediation/discontinued/mediatedviews/Amazon/Amazon.pch deleted file mode 100644 index 16bd0173d..000000000 --- a/mediation/discontinued/mediatedviews/Amazon/Amazon.pch +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#ifndef ANSDK_Amazon_pch -#define ANSDK_Amazon_pch - -// Amazon SDK does not import necessary framework UIKit, assumes presence of prefix header file which imports it automatically for all classes. - -#include - -#endif diff --git a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.h b/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.h deleted file mode 100644 index 2a846903e..000000000 --- a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#if __has_include() -#import -#else -#import "ANCustomAdapter.h" -#import "ANLogging.h" -#endif -#import - -@interface ANAdAdapterBannerFacebook : NSObject - -@end diff --git a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.m b/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.m deleted file mode 100644 index d65d2ddb7..000000000 --- a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterBannerFacebook.m +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterBannerFacebook.h" - -@interface ANAdAdapterBannerFacebook() - -@property (nonatomic, strong) FBAdView *fbAdView; - -@end - -@implementation ANAdAdapterBannerFacebook - -@synthesize delegate; - -- (void)requestBannerAdWithSize:(CGSize)size - rootViewController:(nullable UIViewController *)rootViewController - serverParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - FBAdSize fbAdSize; - CGRect frame; - - if (CGSizeEqualToSize(size, CGSizeMake(320, 50))) { - fbAdSize = kFBAdSize320x50; - frame = CGRectMake(0, 0, 320, 50); - } else if (size.height == 50) { - fbAdSize = kFBAdSizeHeight50Banner; - frame = CGRectMake(0, 0, 1, 50); - } else if (size.height == 90) { - fbAdSize = kFBAdSizeHeight90Banner; - frame = CGRectMake(0, 0, 1, 90); - } else if (size.height == 250) { - fbAdSize = kFBAdSizeHeight250Rectangle; - frame = CGRectMake(0, 0, 1, 250); - } else { - [self.delegate didFailToLoadAd:ANAdResponseCode.UNABLE_TO_FILL]; - return; - } - - self.fbAdView = [[FBAdView alloc] initWithPlacementID:idString - adSize:fbAdSize - rootViewController:rootViewController]; - self.fbAdView.frame = frame; - self.fbAdView.delegate = self; - [self.fbAdView loadAd]; -} - -#pragma mark FBAdViewDelegate methods - -- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error { - ANLogDebug(@"Facebook banner failed to load with error: %@", error); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - if (error.code == 1001) { - code = ANAdResponseCode.UNABLE_TO_FILL; - } - [self.delegate didFailToLoadAd:code]; -} - -- (void)adViewDidLoad:(FBAdView *)adView { - [self.delegate didLoadBannerAd:adView]; -} - -- (void)adViewDidClick:(FBAdView *)adView { - [self.delegate adWasClicked]; - [self.delegate willPresentAd]; - [self.delegate didPresentAd]; -} - -- (void)adViewDidFinishHandlingClick:(FBAdView *)adView { - [self.delegate willCloseAd]; - [self.delegate didCloseAd]; -} - -- (void)adViewWillLogImpression:(FBAdView *)adView { - ANLogDebug(@"Facebook Banner ad impression is being captured."); -} -@end diff --git a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.h b/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.h deleted file mode 100644 index cc199b2aa..000000000 --- a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#if __has_include() -#import -#else -#import "ANCustomAdapter.h" -#import "ANLogging.h" -#endif -#import - -@interface ANAdAdapterInterstitialFacebook : NSObject - -@end diff --git a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.m b/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.m deleted file mode 100644 index cf94c153d..000000000 --- a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterInterstitialFacebook.m +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterInterstitialFacebook.h" - -@interface ANAdAdapterInterstitialFacebook () - -@property (nonatomic, strong) FBInterstitialAd *fbInterstitialAd; - -@end - -@implementation ANAdAdapterInterstitialFacebook - -@synthesize delegate; - -- (void)requestInterstitialAdWithParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - self.fbInterstitialAd = [[FBInterstitialAd alloc] initWithPlacementID:idString]; - self.fbInterstitialAd.delegate = self; - [self.fbInterstitialAd loadAd]; -} - -- (void)presentFromViewController:(UIViewController *)viewController { - if (![self isReady]) { - ANLogDebug(@"Facebook interstitial was unavailable"); - [self.delegate failedToDisplayAd]; - return; - } - - [self.fbInterstitialAd showAdFromRootViewController:viewController]; -} - -- (BOOL)isReady { - return self.fbInterstitialAd.isAdValid; -} - -#pragma mark FBInterstitialAdDelegate methods - -- (void)interstitialAdDidLoad:(FBInterstitialAd *)interstitialAd { - [self.delegate didLoadInterstitialAd:self]; -} - -- (void)interstitialAd:(FBInterstitialAd *)interstitialAd didFailWithError:(NSError *)error { - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - if (error.code == 1001) { - code = ANAdResponseCode.UNABLE_TO_FILL;; - } - [self.delegate didFailToLoadAd:code]; -} - -- (void)interstitialAdDidClick:(FBInterstitialAd *)interstitialAd { - [self.delegate adWasClicked]; -} - -- (void)interstitialAdDidClose:(FBInterstitialAd *)interstitialAd { - [self.delegate didCloseAd]; -} - -- (void)interstitialAdWillClose:(FBInterstitialAd *)interstitialAd { - [self.delegate willCloseAd]; -} - -- (void)interstitialAdWillLogImpression:(FBInterstitialAd *)interstitialAd { - ANLogDebug(@"The user sees the add Facebook interstitialAd"); - // Use this function as indication for a user's impression on the ad. -} - -@end diff --git a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.h b/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.h deleted file mode 100644 index 144da38f5..000000000 --- a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#if __has_include() -#import -#elif __has_include() -#import -#else -#import "ANNativeCustomAdapter.h" -#import "ANLogging.h" -#import "ANNativeAdResponse.h" -#endif - -#import - -@interface ANAdAdapterNativeFacebook : NSObject - -@end diff --git a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.m b/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.m deleted file mode 100644 index 1e7b2f611..000000000 --- a/mediation/discontinued/mediatedviews/Facebook/ANAdAdapterNativeFacebook.m +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright 2014 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterNativeFacebook.h" - -@interface ANAdAdapterNativeFacebook () - -@property (nonatomic) FBNativeAd *fbNativeAd; -@property (nonatomic) FBMediaView *fbMediaView; -@property (nonatomic) FBMediaView *fbAdIcon; - -@end - -@implementation ANAdAdapterNativeFacebook - -@synthesize requestDelegate = _requestDelegate; -@synthesize nativeAdDelegate = _nativeAdDelegate; -@synthesize expired = _expired; - -#pragma mark ANNativeCustomAdapter - -- (void)requestNativeAdWithServerParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)adUnitId - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - self.fbNativeAd = [[FBNativeAd alloc] initWithPlacementID:adUnitId]; - self.fbNativeAd.delegate = self; - [self.fbNativeAd loadAd]; -} - --(BOOL) getMediaViewsForRegisterView:(nonnull UIView *)view{ - - for (UIView *subview in [view subviews]){ - if([subview isKindOfClass:[FBMediaView class]]){ - FBMediaView *fbAdView = (FBMediaView *)subview; - switch (fbAdView.nativeAdViewTag) { - case FBNativeAdViewTagIcon: - self.fbAdIcon = fbAdView; - break; - default: - self.fbMediaView = fbAdView; - break; - } - }else if([subview isKindOfClass:[UIView class]]) - { - [self getMediaViewsForRegisterView:subview]; - } - if(self.fbMediaView && self.fbAdIcon){ - break; - } - } - if(self.fbMediaView) { - return YES; - } - - return NO; -} - -- (void)registerViewForImpressionTrackingAndClickHandling:(nonnull UIView *)view - withRootViewController:(nonnull UIViewController *)rvc - clickableViews:(nullable NSArray *)clickableViews { - - if([self getMediaViewsForRegisterView:view]){ - if(clickableViews.count != 0) { - [self.fbNativeAd registerViewForInteraction:view - mediaView:self.fbMediaView - iconView:self.fbAdIcon - viewController:rvc - clickableViews:clickableViews]; - - }else { - [self.fbNativeAd registerViewForInteraction:view - mediaView:self.fbMediaView - iconView:self.fbAdIcon - viewController:rvc]; - } - } - else{ - ANLogDebug(@"View does not contain mediaView for registerViewForImpressionTracking."); - } -} - -- (void)dealloc { - [self unregisterViewFromTracking]; -} - -- (BOOL)hasExpired { - return ![self.fbNativeAd isAdValid]; -} - -- (void)unregisterViewFromTracking { - [self.fbNativeAd unregisterView]; - self.fbNativeAd = nil; -} - -#pragma mark - FBNativeAdDelegate - -- (void)nativeAd:(FBNativeAd *)nativeAd didFailWithError:(NSError *)error { - ANLogError(@"Error loading Facebook native ad: %@", error); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - if (error.code == 1001) { - code = ANAdResponseCode.UNABLE_TO_FILL; - } - [self.requestDelegate didFailToLoadNativeAd:code]; -} - -- (void)nativeAdDidLoad:(FBNativeAd *)nativeAd { - ANNativeMediatedAdResponse *response = [[ANNativeMediatedAdResponse alloc] initWithCustomAdapter:self - networkCode:ANNativeAdNetworkCodeFacebook]; - response.title = nativeAd.headline; - response.body = nativeAd.bodyText; - response.callToAction = nativeAd.callToAction; - response.customElements = @{ kANNativeElementObject : nativeAd}; - - [self.requestDelegate didLoadNativeAd:response]; -} - -- (void)nativeAdDidClick:(FBNativeAd *)nativeAd { - [self.nativeAdDelegate adWasClicked]; - [self.nativeAdDelegate willPresentAd]; - [self.nativeAdDelegate didPresentAd]; -} - -- (void)nativeAdDidFinishHandlingClick:(FBNativeAd *)nativeAd { - [self.nativeAdDelegate willCloseAd]; - [self.nativeAdDelegate didCloseAd]; -} - -- (void)nativeAdWillLogImpression:(FBNativeAd *)nativeAd { - ANLogDebug(@"Facebook Native ad impression is being captured."); - [self.nativeAdDelegate adDidLogImpression]; -} - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.h b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.h deleted file mode 100644 index 01cdf13e2..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#if __has_include() -#import -#else -#import "ANCustomAdapter.h" -#import "ANLogging.h" -#endif - - -@interface ANAdAdapterBannerInMobi : NSObject - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.m b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.m deleted file mode 100644 index ff7d8eccd..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBannerInMobi.m +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterBannerInMobi.h" -#import "ANAdAdapterBaseInMobi.h" -#import "ANAdAdapterBaseInMobi+PrivateMethods.h" - -@interface ANAdAdapterBannerInMobi () - -@property (nonatomic, readwrite, strong) IMBanner *banner; - -@end - -@implementation ANAdAdapterBannerInMobi - -@synthesize delegate = _delegate; - -- (void)requestBannerAdWithSize:(CGSize)size - rootViewController:(nullable UIViewController *)rootViewController - serverParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - if (![ANAdAdapterBaseInMobi appId].length) { - ANLogError(@"InMobi mediation failed. Call [ANAdAdapterBaseInMobi setInMobiAppID:@\"YOUR_PROPERTY_ID\"] to set the InMobi global App Id"); - [self.delegate didFailToLoadAd:ANAdResponseCode.MEDIATED_SDK_UNAVAILABLE]; - return; - } - if (!idString.length) { - ANLogError(@"Unable to load InMobi banner due to empty ad unit id"); - [self.delegate didFailToLoadAd:ANAdResponseCode.UNABLE_TO_FILL]; - return; - } - CGRect frame = CGRectMake(0, 0, size.width, size.height); - self.banner = [[IMBanner alloc] initWithFrame:frame placementId:[idString longLongValue]]; - self.banner.delegate = self; - [self.banner shouldAutoRefresh:NO]; - self.banner.keywords = [ANAdAdapterBaseInMobi keywordsFromTargetingParameters:targetingParameters]; - self.banner.extras = targetingParameters.customKeywords; - [ANAdAdapterBaseInMobi setInMobiTargetingWithTargetingParameters:targetingParameters]; - [self.banner load]; -} - -- (void)dealloc { - self.banner.delegate = nil; -} - -#pragma mark - IMBannerDelegate - -- (void)bannerDidFinishLoading:(IMBanner *)banner { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didLoadBannerAd:banner]; -} - -- (void)banner:(IMBanner *)banner didFailToLoadWithError:(IMRequestStatus *)error { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - ANLogDebug(@"Received InMobi Error: %@", error); - [self.delegate didFailToLoadAd:[ANAdAdapterBaseInMobi responseCodeFromInMobiRequestStatus:error]]; -} - -- (void)banner:(IMBanner *)banner didInteractWithParams:(NSDictionary *)params { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate adWasClicked]; -} - -- (void)userWillLeaveApplicationFromBanner:(IMBanner *)banner { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willLeaveApplication]; -} - -- (void)bannerWillPresentScreen:(IMBanner *)banner { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willPresentAd]; -} - -- (void)bannerDidPresentScreen:(IMBanner *)banner { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didPresentAd]; -} - -- (void)bannerWillDismissScreen:(IMBanner *)banner { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willCloseAd]; -} - -- (void)bannerDidDismissScreen:(IMBanner *)banner { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didCloseAd]; -} - -- (void)banner:(IMBanner *)banner rewardActionCompletedWithRewards:(NSDictionary *)rewards { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi+PrivateMethods.h b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi+PrivateMethods.h deleted file mode 100644 index a2ac5e097..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi+PrivateMethods.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterBaseInMobi.h" -#if __has_include() -#import -#else -#import "ANAdConstants.h" -#endif - - - -@class ANTargetingParameters; -@class IMRequestStatus; - -@interface ANAdAdapterBaseInMobi (PrivateMethods) - -+ (NSString *)appId; -+ (ANAdResponseCode *)responseCodeFromInMobiRequestStatus:(IMRequestStatus *)status; -+ (void)setInMobiTargetingWithTargetingParameters:(ANTargetingParameters *)targetingParameters; -+ (NSString *)keywordsFromTargetingParameters:(ANTargetingParameters *)targetingParameters; - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.h b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.h deleted file mode 100644 index a94bc3631..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import -#import - - - -/** - The InMobi app ID should be set before ads are loaded. All invocations of the InMobi mediation adapters - will fail to return an ad if the ID is not set. - */ -@interface ANAdAdapterBaseInMobi : NSObject - -+ (void)setInMobiAppID:(NSString *)appId; - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.m b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.m deleted file mode 100644 index 40aea260c..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterBaseInMobi.m +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterBaseInMobi.h" - - -#if __has_include() -#import -#else -#import "ANLogging.h" -#import "ANAdConstants.h" -#import "ANTargetingParameters.h" -#endif - - - -@implementation ANAdAdapterBaseInMobi - -static NSString *kANAdAdapterBaseInMobiAppId = @""; - -+ (NSString *)appId { - return kANAdAdapterBaseInMobiAppId; -} - -+ (void)setInMobiAppID:(NSString *)newAppId { - [IMSdk initWithAccountID:newAppId]; - kANAdAdapterBaseInMobiAppId = newAppId; -} - -+ (ANAdResponseCode *)responseCodeFromInMobiRequestStatus:(IMRequestStatus *)status { - switch (status.code) { - case kIMStatusCodeNetworkUnReachable: - return ANAdResponseCode.NETWORK_ERROR; - case kIMStatusCodeNoFill: - return ANAdResponseCode.UNABLE_TO_FILL; - case kIMStatusCodeRequestInvalid: - return ANAdResponseCode.INVALID_REQUEST; - case kIMStatusCodeRequestPending: - return ANAdResponseCode.INTERNAL_ERROR; - case kIMStatusCodeRequestTimedOut: - return ANAdResponseCode.NETWORK_ERROR; - case kIMStatusCodeInternalError: - return ANAdResponseCode.INTERNAL_ERROR; - case kIMStatusCodeServerError: - return ANAdResponseCode.NETWORK_ERROR; - case kIMStatusCodeAdActive: - return ANAdResponseCode.INTERNAL_ERROR; - case kIMStatusCodeEarlyRefreshRequest: - return ANAdResponseCode.UNABLE_TO_FILL; - default: - ANLogDebug(@"Unhandled IMRequestStatus code: %ld", (long)status.code); - return ANAdResponseCode.INTERNAL_ERROR; - } -} - -+ (void)setInMobiTargetingWithTargetingParameters:(ANTargetingParameters *)targetingParameters { - if (targetingParameters.age) { - NSNumber *ageNumber = [[[self class] sharedAgeNumberFormatter] numberFromString:targetingParameters.age]; - if (ageNumber) { - NSInteger age = 0; - if ([ageNumber integerValue] > 1900) { - NSDate *date = [NSDate date]; - NSCalendar *cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; - NSDateComponents *components = [cal components:0 - fromDate:date]; - age = [components year] - [ageNumber integerValue]; - } else { - age = [ageNumber integerValue]; - } - if (age > 0) { - [IMSdk setAge:age]; - } - } - - } - - switch (targetingParameters.gender) { - case ANGenderMale: - [IMSdk setGender:kIMSDKGenderMale]; - break; - case ANGenderFemale: - [IMSdk setGender:kIMSDKGenderFemale]; - break; - default: - break; - } - - if (targetingParameters.location) { - ANLocation *anLocation = targetingParameters.location; - CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(anLocation.latitude, anLocation.longitude); - CLLocation *location = [[CLLocation alloc] initWithCoordinate:coordinate - altitude:-1 - horizontalAccuracy:anLocation.horizontalAccuracy - verticalAccuracy:-1 - timestamp:anLocation.timestamp]; - [IMSdk setLocation:location]; - } -} - -+ (NSString *)keywordsFromTargetingParameters:(ANTargetingParameters *)targetingParameters { - NSMutableArray *keywords = [[NSMutableArray alloc] init]; - [targetingParameters.customKeywords enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) { - [keywords addObject:value]; - }]; - return [keywords componentsJoinedByString:@","]; -} - -+ (NSNumberFormatter *)sharedAgeNumberFormatter { - static dispatch_once_t sharedAgeNumberFormatterToken; - static NSNumberFormatter *sharedAgeNumberFormatter; - dispatch_once(&sharedAgeNumberFormatterToken, ^{ - sharedAgeNumberFormatter = [[NSNumberFormatter alloc] init]; - sharedAgeNumberFormatter.numberStyle = NSNumberFormatterDecimalStyle; - }); - return sharedAgeNumberFormatter; -} - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.h b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.h deleted file mode 100644 index 1457c7539..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import -#if __has_include() -#import -#else -#import "ANCustomAdapter.h" -#import "ANLogging.h" -#endif - - -@interface ANAdAdapterInterstitialInMobi : NSObject - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.m b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.m deleted file mode 100644 index ae96eb5ab..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterInterstitialInMobi.m +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterInterstitialInMobi.h" -#import "ANAdAdapterBaseInMobi.h" -#import "ANAdAdapterBaseInMobi+PrivateMethods.h" - - - -@interface ANAdAdapterInterstitialInMobi () - -@property (nonatomic, strong) IMInterstitial *adInterstitial; -@property (nonatomic) BOOL isInterstitialReady; - -@end - -@implementation ANAdAdapterInterstitialInMobi - -@synthesize delegate = _delegate; - -- (void)requestInterstitialAdWithParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - if (![ANAdAdapterBaseInMobi appId].length) { - ANLogError(@"InMobi mediation failed. Call [ANAdAdapterBaseInMobi setInMobiAppID:@\"YOUR_PROPERTY_ID\"] to set the InMobi global App Id"); - [self.delegate didFailToLoadAd:ANAdResponseCode.UNABLE_TO_FILL]; - return; - } - if (!idString.length) { - ANLogError(@"Unable to load InMobi interstitial due to empty ad unit id"); - [self.delegate didFailToLoadAd:ANAdResponseCode.MEDIATED_SDK_UNAVAILABLE]; - return; - } - self.adInterstitial = [[IMInterstitial alloc] initWithPlacementId:[idString longLongValue]]; - self.adInterstitial.delegate = self; - self.adInterstitial.extras = targetingParameters.customKeywords; - self.adInterstitial.keywords = [ANAdAdapterBaseInMobi keywordsFromTargetingParameters:targetingParameters]; - [ANAdAdapterBaseInMobi setInMobiTargetingWithTargetingParameters:targetingParameters]; - [self.adInterstitial load]; - self.isInterstitialReady = false; -} - -- (BOOL)isReady { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - return self.isInterstitialReady; -} - -- (void)presentFromViewController:(UIViewController *)viewController { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.adInterstitial showFromViewController:viewController]; -} - -- (void)dealloc { - self.adInterstitial.delegate = nil; -} - -#pragma mark - IMInterstitialDelegate - -- (void)interstitialDidFinishLoading:(IMInterstitial*)interstitial { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - self.isInterstitialReady = true; - [self.delegate didLoadInterstitialAd:self]; -} - -- (void)interstitial:(IMInterstitial*)interstitial didFailToLoadWithError:(IMRequestStatus*)error { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - ANLogDebug(@"Received InMobi Error: %@", error); - self.isInterstitialReady = false; - [self.delegate didFailToLoadAd:[ANAdAdapterBaseInMobi responseCodeFromInMobiRequestStatus:error]]; -} - -- (void)interstitialDidReceiveAd:(IMInterstitial *)interstitial { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)interstitialWillPresent:(IMInterstitial*)interstitial { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)interstitialDidPresent:(IMInterstitial *)interstitial { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)interstitial:(IMInterstitial*)interstitial didFailToPresentWithError:(IMRequestStatus*)error { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate failedToDisplayAd]; -} - -- (void)interstitialWillDismiss:(IMInterstitial*)interstitial { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willCloseAd]; -} - -- (void)interstitialDidDismiss:(IMInterstitial*)interstitial { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didCloseAd]; -} - -- (void)interstitial:(IMInterstitial*)interstitial didInteractWithParams:(NSDictionary*)params { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate adWasClicked]; -} - -- (void)interstitial:(IMInterstitial*)interstitial rewardActionCompletedWithRewards:(NSDictionary*)rewards { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)userWillLeaveApplicationFromInterstitial:(IMInterstitial*)interstitial { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willLeaveApplication]; -} - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.h b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.h deleted file mode 100644 index e01ee0a86..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import -#import - - -#if __has_include() -#import -#else -#import "ANNativeCustomAdapter.h" -#import "ANLogging.h" -#import "ANNativeAdResponse.h" -#endif - - - -@interface ANAdAdapterNativeInMobi : NSObject - -+ (void)setTitleKey:(NSString *)key; -+ (void)setDescriptionTextKey:(NSString *)key; -+ (void)setCallToActionKey:(NSString *)key; -+ (void)setIconKey:(NSString *)key; -+ (void)setScreenshotKey:(NSString *)key; -+ (void)setRatingCountKey:(NSString *)key; -+ (void)setLandingURLKey:(NSString *)key; - -@end diff --git a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.m b/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.m deleted file mode 100644 index 8f1813198..000000000 --- a/mediation/discontinued/mediatedviews/InMobi/ANAdAdapterNativeInMobi.m +++ /dev/null @@ -1,265 +0,0 @@ -/* Copyright 2015 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterNativeInMobi.h" -#import "ANAdAdapterBaseInMobi.h" -#import "ANAdAdapterBaseInMobi+PrivateMethods.h" - - - -static NSInteger const kANAdAdapterNativeInMobiRatingScaleDefault = 5; -static NSString *const kANAdAdapterNativeInMobiImageURLKey = @"url"; - -@interface ANAdAdapterNativeInMobi () - -@property (nonatomic, readwrite, strong) IMNative *nativeAd; -@property (nonatomic, readwrite, strong) NSDictionary *nativeContent; - -@end - -@implementation ANAdAdapterNativeInMobi - -@synthesize requestDelegate = _requestDelegate; -@synthesize nativeAdDelegate = _nativeAdDelegate; -@synthesize expired = _expired; - -#pragma mark - InMobi Key Names - -static NSString *kANAdAdapterNativeInMobiTitleKey = @"title"; -static NSString *kANAdAdapterNativeInMobiDescriptionKey = @"description"; -static NSString *kANAdAdapterNativeInMobiCTAKey = @"cta"; -static NSString *kANAdAdapterNativeInMobiIconKey = @"icon"; -static NSString *kANAdAdapterNativeInMobiScreenshotsKey = @"screenshots"; -static NSString *kANAdAdapterNativeInMobiRatingKey = @"rating"; -static NSString *kANAdAdapterNativeInMobiLandingURLKey = @"landingURL"; - -+ (void)setTitleKey:(NSString *)key { - kANAdAdapterNativeInMobiTitleKey = key; -} - -+ (void)setDescriptionTextKey:(NSString *)key { - kANAdAdapterNativeInMobiDescriptionKey = key; -} - -+ (void)setCallToActionKey:(NSString *)key { - kANAdAdapterNativeInMobiCTAKey = key; -} - -+ (void)setIconKey:(NSString *)key { - kANAdAdapterNativeInMobiIconKey = key; -} - -+ (void)setScreenshotKey:(NSString *)key { - kANAdAdapterNativeInMobiScreenshotsKey = key; -} - -+ (void)setRatingCountKey:(NSString *)key { - kANAdAdapterNativeInMobiRatingKey = key; -} - -+ (void)setLandingURLKey:(NSString *)key { - kANAdAdapterNativeInMobiLandingURLKey = key; -} - -# pragma mark - ANNativeCustomAdapter - -- (void)requestNativeAdWithServerParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)adUnitId - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - if (![ANAdAdapterBaseInMobi appId].length) { - ANLogError(@"InMobi mediation failed. Call [ANAdAdapterBaseInMobi setInMobiAppID:@\"YOUR_PROPERTY_ID\"] to set the InMobi global App Id"); - [self.requestDelegate didFailToLoadNativeAd:ANAdResponseCode.MEDIATED_SDK_UNAVAILABLE]; - return; - } - if (!adUnitId.length) { - ANLogError(@"Unable to load InMobi native ad due to empty ad unit id"); - [self.requestDelegate didFailToLoadNativeAd:ANAdResponseCode.UNABLE_TO_FILL]; - return; - } - NSString *appId; - if (adUnitId.length) { - appId = adUnitId; - } else { - appId = [ANAdAdapterBaseInMobi appId]; - } - self.nativeAd = [[IMNative alloc] initWithPlacementId:[adUnitId longLongValue]]; - self.nativeAd.delegate = self; - self.nativeAd.extras = targetingParameters.customKeywords; - self.nativeAd.keywords = [ANAdAdapterBaseInMobi keywordsFromTargetingParameters:targetingParameters]; - [self.nativeAd load]; -} - -- (void)registerViewForImpressionTracking:(nonnull UIView *)view { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - self.expired = YES; -} - -- (void)handleClickFromRootViewController:(nonnull UIViewController *)rvc { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.nativeAdDelegate adWasClicked]; - [self.nativeAdDelegate willLeaveApplication]; - [self.nativeAd reportAdClickAndOpenLandingPage]; -} - -- (void)unregisterViewFromTracking { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - self.nativeAd.delegate = nil; - self.nativeAd = nil; -} - -#pragma mark - IMNativeDelegate - -- (void)nativeDidFinishLoading:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - if(native.isReady){ - NSDictionary *nativeContent = [[self class] nativeContentFromContentString:native.customAdContent]; - if (!nativeContent) { - return; - } - self.nativeContent = nativeContent; - ANNativeMediatedAdResponse *adResponse = [self nativeAdResponseFromNativeContent:nativeContent]; - adResponse.customElements = @{ kANNativeElementObject : self.nativeAd}; - if (!adResponse) { - [self.requestDelegate didFailToLoadNativeAd:ANAdResponseCode.INTERNAL_ERROR]; - return; - } - - - [self.requestDelegate didLoadNativeAd:adResponse]; - }else{ - [self.requestDelegate didFailToLoadNativeAd:ANAdResponseCode.INTERNAL_ERROR]; - } -} - -- (void)native:(IMNative*)native didFailToLoadWithError:(IMRequestStatus *)error { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - ANLogDebug(@"Received InMobi Error: %@", error); - [self.requestDelegate didFailToLoadNativeAd:[ANAdAdapterBaseInMobi responseCodeFromInMobiRequestStatus:error]]; -} - --(void)nativeWillPresentScreen:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.nativeAdDelegate willPresentAd]; -} - -- (void)nativeDidPresentScreen:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.nativeAdDelegate didPresentAd]; -} - -- (void)nativeWillDismissScreen:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.nativeAdDelegate willCloseAd]; - -} - -- (void)nativeDidDismissScreen:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.nativeAdDelegate didCloseAd]; -} - -- (void)userWillLeaveApplicationFromNative:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.nativeAdDelegate willLeaveApplication]; -} - -- (void)native:(IMNative *)native didInteractWithParams:(NSDictionary *)params { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); -} - - -- (void)nativeAdImpressed:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.nativeAdDelegate adDidLogImpression]; -} - - -- (void)nativeDidFinishPlayingMedia:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); -} - - -- (void)userDidSkipPlayingMediaFromNative:(IMNative *)native { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); -} - - -#pragma mark - Helper - -+ (NSDictionary *)nativeContentFromContentString:(NSString *)content { - NSData *data = [content dataUsingEncoding:NSUTF8StringEncoding]; - NSError *error = nil; - id jsonObject = [NSJSONSerialization JSONObjectWithData:data - options:kNilOptions - error:&error]; - if ([jsonObject isKindOfClass:[NSDictionary class]]) { - return (NSDictionary *)jsonObject; - } - return nil; -} - -- (ANNativeMediatedAdResponse *)nativeAdResponseFromNativeContent:(NSDictionary *)nativeContent { - ANNativeMediatedAdResponse *adResponse = [[ANNativeMediatedAdResponse alloc] initWithCustomAdapter:self - networkCode:ANNativeAdNetworkCodeInMobi]; - - - id titleValue = [self.nativeAd adTitle]; - if ([titleValue isKindOfClass:[NSString class]]) { - adResponse.title = (NSString *)titleValue; - } - - id bodyValue = [self.nativeAd adDescription]; - if ([bodyValue isKindOfClass:[NSString class]]) { - adResponse.body = (NSString *)bodyValue; - } - - id ctaValue = [self.nativeAd adCtaText]; - if ([ctaValue isKindOfClass:[NSString class]]) { - adResponse.callToAction = (NSString *)ctaValue; - } - - id iconValue = [self.nativeAd adIcon]; - if ([iconValue isKindOfClass:[NSDictionary class]]) { - NSDictionary *imageDict = (NSDictionary *)iconValue; - id imageUrlValue = imageDict[kANAdAdapterNativeInMobiImageURLKey]; - if ([imageUrlValue isKindOfClass:[NSString class]]) { - adResponse.iconImageURL = [NSURL URLWithString:(NSString *)imageUrlValue]; - } - } - - id screenshotsValue = nativeContent[kANAdAdapterNativeInMobiScreenshotsKey]; - if ([screenshotsValue isKindOfClass:[NSDictionary class]]) { - NSDictionary *imageDict = (NSDictionary *)screenshotsValue; - id imageUrlValue = imageDict[kANAdAdapterNativeInMobiImageURLKey]; - if ([imageUrlValue isKindOfClass:[NSString class]]) { - adResponse.mainImageURL = [NSURL URLWithString:(NSString *)imageUrlValue]; - } - } - - id ratingValue = nativeContent[kANAdAdapterNativeInMobiRatingKey]; - if ([ratingValue isKindOfClass:[NSNumber class]]) { - NSNumber *rating = (NSNumber *)ratingValue; - adResponse.rating = [[ANNativeAdStarRating alloc] initWithValue:[rating floatValue] - scale:kANAdAdapterNativeInMobiRatingScaleDefault]; - } - return adResponse; -} - -- (void)dealloc { - [self unregisterViewFromTracking]; -} - -@end diff --git a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.h b/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.h deleted file mode 100644 index b510e9c73..000000000 --- a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2013 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - - -#import "ANAdAdapterMillennialMediaBase.h" - -@interface ANAdAdapterBannerMillennialMedia : ANAdAdapterMillennialMediaBase - -@end diff --git a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.m b/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.m deleted file mode 100644 index badfb4fba..000000000 --- a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterBannerMillennialMedia.m +++ /dev/null @@ -1,169 +0,0 @@ -/* Copyright 2013 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterBannerMillennialMedia.h" -#import - - -#if __has_include() -#import -#else -#import "ANLogging.h" -#endif - - -@interface ANAdAdapterBannerMillennialMedia () - -@property (nonatomic, readwrite, strong) MMInlineAd *inlineAd; -@property (nonatomic, readwrite, weak) UIViewController *rootViewController; - -@end - -@implementation ANAdAdapterBannerMillennialMedia -@synthesize delegate; - -#pragma mark ANCustomAdapterBanner - -- (void)requestBannerAdWithSize:(CGSize)size - rootViewController:(nullable UIViewController *)rootViewController - serverParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogTrace(@"%@ %@ | Requesting MillennialMedia banner with size %fx%f", - NSStringFromClass([self class]), NSStringFromSelector(_cmd), size.width, size.height); - if (!idString) { - [self.delegate didFailToLoadAd:ANAdResponseCode.UNABLE_TO_FILL]; - return; - } - [self configureMillennialSettingsWithTargetingParameters:targetingParameters]; - self.inlineAd = [[MMInlineAd alloc] initWithPlacementId:idString - size:size]; - self.inlineAd.delegate = self; - self.inlineAd.refreshInterval = MMInlineDisableRefresh; - self.rootViewController = rootViewController; - - MMRequestInfo *requestInfo = [[MMRequestInfo alloc] init]; - requestInfo.keywords = [[targetingParameters.customKeywords allValues] copy]; - - [self.inlineAd request:requestInfo]; -} - -- (void)dealloc { - self.inlineAd.delegate = nil; -} - -#pragma mark - MMInlineDelegate - -- (UIViewController * __nonnull)viewControllerForPresentingModalView { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - return self.rootViewController; -} - -- (void)inlineAdRequestDidSucceed:(MMInlineAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - if (self.inlineAd.view) { - [self.delegate didLoadBannerAd:self.inlineAd.view]; - } else { - [self.delegate didFailToLoadAd:ANAdResponseCode.UNABLE_TO_FILL]; - } -} - -- (void)inlineAd:(MMInlineAd * __nonnull)ad requestDidFailWithError:(NSError * __nonnull)error { - ANLogDebug(@"MillennialMedia banner failed to load with error: %@", error); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - - switch (error.code) { - case MMSDKErrorServerResponseBadStatus: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case MMSDKErrorServerResponseNoContent: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case MMSDKErrorPlacementRequestInProgress: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case MMSDKErrorRequestsDisabled: - ANLogDebug(@"%@ - MMSDKErrorRequestsDisabled", NSStringFromSelector(_cmd)); - code = ANAdResponseCode.MEDIATED_SDK_UNAVAILABLE; - break; - case MMSDKErrorNoFill: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case MMSDKErrorVersionMismatch: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case MMSDKErrorMediaDownloadFailed: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case MMSDKErrorRequestTimeout: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case MMSDKErrorNotInitialized: - ANLogDebug(@"%@ - MMSDKErrorNotInitialized", NSStringFromSelector(_cmd)); - code = ANAdResponseCode.INTERNAL_ERROR; - break; - default: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - } - - [self.delegate didFailToLoadAd:code]; -} - -- (void)inlineAdContentTapped:(MMInlineAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate adWasClicked]; -} - -- (void)inlineAd:(MMInlineAd * __nonnull)ad - willResizeTo:(CGRect)frame - isClosing:(BOOL)isClosingResize { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)inlineAd:(MMInlineAd * __nonnull)ad - didResizeTo:(CGRect)frame - isClosing:(BOOL)isClosingResize { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)inlineAdWillPresentModal:(MMInlineAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willPresentAd]; -} - -- (void)inlineAdDidPresentModal:(MMInlineAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didPresentAd]; -} - -- (void)inlineAdWillCloseModal:(MMInlineAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willCloseAd]; -} - -- (void)inlineAdDidCloseModal:(MMInlineAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didCloseAd]; -} - -- (void)inlineAdWillLeaveApplication:(MMInlineAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willLeaveApplication]; -} - -@end diff --git a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.h b/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.h deleted file mode 100644 index 9ff33deed..000000000 --- a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2013 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - - -#import "ANAdAdapterMillennialMediaBase.h" - -@interface ANAdAdapterInterstitialMillennialMedia : ANAdAdapterMillennialMediaBase - -@end diff --git a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.m b/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.m deleted file mode 100644 index e64646ea8..000000000 --- a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterInterstitialMillennialMedia.m +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright 2013 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterInterstitialMillennialMedia.h" -#import - -#if __has_include() -#import -#else -#import "ANLogging.h" -#endif - -@interface ANAdAdapterInterstitialMillennialMedia () -@property (nonatomic, readwrite, strong) MMInterstitialAd *interstitialAd; -@end - -@implementation ANAdAdapterInterstitialMillennialMedia -@synthesize delegate; - -#pragma mark ANCustomAdapterInterstitial - -- (void)requestInterstitialAdWithParameter:(nullable NSString *)parameterString - adUnitId:(nullable NSString *)idString - targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - if (!idString) { - [self.delegate didFailToLoadAd:ANAdResponseCode.UNABLE_TO_FILL]; - return; - } - [self configureMillennialSettingsWithTargetingParameters:targetingParameters]; - self.interstitialAd = [[MMInterstitialAd alloc] initWithPlacementId:idString]; - self.interstitialAd.delegate = self; - if (self.isReady) { - ANLogDebug(@"MillennialMedia interstitial was already available, attempting to load cached ad"); - [self.delegate didLoadInterstitialAd:self]; - return; - } - - MMRequestInfo *requestInfo = [[MMRequestInfo alloc] init]; - requestInfo.keywords = [[targetingParameters.customKeywords allValues] copy]; - - [self.interstitialAd load:requestInfo]; -} - -- (void)presentFromViewController:(UIViewController *)viewController { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - if (![self isReady]) { - ANLogDebug(@"MillennialMedia interstitial no longer available, failed to present ad"); - [self.delegate failedToDisplayAd]; - return; - } - - [self.interstitialAd showFromViewController:viewController]; -} - -- (BOOL)isReady { - return self.interstitialAd.ready && !self.interstitialAd.expired; -} - -- (void)dealloc { - self.interstitialAd.delegate = nil; -} - -#pragma mark - MMInterstitialDelegate - -- (void)interstitialAdLoadDidSucceed:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didLoadInterstitialAd:self]; -} - -- (void)interstitialAd:(MMInterstitialAd * __nonnull)ad loadDidFailWithError:(NSError * __nonnull)error { - ANLogDebug(@"MillennialMedia interstitial failed to load with error: %@", error); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - - switch (error.code) { - case MMSDKErrorServerResponseBadStatus: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case MMSDKErrorServerResponseNoContent: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case MMSDKErrorPlacementRequestInProgress: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case MMSDKErrorRequestsDisabled: - code = ANAdResponseCode.MEDIATED_SDK_UNAVAILABLE; - break; - case MMSDKErrorNoFill: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case MMSDKErrorVersionMismatch: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case MMSDKErrorMediaDownloadFailed: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case MMSDKErrorRequestTimeout: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case MMSDKErrorNotInitialized: - ANLogError(@"%@ - Millennial Media SDK Uninitialized", NSStringFromSelector(_cmd)); - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case MMSDKErrorInterstitialAdAlreadyLoaded: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case MMSDKErrorInterstitialAdContentUnavailable: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - default: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - } - - [self.delegate didFailToLoadAd:code]; -} - -- (void)interstitialAdWillDisplay:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)interstitialAdDidDisplay:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)interstitialAd:(MMInterstitialAd * __nonnull)ad showDidFailWithError:(NSError * __nonnull)error { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate failedToDisplayAd]; -} - -- (void)interstitialAdWillDismiss:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willCloseAd]; -} - -- (void)interstitialAdDidDismiss:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate didCloseAd]; -} - -- (void)interstitialAdDidExpire:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - // Do nothing -} - -- (void)interstitialAdTapped:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate adWasClicked]; -} - -- (void)interstitialAdWillLeaveApplication:(MMInterstitialAd * __nonnull)ad { - ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - [self.delegate willLeaveApplication]; -} - -@end diff --git a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.h b/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.h deleted file mode 100644 index 51d45f407..000000000 --- a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2013 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#if __has_include() -#import -#else -#import "ANCustomAdapter.h" -#endif - -@interface ANAdAdapterMillennialMediaBase : NSObject - -- (void)configureMillennialSettingsWithTargetingParameters:(ANTargetingParameters *)targetingParameters; - -+ (void)setMillennialSiteId:(NSString *)siteId; - - -@end diff --git a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.m b/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.m deleted file mode 100644 index cc8dc8bc2..000000000 --- a/mediation/discontinued/mediatedviews/MillennialMedia/ANAdAdapterMillennialMediaBase.m +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright 2013 APPNEXUS INC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "ANAdAdapterMillennialMediaBase.h" -#import - -@implementation ANAdAdapterMillennialMediaBase -@synthesize delegate; - - -static NSString *millennialSiteId = nil; -static BOOL hasMillennialBeenInvoked = NO; - - -- (void)configureMillennialSettingsWithTargetingParameters:(ANTargetingParameters *)targetingParameters { - static dispatch_once_t initializeMillennialToken; - dispatch_once(&initializeMillennialToken, ^{ - [[MMSDK sharedInstance] initializeWithSettings:[[MMAppSettings alloc] init] - withUserSettings:[[MMUserSettings alloc] init]]; - hasMillennialBeenInvoked = YES; - }); - - [ANAdAdapterMillennialMediaBase assignMillennialSiteId]; - - MMUserSettings *userSettings = [[MMSDK sharedInstance] userSettings]; - - ANGender gender = targetingParameters.gender; - switch (gender) { - case ANGenderMale: - userSettings.gender = MMGenderMale; - break; - case ANGenderFemale: - userSettings.gender = MMGenderFemale; - break; - case ANGenderUnknown: - userSettings.gender = MMGenderOther; - default: - break; - } - - NSString *age = targetingParameters.age; - if (age) { - NSNumberFormatter *numberFormatter = [NSNumberFormatter new]; - [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; - NSNumber *ageNumber = [numberFormatter numberFromString:age]; - if (ageNumber) { - userSettings.age = ageNumber; - } - } - - if (targetingParameters.location) { - [MMSDK sharedInstance].sendLocationIfAvailable = YES; - } -} - -+ (void) assignMillennialSiteId { - MMAppSettings *appSettings = [[MMSDK sharedInstance] appSettings]; - - if (appSettings) { - appSettings.siteId = millennialSiteId; - } -} - -+ (void) setMillennialSiteId:(NSString *)siteId { - millennialSiteId = siteId; - - if (hasMillennialBeenInvoked) { - [ANAdAdapterMillennialMediaBase assignMillennialSiteId]; - } -} - -@end diff --git a/mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/CHANGELOG.txt b/mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/CHANGELOG.txt deleted file mode 100644 index f0e22a908..000000000 --- a/mediation/discontinued/mediatedviews/MillennialMedia/MillennialMediaSDK/CHANGELOG.txt +++ /dev/null @@ -1,39 +0,0 @@ -Changelog ----------------------------------- -6.3.1 -- iOS 10 compatibility updates -- Improved ATS support to comply with Apple's new security requirements -- Updated Moat library to version 2.6.13 that fixes the use of private APIs -- Removed requirements for CoreBluetooth and StoreKit frameworks - -6.3.0 -- Added support for HTML ads with ')))},appendPresenceIframe_:function(e){var t=e.document.createElement("iframe");t.id=module$exports$omid$common$DetectOmid.OMID_PRESENT_FRAME_NAME,t.name=module$exports$omid$common$DetectOmid.OMID_PRESENT_FRAME_NAME,t.style.display="none",e.document.body.appendChild(t)},isMutationObserverAvailable_:function(e){return"MutationObserver"in e},registerMutationObserver_:function(e){var t=new MutationObserver((function(n){n.forEach((function(n){"BODY"===n.addedNodes[0].nodeName&&(module$exports$omid$common$DetectOmid.appendPresenceIframe_(e),t.disconnect())}))}));t.observe(e.document.documentElement,{childList:!0})}},module$exports$omid$common$serviceCommunication={},module$contents$omid$common$serviceCommunication_EXPORTED_SESSION_COMMUNICATION_NAME=["omid","v1_SessionServiceCommunication"],module$contents$omid$common$serviceCommunication_EXPORTED_VERIFICATION_COMMUNICATION_NAME=["omid","v1_VerificationServiceCommunication"],module$contents$omid$common$serviceCommunication_EXPORTED_SERVICE_WINDOW_NAME=["omidVerificationProperties","serviceWindow"];function module$contents$omid$common$serviceCommunication_getValueForKeypath(e,t){return t.reduce((function(e,t){return e&&e[t]}),e)}function module$contents$omid$common$serviceCommunication_startServiceCommunication(e,t,n,i){if(!(0,module$exports$omid$common$windowUtils.isCrossOrigin)(t))try{var o=module$contents$omid$common$serviceCommunication_getValueForKeypath(t,n);if(o)return new module$exports$omid$common$DirectCommunication(o)}catch(e){}return i(t)?new module$exports$omid$common$PostMessageCommunication(e,t):null}function module$contents$omid$common$serviceCommunication_startServiceCommunicationFromCandidates(e,t,n,i){for(var o=(t=$jscomp.makeIterator(t)).next();!o.done;o=t.next())if(o=module$contents$omid$common$serviceCommunication_startServiceCommunication(e,o.value,n,i))return o;return null}module$exports$omid$common$serviceCommunication.startSessionServiceCommunication=function(e,t,n){n=void 0===n?module$exports$omid$common$DetectOmid.isOmidPresent:n;var i=[e,(0,module$exports$omid$common$windowUtils.resolveTopWindowContext)(e)];return t&&i.unshift(t),module$contents$omid$common$serviceCommunication_startServiceCommunicationFromCandidates(e,i,module$contents$omid$common$serviceCommunication_EXPORTED_SESSION_COMMUNICATION_NAME,n)},module$exports$omid$common$serviceCommunication.startVerificationServiceCommunication=function(e,t){t=void 0===t?module$exports$omid$common$DetectOmid.isOmidPresent:t;var n=[],i=module$contents$omid$common$serviceCommunication_getValueForKeypath(e,module$contents$omid$common$serviceCommunication_EXPORTED_SERVICE_WINDOW_NAME);return i&&n.push(i),n.push((0,module$exports$omid$common$windowUtils.resolveTopWindowContext)(e)),module$contents$omid$common$serviceCommunication_startServiceCommunicationFromCandidates(e,n,module$contents$omid$common$serviceCommunication_EXPORTED_VERIFICATION_COMMUNICATION_NAME,t)};var module$contents$omid$sessionClient$AdSession_SESSION_CLIENT_VERSION=module$exports$omid$common$version.Version,module$exports$omid$sessionClient$AdSession=function(e,t,n){module$exports$omid$common$argsChecker.assertNotNullObject("AdSession.context",e),this.context_=e,this.impressionOccurred_=!1;var i=this.context_.serviceWindow||void 0;this.communication_=t||(0,module$exports$omid$common$serviceCommunication.startSessionServiceCommunication)((0,module$exports$omid$common$windowUtils.resolveGlobalContext)(),i),this.sessionInterface_=n||new module$exports$omid$sessionClient$OmidJsSessionInterface,this.isSessionRunning_=this.hasMediaEvents_=this.hasAdEvents_=!1,this.impressionType_=this.creativeType_=null,this.creativeLoaded_=!1,this.callbackMap_={},this.communication_&&(this.communication_.onMessage=this.handleInternalMessage_.bind(this)),this.setClientInfo_(),this.injectVerificationScripts_(e.verificationScriptResources),this.sendSlotElement_(e.slotElement),this.sendVideoElement_(e.videoElement),this.sendContentUrl_(e.contentUrl),this.watchSessionEvents_()};module$exports$omid$sessionClient$AdSession.prototype.setCreativeType=function(e){if(e===module$exports$omid$common$constants.CreativeType.DEFINED_BY_JAVASCRIPT)throw Error("Creative type cannot be redefined with value "+module$exports$omid$common$constants.CreativeType.DEFINED_BY_JAVASCRIPT);if(this.impressionOccurred_)throw Error("Impression has already occurred");if(this.creativeLoaded_)throw Error("Creative has already loaded");if(this.creativeType_&&this.creativeType_!==module$exports$omid$common$constants.CreativeType.DEFINED_BY_JAVASCRIPT)throw Error("Creative type cannot be redefined");if(void 0===this.creativeType_)throw Error("Native integration is using OMID 1.2 or earlier");this.sendOneWayMessage("setCreativeType",e),this.creativeType_=e},module$exports$omid$sessionClient$AdSession.prototype.setImpressionType=function(e){if(e===module$exports$omid$common$constants.ImpressionType.DEFINED_BY_JAVASCRIPT)throw Error("Impression type cannot be redefined with value "+module$exports$omid$common$constants.ImpressionType.DEFINED_BY_JAVASCRIPT);if(this.impressionOccurred_)throw Error("Impression has already occurred");if(this.creativeLoaded_)throw Error("Creative has already loaded");if(this.impressionType_&&this.impressionType_!==module$exports$omid$common$constants.ImpressionType.DEFINED_BY_JAVASCRIPT)throw Error("Impression type cannot be redefined");if(void 0===this.impressionType_)throw Error("Native integration is using OMID 1.2 or earlier");this.sendOneWayMessage("setImpressionType",e),this.impressionType_=e},module$exports$omid$sessionClient$AdSession.prototype.isSupported=function(){return!!this.communication_||this.sessionInterface_.isSupported()},module$exports$omid$sessionClient$AdSession.prototype.isSendingElementsSupported_=function(){return this.communication_?this.communication_.isDirectCommunication():this.sessionInterface_.isSupported()},module$exports$omid$sessionClient$AdSession.prototype.registerSessionObserver=function(e){this.sendMessage("registerSessionObserver",e)},module$exports$omid$sessionClient$AdSession.prototype.start=function(){this.sendOneWayMessage("startSession",{customReferenceData:this.context_.customReferenceData,underEvaluation:this.context_.underEvaluation})},module$exports$omid$sessionClient$AdSession.prototype.finish=function(){this.sendOneWayMessage("finishSession")},module$exports$omid$sessionClient$AdSession.prototype.error=function(e,t){this.sendOneWayMessage("sessionError",e,t)},module$exports$omid$sessionClient$AdSession.prototype.registerAdEvents=function(){if(this.hasAdEvents_)throw Error("AdEvents already registered.");this.hasAdEvents_=!0,this.sendOneWayMessage("registerAdEvents")},module$exports$omid$sessionClient$AdSession.prototype.registerMediaEvents=function(){if(this.hasMediaEvents_)throw Error("MediaEvents already registered.");this.hasMediaEvents_=!0,this.sendOneWayMessage("registerMediaEvents")},module$exports$omid$sessionClient$AdSession.prototype.sendOneWayMessage=function(e,t){for(var n=[],i=1;i0?e.click(o.url):e.click():t({name:"ad-click",trackClick:!0}):r[i]&&t({name:r[i]}),e.notifyVpaidEvent(i),"AdVideoComplete"===i&&e.adVideoPlayer.trigger("customDestroy")},delayExpandUntilVPAIDImpression:n.delayExpandUntilVPAIDImpression,vpaidEnvironmentVars:n.vpaidEnvironmentVars,overlayPlayer:n.overlayPlayer,mobileSDK:n.mobileSDK,initialPlayback:n.initialPlayback,controlBarPosition:n.controlBarPosition}),w=function(){if(e.options.overlayPlayer){var t=A,n=i.isAndroid()?1e3:500;setTimeout((function(){t.paused()&&t.tech&&t.tech.el()&&t.tech.el().src&&t.trigger("pause")}),n)}};if(A.on("reset",(function(){A.options().plugins["ads-setup"].adsEnabled?b.enable():b.disable()})),A.on("vast.adError",(function(t){if(!0!==v){v=!0,A.loadingSpinner.hide(),e.destroyWithoutSkip(!0,"VAST AdError reported from JS VPAID player",!1,901);var n=t.error;n&&n.message&&c("JS-VPAID Error (vast.adError)"+n.message)}})),A.on("vpaid.AdVideoStart",(function(){var t=e&&e.adVideoPlayer&&e.adVideoPlayer.player?e.adVideoPlayer.player().duration():0;if(e.test("VIDLA509",t),t&&t>0)e.setVastAttribute();else{var n=!1;A.one("loadedmetadata",(function(){if(n=!0,t=e&&e.adVideoPlayer&&e.adVideoPlayer.player?e.adVideoPlayer.player().duration():0,e.test("VIDLA509",t),t&&t>0)e.setVastAttribute();else{var i=e.options.data.vastDurationMsec;i=i&&i>0?Math.round(i/1e3):0,e.test("VIDLA509-2",i),e.setVastAttribute(i)}})),setTimeout((function(){if(!1===n){var t=e.options.data.vastDurationMsec;t=t&&t>0?Math.round(t/1e3):0,e.test("VIDLA509-2",t),e.setVastAttribute(t)}}),3e3)}})),A.on("vast.adTimeout",(function(){A.loadingSpinner.hide(),e.destroyWithoutSkip(!0,"VPAID AdError reported from JS VPAID player",!0,901)})),A.on("vpaid.AdError",(function(t){if(!0!==v){v=!0,A.loadingSpinner.hide(),e.destroyWithoutSkip(!0,"VPAID AdError reported from JS VPAID player",!1,901);var n=t.error;n&&n.message&&c("JS-VPAID Error (vpaid.AdError) "+n.message)}})),A.on("vast.adSkip",(function(){e.destroy(),c("vast.adSkip")})),A.on("vpaid.AdSkipped",(function(){e.destroy(),c("vpaid.AdSkipped")})),A.on("vpaid.AdIcons",(function(t){t&&t.hasOwnProperty("adIcons")&&t.adIcons||(e.options.showVpaidIcons=!0)})),A.on("vast.adsCancel",(function(){v||(v=!0,e.destroyWithoutSkip(),c("adsCancel"))})),A.on("vpaid.AdStopped",(function(){c("vpaid.AdStopped"),!0!==n.disableCollapse.replay?(A.loadingSpinner.hide(),A.controlBar.hide(),A.bigPlayButton.hide(),e.isCompleted||(n.disableCollapse.enabled||e.destroyWithoutSkip(),e.isCompleted=!0)):e.resetVpaid()})),A.one("vpaid.AdStarted",(function(){w(),m&&n.overlayPlayer&&("edge"===f||"ie"===f?m.style.visibility="visible":m.style.display="block"),A.loadingSpinner.hide()})),A.one("vpaid.AdImpression",(function(){w(),A.controlBar.show(),n.showBigPlayButton&&A.bigPlayButton.show()})),h.cbWhenReady){var T=function(){e.test("VIDLA509-1",""),c("callcbWhenReady (Impression, AdStarted are delivered"),e.isReadyToExpandForMobile=!0,A.tech.removeControlsListeners();var t=e.options.width/e.options.height;e.resizeVideo(t,i.isMobile()),n.isWaterfall&&n.firstAdAttempted&&n.delayExpandUntilVPAIDInit&&!n.isExpanded&&"auto"!==n.initialPlayback&&A.bigPlayButton.show(),"function"==typeof h.cbWhenReady&&h.cbWhenReady(e)},k=function(){n.delayExpandUntilVPAIDImpression?function(){var t=!1,n=A.volume(),o=!1,r=!1,a=!1,s=!1,l=function(){o&&r&&a&&!1===t&&(t=!0,setTimeout(T,500))};if(i.isIos()){A.on("timeupdate",(function(){A.player().currentTime()>0&&!1===s&&!1===e.isAlreadyPlaingForVPAID&&(s=!0,a=!0,A.pause(),l(),c("pause by timeupdate when delayExpandUntilVPAIDImpression is true"))}));var d=function(){A.player().currentTime()>0&&!1===s&&!1===e.isAlreadyPlaingForVPAID&&(s=!0,a=!0,A.pause(),l(),c("pause by timer when delayExpandUntilVPAIDImpression is true")),t||setTimeout(d,100)};setTimeout(d,100)}else A.one("vpaid.AdVideoStart",(function(){!1===e.isAlreadyPlaingForVPAID&&A.pause(),A.volume(n),a=!0,l()}));A.one("vpaid.AdStarted",(function(){o=!0,l()})),A.one("vpaid.AdImpression",(function(){r=!0,l()})),A.volume(0),e.delayEventHandler.ignoreNextQueue(),i.isIos()?(e.adVideoPlayer.trigger("play"),e.isDoneInitialPlay=!0):A.play()}():T()};n.isWaterfall&&n.firstAdAttempted?A.one("an.doneInitialize",k):n.delayExpandUntilVPAIDInit?A.one("an.readytogovpaid",k):A.one("an.doneInitialize",k)}}))}},function(e,t,n){n(12).always("UserAgentParser","Version 0.0.1");var i=function(e,t){var n="model",o="name",r="type",a="vendor",s="version",l="mobile",d="tablet",c={extend:function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},u={rgx:function(){var e,t,n,i,o,r,a={},s=0,l=arguments;for(n=0;n0?2===i.length?"function"==typeof i[1]?a[i[0]]=i[1].call(this,r):a[i[0]]=i[1]:3===i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?a[i[0]]=r?r.replace(i[1],i[2]):void 0:a[i[0]]=r?i[1].call(this,r,i[2]):void 0:4===i.length&&(a[i[0]]=r?i[3].call(this,r.replace(i[1],i[2])):void 0):a[i]=r||void 0;s+=2}return a},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var i=0;i0&&t.explicitUnmute():t.explicitMute()};n.controlBar.muteToggle.on("click",l),n.controlBar.muteToggle.on("touchend",l)}else r("removing mute button"),n.controlBar.muteToggle.dispose();if(!0===e.options.showVolume&&e.displayVolumeControls()&&n.controlBar.volumeControl.volumeBar.on("mousedown",(function(){var e=n.volume();e<=0&&!t.isMuted&&(r("muting from volume scrubber"),t.explicitMute()),e>0&&t.isMuted&&(r("unmuting from volume scrubber"),t.explicitUnmute())})),i.isIos()&&e.options.enableNativeInline&&parseInt(i.getIOSVersion())>9&&"click"!==e.options.initialPlayback&&(n.muted(!0),n.controlBar.muteToggle.update()),"boolean"==typeof e.options.customButton.enabled&&!0===e.options.customButton.enabled){var d=e.options.playerSkin.controlBarHeight||30,c=Math.min(50,e.options.customButton.imgWidth),u=Math.min(d,e.options.customButton.imgHeight),p=Math.floor((d-u)/2),h="a";e.isMobile()&&(h="span");var m=e.videojsOrigin.createEl("div",{innerHTML:"<"+h+' href="'+e.options.customButton.url+'" target="_blank">'+e.options.customButton.altText+'",role:"button","aria-live":"polite",tabindex:"0"});m.style.cssText="float:right;font-family:VideoJS;font-size:1.5em;line-height:2;width:50px;height:100%;text-align:center",n.controlBar.addChild("button",{el:m}),n.controlBar.el().insertBefore(m,n.controlBar.fullscreenToggle.el())}n.controlBar.progressControl.seekBar.seekHandle.hide(),n.controlBar.progressControl.seekBar.el_.style.pointerEvents="none","boolean"==typeof e.options.showProgressBar?(!1===e.options.showProgressBar&&(r("removing progress bar"),n.controlBar.currentTimeDisplay.hide(),n.controlBar.timeDivider.hide(),n.controlBar.durationDisplay.hide()),n.controlBar.progressControl.seekBar.hide()):"text"===e.options.showProgressBar?(r("removing progress text"),n.controlBar.progressControl.seekBar.hide()):"bar"===e.options.showProgressBar&&(r("removing progress bar"),n.controlBar.currentTimeDisplay.hide(),n.controlBar.timeDivider.hide(),n.controlBar.durationDisplay.hide()),!1===e.options.allowFullscreen&&(r("removing fullscreen toggle"),n.controlBar.fullscreenToggle.addClass("vjs-hidden")),e.isMobile()&&!0===e.options.allowFullscreen&&!0===e.options.showMute&&(n.controlBar.fullscreenToggle.el().style.visibility="hidden",n.controlBar.muteToggle.el().style.visibility="visible"),e.options.targetElement.addEventListener("outstream-impression",(function(){e.isMobile()&&!0===e.options.allowFullscreen&&!0===e.options.showMute&&(n.controlBar.fullscreenToggle.el().style.visibility="visible",n.controlBar.muteToggle.el().style.visibility="visible")})),e.options.targetElement.addEventListener("vastplayer-impression",(function(){e.isMobile()&&!0===e.options.allowFullscreen&&!0===e.options.showMute&&(n.controlBar.fullscreenToggle.el().style.visibility="visible",n.controlBar.muteToggle.el().style.visibility="visible")}))}}}},function(e,t,n){var i=n(12);e.exports=function(e,t){return{init:function(n,o,r,a,s){var l;l="init",i.verbose("[PlayerManager_AdIndicator]",l),r.id="ad_indicator_text",r.innerHTML=e.adIndicatorTextContent,r.className="top-bar-text",r.role="button";var d="3em";if(e.isMobile()&&(d="5em"),r.style["text-align"]="right",r.style["margin-right"]="1em",r.style["margin-left"]="1em",r.style["font-size"]="1em",r.style.right="0px",r.style.left="",r.style["line-height"]="24px",r.style.outline="0",r.style.position="absolute",r.style.padding="0",r.style.height="auto",r.style.width="auto",r.style["max-width"]="35%",r.style["white-space"]="nowrap",r.style.overflow="hidden",r.style["text-overflow"]="ellipsis",s?r.style.cursor="pointer":r.style["pointer-events"]="none",a.style["text-align"]="right",a.style["margin-right"]="1em",a.style["margin-left"]="1em",a.style["font-size"]="1em",a.style.right="0px",a.style.left="",a.style["line-height"]="3em",a.style.outline="0",a.style.position="absolute",a.style.padding="0",a.style.height=d,a.style["max-width"]="35%",a.style.width="auto",a.style["text-overflow"]="ellipsis",a.style["white-space"]="nowrap",a.style.overflow="hidden",a.style.display="none",s){a.style.cursor="pointer";var c=function(n){t.click(),e.isMobile()&&(n.stopPropagation(),n.preventDefault())};r.addEventListener("touchend",c),a.addEventListener("touchend",c),r.addEventListener("click",c),a.addEventListener("click",c)}else a.style["pointer-events"]="none";n.addChild("button",{el:a})}}}},function(e,t,n){var i=n(12),o=n(11),r=function(e){i.debug("[PlayerManager_Skip]",e)};e.exports=function(e,t){return{init:function(n,a,s,l,d){var c,u,p;if(r("init"),!0===e.options.skippable.enabled){p="creating and styling skip buttons and skip texts",i.verbose("[PlayerManager_Skip]",p);var h=e.options.skippable.videoThreshold,m=e.options.skippable.skipText,v=e.options.skippable.skipButtonText;(c=d.contentWindow.document.createElement("div")).id="skip_button",c.innerHTML=v,c.className="top-bar-text",c.role="button";var f="";e.isMobile()&&(f="5.0em"),c.style.display="none",c.style.cursor="pointer",c.style["font-weight"]="bold",c.style["margin-right"]="1em",c.style["margin-left"]="1em",c.style["font-size"]="1em",c.style.right="",c.style.left="0px",c.style["line-height"]="24px",c.style.outline="0",c.style.position="absolute",c.style.padding="0",c.style.height=f,c.style.width="auto",c.style["min-width"]="5em",c.style["text-align"]="left",e.floatingSkipButton=e.videojsOrigin.createEl("div",{className:"top-bar-text",role:"button",innerHTML:v}),e.floatingSkipButton.style.display="none",e.floatingSkipButton.style.cursor="pointer",e.floatingSkipButton.style["font-weight"]="bold",e.floatingSkipButton.style["margin-right"]="1em",e.floatingSkipButton.style["margin-left"]="1em",e.floatingSkipButton.style["font-size"]="1em",e.floatingSkipButton.style.right="",e.floatingSkipButton.style.left="0px",e.floatingSkipButton.style["line-height"]="3em",e.floatingSkipButton.style.outline="0",e.floatingSkipButton.style.position="absolute",e.floatingSkipButton.style.padding="0",e.floatingSkipButton.style.height=f,e.floatingSkipButton.style["min-width"]="5em",e.floatingSkipButton.style.width="auto",e.floatingSkipButton.style.display="none",e.floatingSkipButton.style["text-align"]="left",l.addChild("button",{el:e.floatingSkipButton});var g=function(n){if(r("SKIP clicked, destroying player"),e.options.vpaid)return l.trigger("skip"),void(e.isMobile()&&(n.stopPropagation(),n.preventDefault(),e.options.overlayPlayer&&t.destroy()));t.destroy(),e.isMobile()&&(n.stopPropagation(),n.preventDefault(),t.isCompleted=!0)};switch(e.isMobile()&&(c.addEventListener("touchend",g),e.floatingSkipButton.addEventListener("touchend",g),e.floatingSkipButton.addEventListener("mousedown",(function(e){e.preventDefault()}))),c.addEventListener("click",g),e.floatingSkipButton.addEventListener("click",g),e.floatingAdSkipText=e.videojsOrigin.createEl("div",{className:"top-bar-text",role:"button",innerHTML:""}),e.floatingAdSkipText.style["margin-left"]="1em",e.floatingAdSkipText.style["margin-right"]="1em",e.floatingAdSkipText.style.right="",e.floatingAdSkipText.style.left="0px",e.floatingAdSkipText.style["font-size"]="1em",e.floatingAdSkipText.style["line-height"]="3em",e.floatingAdSkipText.style.outline="0",e.floatingAdSkipText.style.position="absolute",e.floatingAdSkipText.style["text-align"]="left",e.floatingAdSkipText.style.padding="0",e.floatingAdSkipText.style.height="3em",e.floatingAdSkipText.style.width="auto",e.floatingAdSkipText.style["pointer-events"]="none",e.floatingAdSkipText.style.display="none",l.addChild("button",{el:e.floatingAdSkipText}),(u=d.contentWindow.document.createElement("div")).id="ad_skip_text",u.innerHTML=v,u.className="top-bar-text",u.role="button",u.style["margin-left"]="1em",u.style["margin-right"]="1em",u.style.right="",u.style.left="0px",u.style["font-size"]="1em",u.style["line-height"]="24px",u.style.outline="0",u.style.position="absolute",u.style["text-align"]="left",u.style.padding="0",u.style.height="3em",u.style.width="auto",u.style["pointer-events"]="none",u.style.display="none",e.options.skippable.skipLocation){case"top-right":c.style.right="0px",c.style.left="",c.style["text-align"]="right",u.style.right="0px",u.style.left="",e.floatingSkipButton.style.right="0px",e.floatingSkipButton.style.left="",e.floatingSkipButton.style["text-align"]="right",e.floatingAdSkipText.style.right="0px",e.floatingAdSkipText.style.left=""}var y=!1,A=!1,b=!1,w={},T=function(){var n,i=Math.round(l.player().currentTime()),r=Math.round(l.player().duration()),a=(n=t.options.skippable.allowOverride?Math.round(e.options.data.skipOffsetMsec/1e3):e.options.skippable.videoOffset)-i,d=!e.options.skippable.allowOverride||e.options.data.isVastVideoSkippable;if(d=!(n>r)&&d,t.test("VIDLA163_needToShowSkip",d),h0&&(!t.startedReplay&&!t.isEnded||p)?(e.floatingAdSkipText.innerHTML=m.replace("%%TIME%%",a),c.style.display="none",u.innerHTML=m.replace("%%TIME%%",a),u.style.display="block",o.elementsOverlap(u,s)&&(u.style.display="none")):(e.readyForSkip||(t.test("log",i),t.test("VIDLA163_skip",i)),e.readyForSkip=!0,t.isFullscreen&&!e.pendingFullscreenExit&&(e.floatingAdSkipText.style.display="none",e.floatingSkipButton.style.display="block"),u.style.display="none",c.style.display="block",p&&Math.abs(r-i)<.1&&(c.style.display="none"))}};l.on("resize",(function(){T()})),l.on("timeupdate",(function(){var n=t.options.data.vastProgressEvent;if(!e.options.isWaterfall||!e.options.vpaid||e.options.vpaidImpressionFired){var i=1e3*Math.round(l.player().currentTime());if(n&&"object"==typeof n){var o=function(){t.test("VIDLA163_Tracking",w)};for(var r in n){var a=n[r];if("number"==typeof a&&a>=0&&i>=a&&-1===Object.keys(w).indexOf(r)){w[r]=a;var s={};s.name=r,s.name&&t.dispatchEventToAdunit(s,o)}}}T()}}))}if(e.options.skippable&&e.options.skippable.skipLocation)switch(e.options.skippable.skipLocation){case"top-right":s.style.right="",s.style.left="0px",a.style.right="",a.style.left="0px"}!e.options.disableTopBar&&n&&(!0===e.options.skippable.enabled&&(n.appendChild(c),n.appendChild(u)),n.appendChild(s)),l.on("timeupdate",(function(){if(!e.options.vpaid){var t=Math.round(l.player().currentTime()),n=l.player().duration();if(n){var i=n/4*2,o=n/4*3;!y&&t>=n/4&&t=i&&t=o&&(e.dispatchEventToAdunit({name:"video-third-quartile"}),b=!0)}}}))}}}},function(e,t,n){var i=n(12),o=function(e){i.debug("[PlayerManager_EndCardSetup]",e)},r=n(27);e.exports=function(e,t){return{init:function(n){if(o("init"),e.options.endCard.enabled){var i=e.options.endCard;if(i.showDefaultButtons){for(var a=-1,s=0;s=0&&i.buttons.splice(a,1)}o("Creating EndCard."),t.endCard=new r(i,n,t)}}}}},function(e,t,n){var i=n(28),o=n(12),r=function(e){o.debug("[EndCard]",e)},a=function(e,t,n){this.layers=[],this.buttons=[],this.options=e,this.vjsPlayer=t,this.playerManager=n,this.firedCreativeView=!1,this.onLayerClick=function(e){e.stopPropagation(),e.target===e.currentTarget&&n.click()},e.layers=[{type:"videoAd"}],e.layers.push({type:"color",width:"100%",height:"100%",color:e.color}),e.layers.push({type:"companionAd"}),e.layers.push({type:"image",width:e.imageWidth,height:e.imageHeight,imageUrl:e.imageUrl}),this.createEndCardContainer(t.player().el_),this.createLayers(),this.createButtons()};a.prototype.styleForCentering=function(e,t,n){e.style.display="block",e.style.position="absolute",e.style.top=0,e.style.bottom=0,e.style.left=0,e.style.right=0,e.style.margin="auto",e.style.maxWidth=t||"100%",e.style.maxHeight=n||"100%",t&&(e.style.width=t),n&&(e.style.height=n)},a.prototype.styleSizeLimitScaleDown=function(e,t,n){var i=this,o=e.elem,r=function(){t=t||i.endCardElem.offsetWidth,n=n||i.endCardElem.offsetHeight;var a=o.offsetWidth,s=o.offsetHeight;if(t&&n&&a&&s){var l;if(t/nt&&(d*=a=t/d,c*=a),c>n&&(d*=a=n/c,c*=a);else if(d>t||c>n){r("xxx Skipping Companion: ["+h+"] - Companion size ("+d+"x"+c+") won't fit in ad unit.");continue}(l=Math.abs(d*c-p))e||i.companionAd.height>t?i.elem.style.display="none":i.elem.style.display="block"):"image"===i.type&&i.elem.style}},a.prototype.saveSetStyle=function(e,t,n){void 0!==n&&(e.styleSave||(e.styleSave={}),e.elem&&(void 0===e.styleSave[t]&&(e.styleSave[t]=e.elem.style[t]),e.elem.style[t]=n))},a.prototype.restoreStyle=function(e){if(e.styleSave){if(e.elem)for(var t in e.styleSave)e.elem.style[t]=e.styleSave[t];delete e.styleSave}},a.prototype.createEndCardContainer=function(e){this.endCardElem||(this.endCardElem=e.ownerDocument.createElement("div"),e.appendChild(this.endCardElem),this.endCardElem.className="video-js vjs-default-skin vjs-controls-enabled vjs-big-play-centered vjs-has-started vjs-paused vjs-ended vjs-user-active",this.playerManager.isIosInlineRequired()?(this.endCardElem.style["background-color"]="",this.endCardElem.style.background=this.playerManager.options.playerSkin.videoBackgroundColor,this.endCardElem.style.opacity=1):this.endCardElem.style["background-color"]="rgba(0,0,0,0)",this.endCardElem.setAttribute("name","endCardContainer"),this.endCardElem.style.width="100%",this.endCardElem.style.height="100%",this.endCardElem.style.display="none",this.endCardElem.style.cursor=this.options.clickable?"pointer":"default",this.endCardElem.style.position="relative",this.endCardElem.style["text-align"]="center",this.options.clickable&&(this.endCardElem.onclick=this.onLayerClick))},a.prototype.createImageLayer=function(e,t){var n={},i=e.ownerDocument.createElement("img");e.appendChild(i),i.setAttribute("name","ecImageLayer"),i.id=t.id||"endCardImageLayer",i.setAttribute("src",t.imageUrl||""),i.style.cursor=this.options.clickable?"pointer":"default",this.styleForCentering(i,t.width,t.height),i.style.display="none",n.elem=i,n.opts=t,this.layers.push(n)},a.prototype.createColorLayer=function(e,t){var n={},i=e.ownerDocument.createElement("div");e.appendChild(i),i.setAttribute("name","ecColorLayer"),i.id=t.id||"endCardColorLayer",i.style["background-color"]=t.color||"black",i.style.cursor=this.options.clickable?"pointer":"default",this.styleForCentering(i,t.width||"100%",t.height||"100%"),t.color||(i.style.display="none"),n.elem=i,n.opts=t,this.layers.push(n)},a.prototype.createAdVideoLayer=function(e,t){if(void 0===this.videoLayer){var n={};n.elem=e,n.opts=t,e&&this.playerManager.isIosInlineRequired()&&(n.videoParent=e.parentElement,n.videoSibling=e.nextSibling),this.videoLayer=this.layers.length,this.layers.push(n)}else r("Can't create new video layer because one already exists!")},a.prototype.createCompanionLayer=function(e,t){var n={},i=e.ownerDocument.createElement("div");e.appendChild(i),i.setAttribute("name","ecCompanionLayer"),i.id="endCardCompanionLayer",i.style.position="absolute",i.style.width=t.width||"100%",i.style.height=t.height||"100%",this.styleForCentering(i),i.style["background-color"]="rgba(0,0,0,0)",n.elem=i,n.opts=t,this.layers.push(n)},a.prototype.show=function(){if(this.vjsPlayer&&this.vjsPlayer.controlBar&&this.vjsPlayer.controlBar.hide(),void 0!==this.videoLayer){var e=this.layers[this.videoLayer],t=this.options.layers[this.videoLayer];e.elem&&(e.videoParent&&(this.videoLayer0?i.elem.style.display="none":i.opts.imageUrl&&(n.styleSizeLimitScaleDown(i),i.elem.style.display="block")),n.options.clickable&&i.elem&&(i.elem.addEventListener("click",n.onLayerClick),i.elem.style.cursor="pointer"))}})),this.endCardElem.style.display="block"},a.prototype.hide=function(){if(void 0!==this.videoLayer){var e=this.layers[this.videoLayer];this.restoreStyle(e),e.videoParent&&e.videoParent.insertBefore(e.elem,e.videoSibling)}for(var t=0;t ",a=function(e,t,i,o,r){var a=e,s=o,l=r,d={width:t,height:i},c=(new Date).getTime()+Math.floor(1e4*Math.random());l({command:"addTrackingEvents",uniqueId:c,data:s});var u=function(){s.CompanionClickTracking&&l({command:"requestTracking",uniqueId:c,data:"companion-click"}),s.hasOwnProperty("StaticResource")&&s.CompanionClickThrough&&window.open(s.CompanionClickThrough)},p=function(){s.TrackingEvents&&s.TrackingEvents.length>0&&l({command:"requestTracking",uniqueId:c,data:"creative-view"})},h=!0;if(s.hasOwnProperty("StaticResource")){var m=s.StaticResource.type;if("application/x-javascript"===m){var v=document.createElement("script");v.src=s.StaticResource.src,v.onload=p(),a.appendChild(v)}else if(0===m.indexOf("image")){var f=document.createElement("img");f.src=s.StaticResource.src,f.style.maxWidth="100%",f.style.maxHeight="100%",f.style.width="auto",f.style.height="auto",f.style.margin="auto",f.style.display="block",f.style.top=0,f.style.bottom=0,f.style.left=0,f.style.right=0,f.style.position="absolute",f.onload=p(),f.onclick=u,h=!1,f.style.cursor="pointer",a.innerHTML="",a.style.position="relative",a.appendChild(f)}}else if(s.hasOwnProperty("IFrameResource")){var g=document.createElement("iframe");g.src=s.IFrameResource,g.scrolling="no",g.style.width="100%",g.style.height="100%",g.style.border="none",g.style.overflow="hidden",g.onload=p(),h=!1,a.appendChild(g)}else if(s.hasOwnProperty("HTMLResource")){if(0===s.HTMLResource.indexOf("http"))n(32).load(s.HTMLResource,(function(e,t){e||0===t.length||(a.style.display="inline-block",a.style.position="relative",a.innerHTML=t,p())}));else a.style.display="inline-block",a.style.position="relative",a.innerHTML=s.HTMLResource,p()}h&&(s.hasOwnProperty("StaticResource")&&s.CompanionClickThrough&&(a.style.cursor="pointer"),a.onclick=u),this.stop=function(){"concurrent"===s.renderingMode&&(a.innerHTML="")},this.getData=function(){return{container:a,companionData:s,size:d}}},s=function(e,t,n){var s=e,l=t,d=n,c=[];o.always(r,"Version: 0.1.11");for(var u=[],p=0;p empty companions xml"),null;""))&&(n=n.substr(0,t+1)),n.trim()}(e)).substr(0,13)&&(e=""+e+"");var t=null;if(void 0!==window.DOMParser){if("parsererror"===(t=(new DOMParser).parseFromString(e,"text/xml")).documentElement.nodeName){try{o.error(r,"parseCompanions > Error reason = "+t.documentElement.childNodes[0].nodeValue)}catch(e){}return o.warn(r,"parseCompanions > invalide xml structure"),null}}else{if(void 0===window.ActiveXObject)return o.error(r,"parseCompanions > Failed to parse vast xml by window.ActiveXObject(Microsoft.XMLDOM)"),null;try{if((t=new window.ActiveXObject("Microsoft.XMLDOM")).loadXML(e),0!==t.parseError.errorCode)return o.error(r,t.parseError),null}catch(e){return o.error(r,"parseCompanions > Failed to parse vast xml by window.ActiveXObject(Microsoft.XMLDOM)",e),null}}return t?n(33).parse(t):(o.error(r,"parseCompanions > invalid xml structure"),null)}(e)}}},function(e,t,n){var i=["video/mp4","video/webm","video/ogg","video/x-ms-wmv","video/x-msvideo","video/mpeg","video/quicktime","video/3gpp","video/3gpp2","video/x-m4v","application/javascript","application/x-javascript"],o=["audio/mpeg","audio/mp4","audio/ogg","audio/x-pn-realaudio","application/javascript","application/x-javascript"],r=[],a=0,s=n(30),l=n(12),d="Rendition Manager > ";function c(e,t){var n;if(t){for(n=0;n=e&&(-1===i||i>=r[o].width-e)&&(i>r[o].width-e&&(n.length=0),n.push(r[o]),i=r[o].width-e);if(n.length>0)r.length=0,r=n.slice();else{for(o=0;o=e-r[o].width)&&(i>e-r[o].width&&(n.length=0),n.push(r[o]),i=e-r[o].width);n.length>0&&(r.length=0,r=n.slice())}if(1!==r.length){for(n.length=0,i=-1,o=0;o=t&&(-1===i||i>=r[o].height-t)&&(i>r[o].height-t&&(n.length=0),n.push(r[o]),i=r[o].height-t);if(n.length>0)r.length=0,r=n.slice();else{for(o=0;o=t-r[o].height)&&(i>t-r[o].height&&(n.length=0),n.push(r[o]),i=t-r[o].height);n.length>0&&(r.length=0,r=n.slice())}}}function p(e){for(var t=[],n=-1,i=0;i=e-r[i].bitrate)&&(n>e-r[i].bitrate&&(t.length=0),n=e-r[i].bitrate,t.push(r[i]));if(t.length>0)r.length=0,r=t.slice();else for(i=0;i=e&&(-1===n||n>=r[i].bitrate-e)&&(n>r[i].bitrate-e&&(t.length=0),n=r[i].bitrate-e,t.push(r[i]));if(1===t.length||0===a)return t[0];if(1===a){for(i=0;i0){if(1===r.length)return r[0];u(e,t),i=1===r.length?r[0]:p(n)}return null===i&&(r=o.slice()),i}(e,t,n);return o?(o.type.toLowerCase(),l.info(d,"VPAID selected"),o):(a=1,0===r.length?null:1===r.length?(r[0].type.toLowerCase(),r[0]):(u(e,t),1===r.length?(l.log(d,"Rendition selected by size"),r[0].type.toLowerCase(),r[0]):(l.log(d,"Try select rendition by bitrate"),p(n))))}function v(e,t,n,i){i.playerTechnology=["html5"],a=1,function(e){for(var t=0;t0)return l.info(d,"Selected bitrate (not from cache): "+e),e;var t=1;try{var n=s.getGenericData("anxBandwidth");n?(t=n,l.info(d,"Selected bitrate (from cache): "+t)):l.info(d,"No bitrate data present in cache (use bitrate 1)")}catch(e){l.warn(d,"Exception during getting bitrate from cache (use bitrate 1)")}return t}(n),p=r.slice();r.length=0;for(var v=0;v0;n++){var c=t[n];if(r.length=0,r=s.slice(),f(c.width,c.height),1!==r.length)if(0!==r.length){for(var u=!1,p=0;p0&&n-t.timestamp<=o?t.ad:null}(c(e))},clearAd:function(e){!function(e){try{d(e)}catch(e){}}(c(e))},setTimeToLive:function(e){o=6e4*e},getNextAdToken:function(){return e=(t=l("___appnexus_video_cachemanager_ad_token___"))?parseInt(t):0,s("___appnexus_video_cachemanager_ad_token___",e+=1),e;var e,t}}},function(e,t,n){var i=n(12);function o(e){if(e)return e.responseXML?e.responseXML:e.responseText}e.exports={debug:function(){i.handleLogDebugLegacySupport.apply(this,arguments)},logDebug:function(){i.handleLogDebugLegacySupport.apply(this,arguments)},setDebugLevel:function(e){i.setDebugLevel(e)},isNotEmpty:function(e){var t=!1;return null!==e&&e&&(t=e.length>0),t},objectToString:function(e,t){var n="null";if(t=void 0!==t?t:0,null!==e){n="OBJ[";var i="";for(var o in e){var r=e[o];if("object"==typeof r)if(++t<9)try{r=this.objectToString(r)}catch(e){r="err:"+e}else r="err: max recursion hit";i.length>0&&(i+=","),i+=o+"="+r}n+=i,n+="]"}return n},getRandomString:function(){return Math.random().toString(36).substring(2)},traceVastFromXhr:function(e,t){try{if(e)if(Array.isArray(e)){if(e.length>0){var n=[];for(var r in e)n.push(e[r].responseURL);var a=e[e.length-1];if(a){var s=o(a),l=a.responseURL;i.info(t,"Tag load chain:",n,"\n","Final Tag URL: ",l,"\n","Final Tag: ",s)}}}else{var d=o(e);i.info(t,"Tag URL:",e.responseURL,"\n","Tag:",d)}}catch(e){}}}},function(e,t,n){var i=n(12);function o(e,t,i,r,a,s){var l,d=0,c=0,u=!1,p=n(31),h=n(30),m=!0,v=function(e){p.logDebug(e,"URL Loader")};if(a&&void 0!==a.withCredentials&&(m=a.withCredentials),window.XMLHttpRequest)l=new XMLHttpRequest;else if(window.ActiveXObject)try{l=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{l=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}l?(l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status){if(v("duration: "+c+", response length: "+l.responseText.length),u&&l.responseText&&l.responseText.length>2048){var e=8*l.responseText.length*1e3/(1024*Math.max(1,c)),t=parseInt(e.toString());v("Bandwidth: "+t);try{h.setGenericData("anxBandwidth",t)}catch(e){}}i&&i.call(this,void 0,l.responseText,l)}else l.status>=400&&l.status<600&&i&&i.call(this,l.status,"",l);else 2===l.readyState?d=(new Date).getTime():3===l.readyState&&d>0&&(u=!0,c=(new Date).getTime()-d)},l.onerror=function(){if(m){var n=a||{};n.withCredentials=!1,o(e,t,i,r,n,s)}else if(i){var d=0===l.status?"404":l.status.toString();i.call(this,d,"",l)}},l.ontimeout=function(){i&&i.call(this,"Timeout","",l)},l.open(s,e),r&&(l.timeout=r),l.withCredentials=m,d=0,"POST"===s?l.send(t):l.send()):i&&i.call(this,"406","")}e.exports={load:function(e,t,n){o(e,null,t,n,{withCredentials:!0},"GET")},loadPost:function(e,t,n,i){o(e,t,n,i,{withCredentials:!0},"POST")},trackPixel:function(e,t){!function(e,t){i.log("Logging Event: "+t+" at url:"+e),new Image(1,1).src=e}(e,t)}}},function(e,t){var n={parse:function(e){var t={companions:[]},n=new function(){this.getSubNodes=function(e,t){var n=e.getElementsByTagName(t);return n.length>0?n:null},this.getSubNode=function(e,t,n){n||(n=0);var i=e.getElementsByTagName(t);return i.length>n?i[n]:null},this.getNodeValue=function(e){return 0===e.childNodes.length?"":e.childNodes[0].nodeValue.trim()},this.getNodeValues=function(e){if(0===e.childNodes.length)return"";for(var t="",n=0;n0&&(i=o.indexOf(".")>=0?parseFloat(o):parseInt(o)),i},this.getNodeAttributeBooleanValue=function(e,t,n){n||(n=!1);var i=n,o=this.getNodeAttributeValue(e,t);o.length>0&&(i="t"===o.toLowerCase().charAt(0));return i},this.getSubNodeValue=function(e,t,n){n=void 0===n?"":n;var i=this.getSubNode(e,t);return null!==i?this.getNodeValue(i):n},this.getSubNodeWholeValue=function(e,t,n){n=void 0===n?"":n;var i=this.getSubNode(e,t);return null!==i?this.getNodeValues(i):n},this.getSubNodeBooleanValue=function(e,t,n){n=void 0===n?"false":n;var i=this.getSubNodeValue(e,t);return i.length>0&&"t"===i.toLowerCase().charAt(0)||!(i.length>0&&"f"===i.toLowerCase().charAt(0))&&n}},i=n.getSubNode(e,"CompanionAds"),o=n.getNodeAttributeValue(i,"required");o&&o.length>0&&(t.required=o);var r=n.getSubNodes(i,"Companion");if(r)for(var a=0;a0&&(l.assetWidth=u),(u=n.getNodeAttributeNumberValue(s,"assetHeight",-1))>0&&(l.assetHeight=u),(u=n.getNodeAttributeNumberValue(s,"expandedWidth",-1))>0&&(l.expandedWidth=u),(u=n.getNodeAttributeNumberValue(s,"expandedHeight",-1))>0&&(l.expandedHeight=u),(u=n.getNodeAttributeValue(s,"apiFramework"))&&(l.apiFramework=u),(u=n.getNodeAttributeValue(s,"adSlotId"))&&(l.adSlotId=u),(u=n.getNodeAttributeValue(s,"required"))&&(l.required=u),(u=n.getNodeAttributeValue(s,"renderingMode"))&&(l.renderingMode=u),(u=n.getSubNodeValue(s,"AltText"))&&(l.AltText=u),(u=n.getSubNodeValue(s,"AdParameters"))&&(l.AdParameters=u);var p,h,m,v=n.getSubNode(s,"StaticResource");if(v&&(u=n.getNodeAttributeValue(v,"creativeType"))){if("video/x-flv"===u||"video/x-f4v"===u||"video/f4v"===u||"application/x-shockwave-flash"===u)continue;var f={type:u};(u=n.getNodeValues(v))&&(f.src=u,l.StaticResource=f)}(u=n.getSubNodeWholeValue(s,"IFrameResource"))&&(l.IFrameResource=u),(u=n.getSubNodeWholeValue(s,"HTMLResource"))&&(l.HTMLResource=u),(u=n.getSubNodeValue(s,"CompanionClickThrough"))&&(l.CompanionClickThrough=u);var g=n.getSubNodes(s,"CompanionClickTracking");if(g)for(l.CompanionClickTracking=[],p=0;p0&&o[0].webkitDisplayingFullscreen)return o[0]}var r=e.getElementsByTagName("iframe");if(r.length>0)for(var a=0;a\n*/\n.vjs-default-skin {\n color: #CCCCCC;\n}\n/* Custom Icon Font\n--------------------------------------------------------------------------------\nThe control icons are from a custom font. Each icon corresponds to a character\n(e.g. "\\e001"). Font icons allow for easy scaling and coloring of icons.\n*/\n@font-face {\n font-family: \'VideoJS\';\n src: url(\'font/vjs.eot\');\n src: url(data:application/font-woff;base64,d09GRgABAAAAABG0AAsAAAAAEWgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIHUGNtYXAAAAFoAAAAfAAAAHyz47CpZ2FzcAAAAeQAAAAIAAAACAAAABBnbHlmAAAB7AAADTwAAA08MPTaTGhlYWQAAA8oAAAANgAAADYP2gkbaGhlYQAAD2AAAAAkAAAAJAkgBThobXR4AAAPhAAAAGQAAABkW54DGGxvY2EAAA/oAAAANAAAADQeIiIQbWF4cAAAEBwAAAAgAAAAIAAiAIluYW1lAAAQPAAAAVYAAAFWUqTEiXBvc3QAABGUAAAAIAAAACAAAwAAAAMD/AGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6ioDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAGAAAAAUABAAAwAEAAEAIOAO4B/mAOkm6YTqKv/9//8AAAAAACDgAOAe5gDpJumE6ir//f//AAH/4yAEH/UaFRbwFpMV7gADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAIAAP/ABAADwAAGAA0AAAERJwcnNycDBxchERc3BACgwGDAoKDAoP5goMADwP5goMBgwKD9YMCgAaCgwAAAAAABAMAAQANAA0AAAgAAEwkBwAKA/YADQP6A/oAAAgCAAEADgANAAAMABwAAEyERIQEhESGAAUD+wAHAAUD+wANA/QADAP0AAAABAAAADwHAA3EACwAAATYWFREUBi8BIxEzAZEUGxsU8aCgA3EUDBv8xBsMFPEBgAACAAAADwJHA3EAGAAkAAAlIiYnJjQ3PgE0JicmNDc2MhceARQGBw4BAzYWFREUBi8BIxEzAiUJEgcODh4fHx4ODg4oDiwtLSwHEp0UGxsU8aCg2wcHDigOHk1QTR4OKA4ODixxdHEsBwcClhQMG/zEGwwU8QGAAAADAAAADwNwA3EAHQA2AEIAACUiJicmNDc+ATQmJyY0NzYyFx4DFRQOAgcOASciJicmNDc+ATQmJyY0NzYyFx4BFAYHDgEDNhYVERQGLwEjETMC0AoRBw4OMTExMQ4ODicOHy8gEREgLx8HEbQJEgcODh4fHx4ODg4oDiwtLSwHEp0UGxsU8aCggAcIDicOMnuCezIOJw4PDx5HTVQrK1RNRx4IB1sHBw4oDh5NUE0eDigODg4scXRxLAcHApYUDBv8xBsMFPEBgAAAAAAEAAAADwRAA3EAIwBBAFoAZgAAJSImJyY0Nz4DNTQuAicmNDc2MhceAxUUDgIHDgEjJyImJyY0Nz4BNCYnJjQ3NjIXHgMVFA4CBw4BJyImJyY0Nz4BNCYnJjQ3NjIXHgEUBgcOAQM2FhURFAYvASMRMwN6CRIHDg4hMyISEiIzIQ4ODigOKD0pFhYpPSgHEgmqChEHDg4xMTExDg4OJw4fLyARESAvHwcRtAkSBw4OHh8fHg4ODigOLC0tLAcSnRQbGxTxoKAmBwcOKA4hTFNaLi5aU0whDigODg4oW2VsODhsZVsoBwdaBwgOJw4ye4J7Mg4nDg8PHkdNVCsrVE1HHggHWwcHDigOHk1QTR4OKA4ODixxdHEsBwcClhQMG/zEGwwU8QGAAAEAwP/AA0ADwAADAAAJAwIA/sABQAFAA8D+AP4AAgAABAAA/7oFXgPAAAMALwBSAHUAABMhESEBLgEnLgEnLgMjIg4CBw4BBw4BBx4BFx4BFx4DFz4DNz4BNz4BJS4DIyIOAhUUHgIzMj4CNyMOASMiJjU0NjMyFhczIS4DIyIOAhUUHgIzMj4CNyMOASMiJjU0NjMyFhczAAVe+qIE3QESIAUUCRBVfZxWVZ+AWBAJFAcfEQICER8HFAkQWICfVVacfVUQCRQFIBL9ugQgOE4yLlA7IiA8VjcrSTYjBIoEIyM2ICsmIikDiAHeBCE3TjMtUDsiIDxWNixJNiIFigQjIzcfKyYhKQSIA8D7+gIHh4opCQwHCxAKBAQKEAsHDAkpioeHiSoJDAYMEAoFAQEFChAMBgwJKom2NVM5HyhLa0JDa0soHzpUNSc1WzpPUS8rNVM5HyhLa0JDa0soHzpUNSc1WzpPUS8rAAABAIAAQAOAA0AAAwAAEyERIYADAP0AA0D9AAAACAA4AAADwAPAAAsAFwAjAC8ASABhAHoAhgAAARQWMzI2NTQmIyIGBRQWMzI2NTQmIyIGExQWMzI2NTQmIyIGAxQWMzI2NTQmIyIGBTgBMRQWMzI2NTgBMTgBMTQmIyIGFRQ0MSU4ATEUFjMyNjU4ATE4ATE0JiMiBhUUNDEDOAExFBYzMjY1OAExOAExNCYjIgYVFDQxAxQWMzI2NTQmIyIGAYBLNTVLSzU1SwEQSzU1S0s1NUuwJRsbJSUbGyVwJRsaJiYaGyX+8CUbGyUlGxsl/vAmGhslJRsaJiA5Jyg4OCgnOVgqHh4qKh4eKgNANUtLNTVLS6U1S0s1NUtL/rsbJSUbGyUl/tUaJiYaGyUlixslJRsbJSUbGxtwGiYmGhslJRsaGgIgKDg4KCc5OScoKP7wHioqHh4qKgAAAAACAAD/wAQAA8AABgANAAABEScHJzcnAQcXIREXNwHAoMBgwKAD4MCg/mCgwAGA/mCgwGDAoAHgwKABoKDAAAAAAQAA/8AEAAOAACIAAAEyHgIVFA4CIyImJw4DBzU+ATU0JicuAzU0PgICAGq7i1BQi7tqFCgUKVpdYDAzTQEBLEYxG1CLuwOAQXGYVlaYcUEDAikzHQoCGxpXNAcPBxxIUlwxVphxQQADAAD/wAQAA8AAEwAnAFoAAAEiDgIVFB4CMzI+AjU0LgIDMh4CFRQOAiMiLgI1ND4CAQ4DIyIuAicuAzU0PgI3FzgBMQ4BFBYXHgEzMjY3PgE0Jic3HgMVFA4CAgBqu4tQUIu7amq7i1BQi7tqNV1GKChGXTU1XUYoKEZdAWYeR01UKytUTUceHy8gEREgLx9DMTExMTB7Q0N7MDExMTFDHy8gEREgLwPAUIu7amq7i1BQi7tqaruLUP8AKEZdNTVdRigoRl01NV1GKP3PHy8gEREgLx8eR01UKytUTUceQzJ7gnsyLzMzLzJ7gnsyQx5HTVQrK1RNRwAAAAABAAD/wAQAA8AAMwAAASIGByU+ATU0JiclHgEzMjY1NCYjIgYVFBYXBS4BIyIGFRQWMzI2NwUOARUUFjMyNjU0JgNgIjsW/lEBAQEBAa8WOyJCXl5CQl4BAf5RFjsiQl5eQiI7FgGvAQFeQkJeXgEAGhfYBg0GBg0G2BcaXkJCXl5CBg0G2BcaXkJCXhoX2AYNBkJeXkJCXgAAAAACACD/8AQAA7AAOgByAAABLgEnLgEnLgEnLgEHDgEHDgEHDgEHDgEXHgEXHgEXHgEXHgE3PgE3PgE3PgE3PgE3OgEzMjY1PAE1MQcOAQcOAQcOAScuAScuAScuAScuATc+ATc+ATc+ATc+ARceARceARceARceAQcxHAEVFBYXDgEHBAABFRUUOSQjVC4tYTExXywtTyEhNBESEAEBFBMTNiEiTisrWi4uWSkpSx4fMRAJDgMBAgEbJWYRMx8fSSgoVSoqUycmRR0dLA8PDgEBEhARLh0eQyUlTycnTSQjQBobKQ4NDQEhGAUPCwHAMmMtLlIiIzUSEhEBARUTFDcjIlEtLF4vL1wrK00gIDIQERABARQSEjQhIEwpGTQbJRsBAwGqKEceHi4QDw8BARIRETEeHkcmJ1EpKVAlJUIcGysODw0BAREQEC0cHEEkI0smAQMBGSQDGjMYAAACAAD/wAQAA8AAGQAzAAABIg4CBz4DMzIeAhUUFjMyNjU0LgIDMj4CNw4DIyIuAjU0JiMiBhUUHgICAGm4ilIDAkNxlVVWmHFBOCgoOFCLu2ppuIpSAwJDcZVVVphxQTgoKDhQi7sDwE6Itmhbn3ZERnqjXSg4OChqu4tQ/ABOiLZoW592REZ6o10oODgoaruLUAAAAgAA/8AEAAPAADAAPAAAATUnLgEnNycHLgEvASMHDgEHJwcXDgEPARUXHgEXBxc3HgEfATM3PgE3FzcnPgE/AQUiJjU0NjMyFhUUBgQAkwQLBlaIeQwbDhjAGA4bDHmIVgYLBJOTBQoHV4h6DBoNGcAZDRoMeohXBwoFk/4ANUtLNTVLSwFgwBkNGg15iFYGCwWSkgULBlaIeQ0aDRnAGQ0aDXmIVwYLBZOTBQsGV4h5DRoNGSBLNTVLSzU1SwAABgBA/8ADwAPAABkAIQA3AEUAUwBhAAABLgEnLgEnLgEjISIGFREUFjMhMjY1ETQmJyceARcjNR4BExQGIyEiJjURNDYzMDoCMRUUFjsBAyEiJjU0NjMhMhYVFAYnISImNTQ2MyEyFhUUBichIiY1NDYzITIWFRQGA5YRLRkaMxcnKQv+ECEvLyEC4CEvDhyFFyUNmhEphgkH/SAHCQkHm7qbEw3goP5ADRMTDQHADRMTDf5ADRMTDQHADRMTDf5ADRMTDQHADRMTAtsXMxoZLREcDi8h/KAhLy8hAnALKSc2FykRmg0l/OgHCQkHA2AHCeANE/4AEw0NExMNDROAEw0NExMNDROAEw0NExMNDRMAAAAAAQAA/8AEAAPAAC0AAAEhNy4BIyIGBw4BFRQWFx4BMzI2Nz4BNxcOAyMiLgI1ND4CMzIeAhc3BAD+gJA3jE1NjDc2Ojo2N4xNTYw3BAkEYCNWYmw6aruLUFCLu2o1ZFxSI5YCQJA2Ojo2N4xNTYw3Njo6NgUJBVQoQS0ZUIu7amq7i1AVJzcjlgAAAAACAAAAAAPAA34ADwAqAAABFSMnByM1Nyc1Mxc3MxUHASImLwEjIiY1ETQ2OwE3PgEXHgEVERQGBw4BA8BVa2tVa2tVa2tVa/5LBgwF9nMNExMNc/YHEwkJCwsJAwYBVVVra1Vra1Vra1Vr/kAFBPcTDQFADRP3BgQDBBAK/MAKEAQBAQABAAAAAQAAi1igY18PPPUACwQAAAAAANWuYlIAAAAA1a5iUgAA/7oFXgPAAAAACAACAAAAAAAAAAEAAAPA/8AAAAVeAAAAAAVeAAEAAAAAAAAAAAAAAAAAAAAZBAAAAAAAAAAAAAAAAgAAAAQAAAAEAADABAAAgAQAAAAEAAAABAAAAARAAAAEAADABV4AAAQAAIAEAAA4BAAAAAQAAAAEAAAABAAAAAQAACAEAAAABAAAAAQAAEAEAAAABAAAAAAAAAAACgAUAB4APgBMAGIAegC2ARwBsAHAAmYCdAMUAzQDaAPmBDQE4gUsBYwGFgZcBp4AAQAAABkAhwAIAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAMAAAABAAAAAAACAAcAPAABAAAAAAADAAMAKgABAAAAAAAEAAMAUQABAAAAAAAFAAsACQABAAAAAAAGAAMAMwABAAAAAAAKABoAWgADAAEECQABAAYAAwADAAEECQACAA4AQwADAAEECQADAAYALQADAAEECQAEAAYAVAADAAEECQAFABYAFAADAAEECQAGAAYANgADAAEECQAKADQAdHZqcwB2AGoAc1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMHZqcwB2AGoAc3ZqcwB2AGoAc1JlZ3VsYXIAUgBlAGcAdQBsAGEAcnZqcwB2AGoAc0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format("woff"), url(\'font/vjs.eot?#iefix\') format(\'embedded-opentype\'), url(\'font/vjs.ttf\') format(\'truetype\'), url(\'font/vjs.svg#icomoon\') format(\'svg\');\n font-weight: normal;\n font-style: normal;\n}\n/* Base UI Component Classes\n--------------------------------------------------------------------------------\n*/\n/* Slider - used for Volume bar and Seek bar */\n.vjs-default-skin .vjs-slider {\n /* Replace browser focus highlight with handle highlight */\n outline: 0;\n position: relative;\n cursor: pointer;\n padding: 0;\n /* background-color-with-alpha */\n background-color: #333333;\n background-color: rgba(51, 51, 51, 0.9);\n}\n.vjs-default-skin .vjs-slider:focus {\n /* box-shadow */\n -webkit-box-shadow: 0 0 2em #fff;\n -moz-box-shadow: 0 0 2em #fff;\n box-shadow: 0 0 2em #fff;\n}\n.vjs-default-skin .vjs-slider-handle {\n position: absolute;\n /* Needed for IE6 */\n left: 0;\n top: 0;\n}\n.vjs-default-skin .vjs-slider-handle:before {\n content: "\\e009";\n font-family: VideoJS;\n font-size: 1em;\n line-height: 1;\n text-align: center;\n text-shadow: 0em 0em 1em #fff;\n position: absolute;\n top: 0;\n left: 0;\n /* Rotate the square icon to make a diamond */\n /* transform */\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -ms-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n}\n/* Control Bar\n--------------------------------------------------------------------------------\nThe default control bar that is a container for most of the controls.\n*/\n.vjs-default-skin .vjs-control-bar {\n /* Start hidden */\n display: none;\n position: absolute;\n /* Place control bar at the bottom of the player box/video.\n If you want more margin below the control bar, add more height. */\n bottom: 0;\n /* Use left/right to stretch to 100% width of player div */\n left: 0;\n right: 0;\n /* Height includes any margin you want above or below control items */\n height: 3.0em;\n /* background-color-with-alpha */\n background-color: #07141E;\n background-color: rgba(7, 20, 30, 0.7);\n}\n/* Show the control bar only once the video has started playing */\n.vjs-default-skin.vjs-has-started .vjs-control-bar {\n display: block;\n /* Visibility needed to make sure things hide in older browsers too. */\n visibility: visible;\n opacity: 1;\n /* transition */\n -webkit-transition: visibility 0.1s, opacity 0.1s;\n -moz-transition: visibility 0.1s, opacity 0.1s;\n -o-transition: visibility 0.1s, opacity 0.1s;\n transition: visibility 0.1s, opacity 0.1s;\n}\n/* Hide the control bar when the video is playing and the user is inactive */\n.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n display: block;\n visibility: hidden;\n opacity: 0;\n /* transition */\n -webkit-transition: visibility 0.5s, opacity 0.5s;\n -moz-transition: visibility 0.5s, opacity 0.5s;\n -o-transition: visibility 0.5s, opacity 0.5s;\n transition: visibility 0.5s, opacity 0.5s;\n}\n.vjs-default-skin.vjs-controls-disabled .vjs-control-bar {\n display: none;\n}\n.vjs-default-skin.vjs-using-native-controls .vjs-control-bar {\n display: none;\n}\n/* The control bar shouldn\'t show after an error */\n.vjs-default-skin.vjs-error .vjs-control-bar {\n display: none;\n}\n/* Don\'t hide the control bar if it\'s audio */\n.vjs-audio.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n opacity: 1;\n visibility: visible;\n}\n/* IE8 is flakey with fonts, and you have to change the actual content to force\nfonts to show/hide properly.\n - "\\9" IE8 hack didn\'t work for this\n - Found in XP IE8 from http://modern.ie. Does not show up in "IE8 mode" in IE9\n*/\n@media \\0screen {\n .vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before {\n content: "";\n }\n}\n/* General styles for individual controls. */\n.vjs-default-skin .vjs-control {\n outline: none;\n position: relative;\n float: left;\n text-align: center;\n margin: 0;\n padding: 0;\n height: 3.0em;\n width: 4em;\n}\n/* Font button icons */\n.vjs-default-skin .vjs-control:before {\n font-family: VideoJS;\n font-size: 1.5em;\n line-height: 2;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);\n}\n/* Replacement for focus outline */\n.vjs-default-skin .vjs-control:focus:before,\n.vjs-default-skin .vjs-control:hover:before {\n text-shadow: 0em 0em 1em #ffffff;\n}\n.vjs-default-skin .vjs-control:focus {\n /* outline: 0; */\n /* keyboard-only users cannot see the focus on several of the UI elements when\n this is set to 0 */\n}\n/* Hide control text visually, but have it available for screenreaders */\n.vjs-default-skin .vjs-control-text {\n /* hide-visually */\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n/* Play/Pause\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin .vjs-play-control {\n width: 5em;\n cursor: pointer;\n}\n.vjs-default-skin .vjs-play-control:before {\n content: "\\e001";\n}\n.vjs-default-skin.vjs-playing .vjs-play-control:before {\n content: "\\e002";\n}\n/* Playback toggle\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin .vjs-playback-rate .vjs-playback-rate-value {\n font-size: 1.5em;\n line-height: 2;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);\n}\n.vjs-default-skin .vjs-playback-rate.vjs-menu-button .vjs-menu .vjs-menu-content {\n width: 4em;\n left: -2em;\n list-style: none;\n}\n/* Volume/Mute\n-------------------------------------------------------------------------------- */\n.vjs-default-skin .vjs-mute-control,\n.vjs-default-skin .vjs-volume-menu-button {\n cursor: pointer;\n float: right;\n}\n.vjs-default-skin .vjs-mute-control:before,\n.vjs-default-skin .vjs-volume-menu-button:before {\n content: "\\e006";\n}\n.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,\n.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before {\n content: "\\e003";\n}\n.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,\n.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before {\n content: "\\e004";\n}\n.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,\n.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before {\n content: "\\e005";\n}\n.vjs-default-skin .vjs-volume-control {\n width: 5em;\n float: right;\n}\n.vjs-default-skin .vjs-volume-bar {\n width: 5em;\n height: 0.6em;\n margin: 1.1em auto 0;\n}\n.vjs-default-skin .vjs-volume-level {\n position: absolute;\n top: 0;\n left: 0;\n height: 0.5em;\n /* assuming volume starts at 1.0 */\n width: 100%;\n background: #66A8CC url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat;\n}\n.vjs-default-skin .vjs-volume-bar .vjs-volume-handle {\n width: 0.5em;\n height: 0.5em;\n /* Assumes volume starts at 1.0. If you change the size of the\n handle relative to the volume bar, you\'ll need to update this value\n too. */\n left: 4.5em;\n}\n.vjs-default-skin .vjs-volume-handle:before {\n font-size: 0.9em;\n top: -0.2em;\n left: -0.2em;\n width: 1em;\n height: 1em;\n}\n/* The volume menu button is like menu buttons (captions/subtitles) but works\n a little differently. It needs to be possible to tab to the volume slider\n without hitting space bar on the menu button. To do this we\'re not using\n display:none to hide the slider menu by default, and instead setting the\n width and height to zero. */\n.vjs-default-skin .vjs-volume-menu-button .vjs-menu {\n display: block;\n width: 0;\n height: 0;\n border-top-color: transparent;\n}\n.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content {\n height: 0;\n width: 0;\n}\n.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu,\n.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing {\n border-top-color: rgba(7, 40, 50, 0.5);\n /* Same as ul background */\n}\n.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu .vjs-menu-content,\n.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing .vjs-menu-content {\n height: 2.9em;\n width: 10em;\n}\n/* Progress\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin .vjs-progress-control {\n position: absolute;\n left: 0;\n right: 0;\n width: auto;\n font-size: 0.3em;\n height: 1.2em;\n /* Increase default height of progress bar by a decision for VIDLA-1692 */\n /* Set above the rest of the controls. */\n top: -1em;\n /* Shrink the bar slower than it grows. */\n /* transition */\n -webkit-transition: all 0.4s;\n -moz-transition: all 0.4s;\n -o-transition: all 0.4s;\n transition: all 0.4s;\n}\n/* On hover, make the progress bar grow to something that\'s more clickable.\n This simply changes the overall font for the progress bar, and this\n updates both the em-based widths and heights, as wells as the icon font */\n.vjs-default-skin:hover .vjs-progress-control {\n /* commented out by a decision for VIDLA-1692 */\n /* font-size: .9em; */\n /* Even though we\'re not changing the top/height, we need to include them in\n the transition so they\'re handled correctly. */\n /* .transition(all 0.2s); */\n}\n/* Box containing play and load progresses. Also acts as seek scrubber. */\n.vjs-default-skin .vjs-progress-holder {\n height: 100%;\n}\n/* Progress Bars */\n.vjs-default-skin .vjs-progress-holder .vjs-play-progress,\n.vjs-default-skin .vjs-progress-holder .vjs-load-progress,\n.vjs-default-skin .vjs-progress-holder .vjs-load-progress div {\n position: absolute;\n display: block;\n height: 100%;\n margin: 0;\n padding: 0;\n /* updated by javascript during playback */\n width: 0;\n /* Needed for IE6 */\n left: 0;\n top: 0;\n}\n.vjs-default-skin .vjs-play-progress {\n /*\n Using a data URI to create the white diagonal lines with a transparent\n background. Surprisingly works in IE8.\n Created using http://www.patternify.com\n Changing the first color value will change the bar color.\n Also using a paralax effect to make the lines move backwards.\n The -50% left position makes that happen.\n */\n background: #66A8CC url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat;\n}\n.vjs-default-skin .vjs-load-progress {\n background: #646464 /* IE8- Fallback */;\n background: rgba(255, 255, 255, 0.2);\n}\n/* there are child elements of the load progress bar that represent the\n specific time ranges that have been buffered */\n.vjs-default-skin .vjs-load-progress div {\n background: #787878 /* IE8- Fallback */;\n background: rgba(255, 255, 255, 0.1);\n}\n.vjs-default-skin .vjs-seek-handle {\n width: 1.5em;\n height: 100%;\n}\n.vjs-default-skin .vjs-seek-handle:before {\n padding-top: 0.1em /* Minor adjustment */;\n}\n/* Live Mode\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin.vjs-live .vjs-time-controls,\n.vjs-default-skin.vjs-live .vjs-time-divider,\n.vjs-default-skin.vjs-live .vjs-progress-control {\n display: none;\n}\n.vjs-default-skin.vjs-live .vjs-live-display {\n display: block;\n}\n/* Live Display\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin .vjs-live-display {\n display: none;\n font-size: 1em;\n line-height: 3em;\n}\n/* Time Display\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin .vjs-time-controls {\n font-size: 1em;\n /* Align vertically by making the line height the same as the control bar */\n line-height: 3em;\n}\n.vjs-default-skin .vjs-current-time {\n float: left;\n}\n.vjs-default-skin .vjs-duration {\n float: left;\n}\n/* Remaining time is in the HTML, but not included in default design */\n.vjs-default-skin .vjs-remaining-time {\n display: none;\n float: left;\n}\n.vjs-time-divider {\n float: left;\n line-height: 3em;\n}\n/* Fullscreen\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin .vjs-fullscreen-control {\n width: 3.8em;\n cursor: pointer;\n float: right;\n}\n.vjs-default-skin .vjs-fullscreen-control:before {\n content: "\\e000";\n}\n/* Switch to the exit icon when the player is in fullscreen */\n.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before {\n content: "\\e00b";\n}\n/* Big Play Button (play button at start)\n--------------------------------------------------------------------------------\nPositioning of the play button in the center or other corners can be done more\neasily in the skin designer. http://designer.videojs.com/\n*/\n.vjs-default-skin .vjs-big-play-button {\n left: 0.5em;\n top: 0.5em;\n font-size: 3em;\n display: block;\n z-index: 2;\n position: absolute;\n width: 4em;\n height: 2.6em;\n text-align: center;\n vertical-align: middle;\n cursor: pointer;\n opacity: 1;\n /* Need a slightly gray bg so it can be seen on black backgrounds */\n /* background-color-with-alpha */\n background-color: #07141E;\n background-color: rgba(7, 20, 30, 0.7);\n border: 0.1em solid #3b4249;\n /* border-radius */\n -webkit-border-radius: 0.8em;\n -moz-border-radius: 0.8em;\n border-radius: 0.8em;\n /* box-shadow */\n -webkit-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);\n -moz-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);\n box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);\n /* transition */\n -webkit-transition: all 0.4s;\n -moz-transition: all 0.4s;\n -o-transition: all 0.4s;\n transition: all 0.4s;\n}\n/* Optionally center */\n.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button {\n /* Center it horizontally */\n left: 50%;\n margin-left: -2.1em;\n /* Center it vertically */\n top: 50%;\n margin-top: -1.4em;\n}\n/* Hide if controls are disabled */\n.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button {\n display: none;\n}\n/* Hide when video starts playing */\n.vjs-default-skin.vjs-has-started .vjs-big-play-button {\n display: none;\n}\n/* Hide on mobile devices. Remove when we stop using native controls\n by default on mobile */\n.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button {\n display: none;\n}\n.vjs-default-skin:hover .vjs-big-play-button,\n.vjs-default-skin .vjs-big-play-button:focus {\n outline: 0;\n border-color: #fff;\n /* IE8 needs a non-glow hover state */\n background-color: #505050;\n background-color: rgba(50, 50, 50, 0.75);\n /* box-shadow */\n -webkit-box-shadow: 0 0 3em #fff;\n -moz-box-shadow: 0 0 3em #fff;\n box-shadow: 0 0 3em #fff;\n /* transition */\n -webkit-transition: all 0s;\n -moz-transition: all 0s;\n -o-transition: all 0s;\n transition: all 0s;\n}\n.vjs-default-skin .vjs-big-play-button:before {\n content: "\\e001";\n font-family: VideoJS;\n /* In order to center the play icon vertically we need to set the line height\n to the same as the button height */\n line-height: 2.6em;\n text-shadow: 0.05em 0.05em 0.1em #000;\n text-align: center /* Needed for IE8 */;\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.vjs-error .vjs-big-play-button {\n display: none;\n}\n/* Error Display\n--------------------------------------------------------------------------------\n*/\n.vjs-error-display {\n display: none;\n}\n.vjs-error .vjs-error-display {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.vjs-error .vjs-error-display:before {\n content: \'X\';\n font-family: Arial;\n font-size: 4em;\n color: #666666;\n /* In order to center the play icon vertically we need to set the line height\n to the same as the button height */\n line-height: 1;\n text-shadow: 0.05em 0.05em 0.1em #000;\n text-align: center /* Needed for IE8 */;\n vertical-align: middle;\n position: absolute;\n left: 0;\n top: 50%;\n margin-top: -0.5em;\n width: 100%;\n}\n.vjs-error-display div {\n position: absolute;\n bottom: 1em;\n right: 0;\n left: 0;\n font-size: 1.4em;\n text-align: center;\n padding: 3px;\n background: #000000;\n background: rgba(0, 0, 0, 0.5);\n}\n.vjs-error-display a,\n.vjs-error-display a:visited {\n color: #F4A460;\n}\n/* Loading Spinner\n--------------------------------------------------------------------------------\n*/\n.vjs-loading-spinner {\n /* Should be hidden by default */\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 4em;\n line-height: 1;\n width: 1em;\n height: 1em;\n margin-left: -0.5em;\n margin-top: -0.5em;\n opacity: 0.75;\n}\n/* Show the spinner when waiting for data and seeking to a new time */\n.vjs-waiting .vjs-loading-spinner,\n.vjs-seeking .vjs-loading-spinner {\n display: block;\n /* only animate when showing because it can be processor heavy */\n /* animation */\n -webkit-animation: spin 1.5s infinite linear;\n -moz-animation: spin 1.5s infinite linear;\n -o-animation: spin 1.5s infinite linear;\n animation: spin 1.5s infinite linear;\n}\n/* Errors are unrecoverable without user interaction so hide the spinner */\n.vjs-error .vjs-loading-spinner {\n display: none;\n /* ensure animation doesn\'t continue while hidden */\n /* animation */\n -webkit-animation: none;\n -moz-animation: none;\n -o-animation: none;\n animation: none;\n}\n.vjs-default-skin .vjs-loading-spinner:before {\n content: "\\e01e";\n font-family: VideoJS;\n position: absolute;\n top: 0;\n left: 0;\n width: 1em;\n height: 1em;\n text-align: center;\n text-shadow: 0em 0em 0.1em #000;\n}\n@-moz-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n }\n 100% {\n -moz-transform: rotate(359deg);\n }\n}\n@-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n }\n}\n@-o-keyframes spin {\n 0% {\n -o-transform: rotate(0deg);\n }\n 100% {\n -o-transform: rotate(359deg);\n }\n}\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(359deg);\n }\n}\n/* Menu Buttons (Captions/Subtitles/etc.)\n--------------------------------------------------------------------------------\n*/\n.vjs-default-skin .vjs-menu-button {\n float: right;\n cursor: pointer;\n}\n.vjs-default-skin .vjs-menu {\n display: none;\n position: absolute;\n bottom: 0;\n left: 0em;\n /* (Width of vjs-menu - width of button) / 2 */\n width: 0em;\n height: 0em;\n margin-bottom: 3em;\n border-left: 2em solid transparent;\n border-right: 2em solid transparent;\n border-top: 1.55em solid #000000;\n /* Same width top as ul bottom */\n border-top-color: rgba(7, 40, 50, 0.5);\n /* Same as ul background */\n}\n/* Button Pop-up Menu */\n.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content {\n display: block;\n padding: 0;\n margin: 0;\n position: absolute;\n width: 10em;\n bottom: 1.5em;\n /* Same bottom as vjs-menu border-top */\n max-height: 15em;\n overflow: auto;\n left: -5em;\n /* Width of menu - width of button / 2 */\n /* background-color-with-alpha */\n background-color: #07141E;\n background-color: rgba(7, 20, 30, 0.7);\n /* box-shadow */\n -webkit-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);\n -moz-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);\n box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);\n}\n.vjs-default-skin .vjs-menu-button:hover .vjs-control-content .vjs-menu,\n.vjs-default-skin .vjs-control-content .vjs-menu.vjs-lock-showing {\n display: block;\n}\n/* prevent menus from opening while scrubbing (FF, IE) */\n.vjs-default-skin.vjs-scrubbing .vjs-menu-button:hover .vjs-control-content .vjs-menu {\n display: none;\n}\n.vjs-default-skin .vjs-menu-button ul li {\n list-style: none;\n margin: 0;\n padding: 0.3em 0 0.3em 0;\n line-height: 1.4em;\n font-size: 1.2em;\n text-align: center;\n text-transform: lowercase;\n}\n.vjs-default-skin .vjs-menu-button ul li.vjs-selected {\n background-color: #000;\n}\n.vjs-default-skin .vjs-menu-button ul li:focus,\n.vjs-default-skin .vjs-menu-button ul li:hover,\n.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,\n.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover {\n outline: 0;\n color: #111;\n /* background-color-with-alpha */\n background-color: #ffffff;\n background-color: rgba(255, 255, 255, 0.75);\n /* box-shadow */\n -webkit-box-shadow: 0 0 1em #ffffff;\n -moz-box-shadow: 0 0 1em #ffffff;\n box-shadow: 0 0 1em #ffffff;\n}\n.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title {\n text-align: center;\n text-transform: uppercase;\n font-size: 1em;\n line-height: 2em;\n padding: 0;\n margin: 0 0 0.3em 0;\n font-weight: bold;\n cursor: default;\n}\n/* Subtitles Button */\n.vjs-default-skin .vjs-subtitles-button:before {\n content: "\\e00c";\n}\n/* Captions Button */\n.vjs-default-skin .vjs-captions-button:before {\n content: "\\e008";\n}\n/* Chapters Button */\n.vjs-default-skin .vjs-chapters-button:before {\n content: "\\e00c";\n}\n.vjs-default-skin .vjs-chapters-button.vjs-menu-button .vjs-menu .vjs-menu-content {\n width: 24em;\n left: -12em;\n}\n/* Replacement for focus outline */\n.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,\n.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before {\n /* box-shadow */\n -webkit-box-shadow: 0 0 1em #ffffff;\n -moz-box-shadow: 0 0 1em #ffffff;\n box-shadow: 0 0 1em #ffffff;\n}\n/*\nREQUIRED STYLES (be careful overriding)\n================================================================================\nWhen loading the player, the video tag is replaced with a DIV,\nthat will hold the video tag or object tag for other playback methods.\nThe div contains the video playback element (Flash or HTML5) and controls,\nand sets the width and height of the video.\n\n** If you want to add some kind of border/padding (e.g. a frame), or special\npositioning, use another containing element. Otherwise you risk messing up\ncontrol positioning and full window mode. **\n*/\n.video-js {\n background-color: #000;\n position: relative;\n padding: 0;\n /* Start with 10px for base font size so other dimensions can be em based and\n easily calculable. */\n font-size: 10px;\n /* Allow poster to be vertically aligned. */\n vertical-align: middle;\n /* display: table-cell; */\n /*This works in Safari but not Firefox.*/\n /* Provide some basic defaults for fonts */\n font-weight: normal;\n font-style: normal;\n /* Avoiding helvetica: issue #376 */\n font-family: Arial, sans-serif;\n /* Turn off user selection (text highlighting) by default.\n The majority of player components will not be text blocks.\n Text areas will need to turn user selection back on. */\n /* user-select */\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n/* Playback technology elements expand to the width/height of the containing div\n