diff --git a/AppNexusSDK.podspec b/AppNexusSDK.podspec index 7dada3018..a57047511 100644 --- a/AppNexusSDK.podspec +++ b/AppNexusSDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "AppNexusSDK" - s.version = "7.0" + s.version = "7.1" s.platform = :ios, "9.0" s.summary = "AppNexus iOS Mobile Advertising SDK" @@ -29,7 +29,7 @@ DESC s.subspec 'GoogleAdapter' do |subspec| subspec.dependency 'AppNexusSDK/AppNexusSDK', "#{s.version}" - subspec.dependency 'Google-Mobile-Ads-SDK', '7.50.0' + subspec.dependency 'Google-Mobile-Ads-SDK', '7.55.0' subspec.source_files = "mediation/mediatedviews/GoogleAdMob/*.{h,m}" subspec.public_header_files = "mediation/mediatedviews/GoogleAdMob/ANAdAdapterNativeAdMob.h" subspec.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '${PODS_ROOT}/Google-Mobile-Ads-SDK/**' } diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 5f5f21923..e91494c4b 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,17 @@ +## 7.1 +### New Feature ++ MS-3956 Added ANAdResponseInfo to return associated data with Ad response + +### Mediation partner upgrade ++ Google AdMob SDK v7.55.0 + +### Improvements/Bug Fixes ++ MS-3882 Added option to include "publisher_id" in Ad request ++ MS-3896 Fixed bug on Interstitial Video Ad close feature ++ MS-4166 Fixed VideoAd OMID session tracker firing bug + + + ## 7.0 ### New Feature diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m index be6011464..164a5209f 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m @@ -125,7 +125,7 @@ - (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestErro case kGADErrorTimeout: code = ANAdResponseNetworkError; break; - case kGADErrorInterstitialAlreadyUsed: + case kGADErrorAdAlreadyUsed: code = ANAdResponseInternalError; break; case kGADErrorMediationDataError: diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m index d27e71e3b..c1b5da609 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m @@ -189,7 +189,7 @@ - (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestErro case kGADErrorTimeout: code = ANAdResponseNetworkError; break; - case kGADErrorInterstitialAlreadyUsed: + case kGADErrorAdAlreadyUsed: code = ANAdResponseInternalError; break; case kGADErrorMediationDataError: diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m index 28c9759d9..339182dd8 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m @@ -89,7 +89,7 @@ + (ANAdResponseCode)responseCodeFromRequestError:(GADRequestError *)error { case kGADErrorTimeout: code = ANAdResponseNetworkError; break; - case kGADErrorInterstitialAlreadyUsed: + case kGADErrorAdAlreadyUsed: code = ANAdResponseInternalError; break; case kGADErrorMediationDataError: diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m index 88f2cdc10..25d84a464 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m @@ -90,7 +90,7 @@ - (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADReque case kGADErrorTimeout: code = ANAdResponseNetworkError; break; - case kGADErrorInterstitialAlreadyUsed: + case kGADErrorAdAlreadyUsed: code = ANAdResponseInternalError; break; case kGADErrorMediationDataError: @@ -120,6 +120,10 @@ - (void)interstitialWillPresentScreen:(GADInterstitial *)ad { [self.delegate willPresentAd]; } +- (void)interstitialDidFailToPresentScreen:(nonnull GADInterstitial *)ad{ + [self.delegate failedToDisplayAd]; +} + - (void)interstitialWillDismissScreen:(GADInterstitial *)ad { [self.delegate willCloseAd]; } diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m index 254008585..1da7e558a 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m @@ -90,7 +90,7 @@ - (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADReque case kGADErrorTimeout: code = ANAdResponseNetworkError; break; - case kGADErrorInterstitialAlreadyUsed: + case kGADErrorAdAlreadyUsed: code = ANAdResponseInternalError; break; case kGADErrorMediationDataError: diff --git a/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h b/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h index 58b9638fa..03058f9eb 100644 --- a/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h +++ b/sdk/AppNexusNativeSDK/AppNexusNativeSDK.h @@ -25,11 +25,12 @@ FOUNDATION_EXPORT const unsigned char AppNexusNativeSDKVersionString[]; #import #import -#import +#import #import #import + +#import #import -#import #import #import @@ -37,6 +38,9 @@ FOUNDATION_EXPORT const unsigned char AppNexusNativeSDKVersionString[]; #import #import #import + +#import + #import #import diff --git a/sdk/AppNexusSDK.xcodeproj/project.pbxproj b/sdk/AppNexusSDK.xcodeproj/project.pbxproj index 9ce133f17..9230ab9fe 100644 --- a/sdk/AppNexusSDK.xcodeproj/project.pbxproj +++ b/sdk/AppNexusSDK.xcodeproj/project.pbxproj @@ -227,6 +227,10 @@ 8AFC046F1A2E75AE00BEA485 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AFC046E1A2E75AE00BEA485 /* AdSupport.framework */; }; 8AFC04711A2E760800BEA485 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AFC04701A2E760800BEA485 /* MessageUI.framework */; }; 8AFC04731A2E78E400BEA485 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AFC04721A2E78E400BEA485 /* StoreKit.framework */; }; + 9706554F232B93A200D484D4 /* ANAdResponseInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 9706554D232B93A200D484D4 /* ANAdResponseInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 97065550232B93A200D484D4 /* ANAdResponseInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 9706554D232B93A200D484D4 /* ANAdResponseInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 97065551232B93A200D484D4 /* ANAdResponseInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9706554E232B93A200D484D4 /* ANAdResponseInfo.m */; }; + 97065552232B93A200D484D4 /* ANAdResponseInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9706554E232B93A200D484D4 /* ANAdResponseInfo.m */; }; 972025CE222FD90E00C13454 /* ANVerificationScriptResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 97EC51EB2229782B00B740DF /* ANVerificationScriptResource.h */; settings = {ATTRIBUTES = (Private, ); }; }; 973B23AB238D1E4C00717D67 /* ANUSPrivacySettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 973B23A9238D1E4C00717D67 /* ANUSPrivacySettings.h */; settings = {ATTRIBUTES = (Public, ); }; }; 973B23AC238D1E4C00717D67 /* ANUSPrivacySettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 973B23A9238D1E4C00717D67 /* ANUSPrivacySettings.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -522,6 +526,8 @@ 8AFC046E1A2E75AE00BEA485 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; 8AFC04701A2E760800BEA485 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; 8AFC04721A2E78E400BEA485 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; + 9706554D232B93A200D484D4 /* ANAdResponseInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANAdResponseInfo.h; sourceTree = ""; }; + 9706554E232B93A200D484D4 /* ANAdResponseInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANAdResponseInfo.m; sourceTree = ""; }; 973B23A9238D1E4C00717D67 /* ANUSPrivacySettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANUSPrivacySettings.h; sourceTree = ""; }; 973B23AA238D1E4C00717D67 /* ANUSPrivacySettings.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANUSPrivacySettings.m; sourceTree = ""; }; 97A590D2228EBBD600D1C75C /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; @@ -638,6 +644,7 @@ 00D6B04320D1BAB9007A3439 /* Viewability */, 8ABB76691A00385C00FEAD9D /* ANAdConstants.h */, ECE4EA8D194B768A0069D934 /* ANAdProtocol.h */, + 9706554D232B93A200D484D4 /* ANAdResponseInfo.h */, ECE4EA8E194B768A0069D934 /* ANAdView.h */, ECE4EA8F194B768A0069D934 /* ANBannerAdView.h */, ECE4EA90194B768A0069D934 /* ANCustomAdapter.h */, @@ -801,6 +808,7 @@ 4FE7CE781F2FD6A100A5044A /* universalTag */, 4F131E8A1F71CCE50019FDAC /* ANAdFetcherResponse.h */, 4F131E8B1F71CCE50019FDAC /* ANAdFetcherResponse.m */, + 9706554E232B93A200D484D4 /* ANAdResponseInfo.m */, 8AD618A41981C11F00AC0780 /* ANAdView.m */, 8AD618A51981C11F00AC0780 /* ANAdViewInternalDelegate.h */, 8AC7C5361A3B5CEF00AA5548 /* ANAdWebViewController.h */, @@ -978,6 +986,7 @@ 006F6B9E2295F72A003D2DF0 /* ANAdFetcherBase.h in Headers */, 607A21141F85557E00BD8353 /* ANAdFetcherResponse.h in Headers */, 8A9AEDB21A1BE8C200C58BDA /* ANAdProtocol.h in Headers */, + 9706554F232B93A200D484D4 /* ANAdResponseInfo.h in Headers */, 8AE5E11E1A2FDC7700FDE858 /* ANAdView+PrivateMethods.h in Headers */, 8A9AEDB31A1BE8C200C58BDA /* ANAdView.h in Headers */, 8A9AEDCE1A1BF88200C58BDA /* ANAdViewInternalDelegate.h in Headers */, @@ -1070,6 +1079,7 @@ 4F06400923A2E7DC00E7920A /* ANAdFetcherBase.h in Headers */, F5731B7A228C94720012B134 /* ANAdFetcherResponse.h in Headers */, F5731BBE228C99BC0012B134 /* ANAdProtocol.h in Headers */, + 97065550232B93A200D484D4 /* ANAdResponseInfo.h in Headers */, F5731B5D228C8DF50012B134 /* ANBaseAdObject.h in Headers */, F5731B6B228C8E3E0012B134 /* ANBaseUrlConfig.h in Headers */, F5731B81228C94C70012B134 /* ANBrowserViewController.h in Headers */, @@ -1277,6 +1287,7 @@ files = ( 006F6B9B2295F70E003D2DF0 /* ANAdFetcherBase.m in Sources */, 607A20FE1F85540800BD8353 /* ANAdFetcherResponse.m in Sources */, + 97065551232B93A200D484D4 /* ANAdResponseInfo.m in Sources */, 8A9AEDF01A1BF99D00C58BDA /* ANAdView.m in Sources */, 8AE7AD9F1A7AC4F6009E2F2F /* ANAdWebViewController.m in Sources */, 8A9AEDF21A1BF99D00C58BDA /* ANANJAMImplementation.m in Sources */, @@ -1357,6 +1368,7 @@ files = ( 4F06400823A2E7D700E7920A /* ANAdFetcherBase.m in Sources */, F5731B79228C94700012B134 /* ANAdFetcherResponse.m in Sources */, + 97065552232B93A200D484D4 /* ANAdResponseInfo.m in Sources */, F5731B5E228C8DFA0012B134 /* ANBaseAdObject.m in Sources */, F5731B82228C94CC0012B134 /* ANBrowserViewController.m in Sources */, F5731B56228C8DD50012B134 /* ANCarrierObserver.m in Sources */, diff --git a/sdk/AppNexusSDK/AppNexusSDK.h b/sdk/AppNexusSDK/AppNexusSDK.h index 4b1961a40..97001fd66 100644 --- a/sdk/AppNexusSDK/AppNexusSDK.h +++ b/sdk/AppNexusSDK/AppNexusSDK.h @@ -43,6 +43,7 @@ FOUNDATION_EXPORT const unsigned char AppNexusSDKVersionString[]; #import #import +#import #import #import diff --git a/sdk/AppNexusSDK/Info.plist b/sdk/AppNexusSDK/Info.plist index f0f4512b3..ac97f4f4c 100644 --- a/sdk/AppNexusSDK/Info.plist +++ b/sdk/AppNexusSDK/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 7.0 + 7.1 CFBundleSignature ???? CFBundleVersion diff --git a/sdk/sourcefiles/ANAdProtocol.h b/sdk/sourcefiles/ANAdProtocol.h index c8f9e7a80..4f050fe5d 100644 --- a/sdk/sourcefiles/ANAdProtocol.h +++ b/sdk/sourcefiles/ANAdProtocol.h @@ -19,7 +19,7 @@ #import "ANAdConstants.h" #import "ANLocation.h" - +#import "ANAdResponseInfo.h" @class ANLocation; @@ -43,6 +43,11 @@ */ @property (nonatomic, readonly, assign) NSInteger memberId; +/** + * A publisher ID associates this member with a publisher. + */ +@property (nonatomic, readwrite, assign) NSInteger publisherId; + /** The user's location. See ANLocation.h in this directory for details. @@ -142,7 +147,7 @@ Report the Ad Type of the returned ad object. Not available until load is complete and successful. */ -@property (nonatomic, readwrite) ANAdType adType; +@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. @@ -223,7 +228,16 @@ 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; +@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 + * + * adResponseInfo should be accessible from response Object only -- ANBannerAdView, ANInterstitialAd, ANInstreamVideoAd and ANNativeAdResponse). + * It is placed into ANAdProtocol instead of ANAdProtocolFoundation to avoid adResponseInfo being accessed through ANNativeAdRequest. + */ +@property (nonatomic, readwrite, strong, nullable) ANAdResponseInfo *adResponseInfo; @end diff --git a/sdk/sourcefiles/ANAdResponseInfo.h b/sdk/sourcefiles/ANAdResponseInfo.h new file mode 100644 index 000000000..c3ea82d1d --- /dev/null +++ b/sdk/sourcefiles/ANAdResponseInfo.h @@ -0,0 +1,56 @@ +/* Copyright 2019 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 "ANAdConstants.h" + +@interface ANAdResponseInfo : NSObject +/** + An AppNexus creativeID for the current creative that is displayed + */ +@property (nonatomic, readwrite, strong, nullable) NSString *creativeId; + +/** + Report the Ad Type of the returned ad object. + Not available until load is complete and successful. + */ +@property (nonatomic, readwrite) ANAdType adType; + +/** + An AppNexus placement ID. A placement ID is a numeric ID that's + associated with a place where ads can be shown. In our + implementations of banner and interstitial ad views, we associate + each ad view with a placement ID. + */ +@property (nonatomic, readwrite, strong, nullable) NSString *placementId; + +/** + An AppNexus member ID. A member ID is a numeric ID that's associated + with the member that this app belongs to. + */ +@property (nonatomic, readwrite, assign) NSInteger memberId; + +/** + An AppNexus contentSource. A contentSource can be RTB , CSM or SSM + */ +@property (nonatomic, readwrite, strong, nullable) NSString *contentSource; + +/** + An AppNexus networkName. A networkName belongs to mediation adaptor class based on UTv3 response + */ +@property (nonatomic, readwrite, strong, nullable) NSString *networkName; + +@end + diff --git a/sdk/sourcefiles/ANMultiAdRequest.h b/sdk/sourcefiles/ANMultiAdRequest.h index d7fc858d5..d044a84bf 100644 --- a/sdk/sourcefiles/ANMultiAdRequest.h +++ b/sdk/sourcefiles/ANMultiAdRequest.h @@ -67,6 +67,7 @@ limitations under the License. * PARAMETERS * * memberId: Member ID common to all encapsulated AdUnits. + * publisherID: Publisher ID common to all encapsulated AdUnits. * * delegate: Used to receive notification of success or failure from this instance and all encapsulated AdUnits. * @@ -76,12 +77,18 @@ limitations under the License. delegate: (nullable id)delegate adUnits: (nonnull id) firstAdUnit, ... NS_REQUIRES_NIL_TERMINATION; +- (nullable instancetype)initWithMemberId: (NSInteger)memberId + publisherId: (NSInteger)publisherId + delegate: (nullable id)delegate + adUnits: (nonnull id) firstAdUnit, ... NS_REQUIRES_NIL_TERMINATION; + /** * Initializer for ANMultiAdRequest. This method takes all essential arguments and invokes load method. Returns a new instance upon success. * * PARAMETERS * * memberId: Member ID common to all encapsulated AdUnits. + * publisherID: Publisher ID common to all encapsulated AdUnits. * * delegate: Used to receive notification of success or failure from this instance and all encapsulated AdUnits. * @@ -91,18 +98,27 @@ limitations under the License. delegate: (nullable id)delegate adUnits: (nonnull id) firstAdUnit, ... NS_REQUIRES_NIL_TERMINATION; +- (nullable instancetype)initAndLoadWithMemberId: (NSInteger)memberId + publisherId: (NSInteger)publisherId + delegate: (nullable id)delegate + adUnits: (nonnull id) firstAdUnit, ... NS_REQUIRES_NIL_TERMINATION; + /** * Initializer for ANMultiAdRequest. This method takes the minimum required arguments and returns a new instance on success. * * PARAMETERS * * memberId: Member ID common to all encapsulated AdUnits. + * publisherID: Publisher ID common to all encapsulated AdUnits. * * delegate: Used to receive notification of success or failure from this instance and all encapsulated AdUnits. */ - (nullable instancetype)initWithMemberId: (NSInteger)memberId andDelegate: (nullable id)delegate; +- (nullable instancetype)initWithMemberId: (NSInteger)memberId + publisherId: (NSInteger)publisherId + andDelegate: (nullable id)delegate; /** diff --git a/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h b/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h index 457a4c089..c6494b7c3 100644 --- a/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h +++ b/sdk/sourcefiles/Categories/ANAdView+PrivateMethods.h @@ -38,6 +38,7 @@ - (void)loadAdFromVast: (nonnull NSString *)xml width: (int)width height: (int)height; +- (void)setAdResponseInfo:(nonnull ANAdResponseInfo *)adResponseInfo; - (void)setCreativeId:(nonnull NSString *)creativeId; @@ -55,7 +56,6 @@ @property (nonatomic, readwrite, strong, nonnull) NSString *utRequestUUIDString; -- (void)ingestAdResponseTag: (nonnull id)tag - totalLatencyStartTime: (NSTimeInterval)totalLatencyStartTime; +- (void)ingestAdResponseTag: (nonnull id)tag; @end diff --git a/sdk/sourcefiles/Categories/NSString+ANCategory.h b/sdk/sourcefiles/Categories/NSString+ANCategory.h index 2c6c25bce..c1d4d7274 100644 --- a/sdk/sourcefiles/Categories/NSString+ANCategory.h +++ b/sdk/sourcefiles/Categories/NSString+ANCategory.h @@ -21,7 +21,6 @@ - (NSString *)an_encodeAsURIComponent; - (NSString *)an_stringByAppendingUrlParameter:(NSString *)name value:(NSString*)value; - (NSString *)an_responseTrackerReasonCode:(int)reasonCode - latency:(NSTimeInterval)latency - totalLatency:(NSTimeInterval) totalLatency; + latency:(NSTimeInterval)latency; @end diff --git a/sdk/sourcefiles/Categories/NSString+ANCategory.m b/sdk/sourcefiles/Categories/NSString+ANCategory.m index 4b333c58c..6c8330b68 100644 --- a/sdk/sourcefiles/Categories/NSString+ANCategory.m +++ b/sdk/sourcefiles/Categories/NSString+ANCategory.m @@ -81,9 +81,7 @@ - (NSString *)an_stringByAppendingUrlParameter:(NSString *)name - (NSString *)an_responseTrackerReasonCode:(int)reasonCode latency:(NSTimeInterval)latency - totalLatency:(NSTimeInterval) totalLatency{ - - +{ // append reason code NSString *urlString = [self an_stringByAppendingUrlParameter: @"reason" value: [NSString stringWithFormat:@"%d",reasonCode]]; @@ -92,10 +90,6 @@ - (NSString *)an_responseTrackerReasonCode:(int)reasonCode urlString = [urlString an_stringByAppendingUrlParameter: @"latency" value: [NSString stringWithFormat:@"%.0f", latency]]; } - if (totalLatency > 0) { - urlString = [urlString an_stringByAppendingUrlParameter: @"total_latency" - value :[NSString stringWithFormat:@"%.0f", totalLatency]]; - } ANLogInfo(@"responseURLString=%@", urlString); diff --git a/sdk/sourcefiles/Resources/MobileVastPlayer.js b/sdk/sourcefiles/Resources/MobileVastPlayer.js index 259090001..d4f66bb37 100644 --- a/sdk/sourcefiles/Resources/MobileVastPlayer.js +++ b/sdk/sourcefiles/Resources/MobileVastPlayer.js @@ -1,4 +1,4 @@ -/*! (c)2019 AppNexus, Inc. v1.5.1 +/*! (c)2020 AppNexus, Inc. v1.5.1 This code contains portions of Video.js modified by AppNexus. Video.js is Copyright Brightcove, Inc. and Licensed under the Apache License, Version 2.0 (the “License”); you may not use Video.js 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 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. @@ -37,19 +37,19 @@ Permission is here by granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -var APNVideo_MobileVastPlayer=function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function i(e,t){if(!e)return null;for(var n=0;n0){var r=Number(i.substring(0,i.length-2));t-=2*r,n-=2*r}k.style.width=t+"px",k.style.height=n+"px";var a=u(T);e("repositionPlayer: targetDiv absolute posiotion ="+a.left+", "+a.top),k.style.left=a.left+"px",k.style.top=a.top+"px",e("repositionPlayer: size = "+t+", "+n),S.overlayPlayer?N.resizePlayer(t,n):N.resizeVideo(null,!1,null)}}function a(t){e("Resize event happend"),k&&N&&(O?(O=!1,S.fitInContainer&&(k.style.zIndex=R),setTimeout(function(){r(),"click"!==S.initialPlayback&&N.play()},100)):r()),G&&G(t)}function c(t){switch(e("Got notification: "+t),t){case"leaveFullscreen":q();break;default:e("Unknown player notification: "+t)}}function u(e){for(var t=0,n=0;e&&"BODY"!==e.tagName&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);){var i=document.defaultView.getComputedStyle(e,null).position;if(i&&""!==i&&"static"!==i)break;t+=e.offsetLeft-e.scrollLeft+e.clientLeft,n+=e.offsetTop-e.scrollTop+e.clientTop,e=e.offsetParent}return{left:t,top:n}}function p(){var t,n=function(){try{var e=navigator.platform,t=navigator.userAgent,n=navigator.appVersion;if(/iP(hone|od|ad)/.test(e)&&!/CriOS/.test(t)){var i=n.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3]||0,10)]}return[0,0,0]}catch(o){return[0,0,0]}};try{t=n()[0]>=8&&S.enableInlineVideoForIos===!0}catch(i){e(i)}return t}function h(e){var t=document.defaultView.getComputedStyle(e,null).zIndex;return"auto"!==t?t:0}function m(e,t){if(!e.children)return t;for(var n=Math.max(t,h(e)),i=0;i-1||navigator.appVersion.indexOf("Android")>-1}function y(){return navigator.userAgent.indexOf("Chrome")>-1}function A(){var e=navigator.appVersion.indexOf("Chrome/");if(e>=0){var t=navigator.appVersion.substr(e+7);return e=t.indexOf("."),e>0?Number(t.substr(0,e)):0}return 0}function b(n,i,r){e("play function called"),P=!1,j=3e3,S.vpaidTimeout&&(j=S.vpaidTimeout),x=null,_=!1,V=!1,r&&(_=r),i&&(x=function(e,t){t=t?t:{};var n={event:e,params:t};i(n)}),f()&&(S.showFullScreenButton===!0?S.allowFullscreen=!0:S.allowFullscreen=!1),v()&&(S.enableInlineVideoForIos=!1),e("options before PlayerDefaultOption: ",JSON.stringify(S)),S=s(S),e("options after PlayerDefaultOption: ",JSON.stringify(S)),S.width=n.offsetWidth,S.height=n.offsetHeight;var a=n.style.borderWidth;if(a&&a.length>0){var l=Number(a.substring(0,a.length-2));S.width-=2*l,S.height-=2*l}S.playerHeight=S.height,p()&&(S.playerHeight-=30),o()&&(S.fullscreenMode=!0),e("offsetWidth="+n.offsetWidth+", offsetHeight="+n.offsetHeight+", borderWidth="+n.style.borderWidth);var h=document.createElement("div");h.style.width=S.width+"px",S.fitInContainer?h.style.height=S.height+"px":S.cachePlayer&&S.overlayPlayer?h.style.height="1px":h.style.height=S.height+"px",h.style.backgroundColor="black",h.id=n.id+"_overlay_"+(new Date).getTime();var b=u(n);e("targetDiv absolute posiotion ="+b.left+", "+b.top),h.style.position="absolute",h.style.left=b.left+"px",h.style.top=b.top+"px",S.fitInContainer?h.style.zIndex=Math.max(100,m(n,0)+1):(R=Math.max(100,m(n,0)+1),S.cachePlayer&&S.overlayPlayer?h.style.zIndex=0:h.style.zIndex=R),n.appendChild(h),e("player container offsetLeft = "+h.offsetLeft+", offsetTop = "+h.offsetTop),k=h,T=n,E=(new Date).getTime(),e("timeToReady = "+j+", start time = "+E),C=setTimeout(function(){P||(z(!1),x&&x("Timed-out",{}))},j);var w=function(n,i){e("VastPlayer > cbRenderVideo called");try{e("VastPlayer > cbRenderVideo options: ",JSON.stringify(i))}catch(o){}t(i)};I.cbRenderVideo=w,I.cbWhenDestroy=z,I.cbWhenReady=J,I.cbWhenQuartile=U,I.cbWhenVideoComplete=F,I.cbWhenSkipped=B,I.cbWhenFullScreen=W,I.cbWhenAudio=$,I.cbWhenClickOpenUrl=H,I.cbCoreVideoEvent=L,S.playerNotification=c,S.overlayPlayer&&(S.hasOwnProperty("allowFullscreen")||(S.allowFullscreen=!1)),e("VP >> before options.initialAudio = "+S.initialAudio),"auto"===S.initialPlayback&&"on"===S.initialAudio&&g()&&y()&&A()>=53&&(S.showMute=!0,S.showVolume=!0),e("VP >> after options.initialAudio = "+S.initialAudio),d(k,S,I)}e("VERSION 1.4.15");var k,T,w,E,S={},I={},C=null,P=!1,j=3e3,x=null,_=!1,V=!1,D=null,M=!1,N=null,O=!1,R=0,U=function(t){e("VastPlayer > cbWhenQuartile "+t),x(t,{})},L=function(e,t){var n={type:e,name:t};if("AdHandler"===n.type&&"video_impression"===n.name)try{var i=new CustomEvent("outstream-impression");k.dispatchEvent(i)}catch(o){error(o)}for(var r=[{type:"AdHandler",name:"video_start",mappedEventName:"videoStart"},{type:"AdHandler",name:"rewind",mappedEventName:"videoRewind"},{type:"AdHandler",name:"video_fullscreen_enter",mappedEventName:"video-fullscreen-enter"},{type:"AdHandler",name:"video_fullscreen_exit",mappedEventName:"video-fullscreen-exit"}],a=0;a cbWhenVideoComplete "+t),x(t,{})},B=function(t){e("VastPlayer > cbWhenSkipped "+t),x(t,{})},$=function(t){e("VastPlayer > cbWhenAudio "+t),x(t,{})},H=function(e){x(e,{})},W=function(t){e("VastPlayer > cbWhenFullScreen "+t),x(t,{})},z=function(t,n,i){e("VastPlayer > cbTerminate isError: "+t);var r="unknown";k&&(r=k.id.toString()),e("VastPlayer > cbTerminate: bTerminated = "+V+", targetElement id = "+r),M=!1,V||(V=!0,n||q(),!i&&o()&&S.overlayPlayer&&q(),k&&(N&&(N.isPlayingVideo&&(e("VastPlayer > cbTerminate: pause ad"),N.pause()),k.style.height="1px",N.resizePlayer(1,1)),setTimeout(function(){k&&(k.innerHTML="",T.removeChild(k)),k=null},2e3)),x&&t&&x("video-error",{}))},q=function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},J=function(t){var n,i,r,a,s;n=t&&t.options&&t.options.video&&t.options.video.url?t.options.video.url:"",i=t&&t.options&&t.options.data&&t.options.data.vastDurationMsec?t.options.data.vastDurationMsec:0,r=t&&t.options&&t.options.finalVastXml?t.options.finalVastXml:"",a=t&&t.options&&t.options.finalVastUri?t.options.finalVastUri:"",s=t&&t.getFinalAspectRatio()?t.getFinalAspectRatio():"",V||(P=!0,N=t,e("VastPlayer > cbWhenReady in "+((new Date).getTime()-E)+" msecs"),x&&x("adReady",{creativeUrl:n,duration:i,vastXML:r,vastCreativeUrl:a,aspectRatio:s}),"click"===S.initialPlayback||S.cachePlayer||(o()&&S.overlayPlayer?S.forceAdInFullscreen?(O=!0,q()):(k&&(k.style.width="1px",k.style.height="1px"),z(!1,!0,!0)):N.play()))},G=null;document.body.onresize&&(G=document.body.onresize),window.onresize=a,this.playVast=function(t,n,o,r,a){e("VP >> playVast function called playerId = "+this.vastPlayerId),z(!1,!0),i(),S=n,S.vastXml=o,b(t,r,a)},this.playAdObject=function(t,n,o,r,a){e("VP >> playAdObject function called playerId = "+this.vastPlayerId+", cache mode = "+n.cachePlayer),z(!1,!0),i(),S=n,"string"==typeof o?S.vastXml=o:(S.useAdObj=!0,S.adObj=o),b(t,r,a)},this.stop=function(){C&&(clearTimeout(C),C=null),z(!1)},this.removeFromPage=function(){C&&(clearTimeout(C),C=null),V=!0,k&&(k.innerHTML="",T.removeChild(k),k=null)},this.play=function(){e("VP >> play function called playerId = "+this.vastPlayerId),N&&(S.cachePlayer=!1,o()&&S.overlayPlayer?S.forceAdInFullscreen?(O=!0,q()):z(!1,!0,!0):(k&&S.fitInContainer===!1&&(k.style.zIndex=R),r(),"click"!==S.initialPlayback&&N.play()))},this.sendPlay=function(){e("VP >> sendPlay function called playerID = "+this.vastPlayerId),N&&!N.isPlayingVideo&&N.play()},this.sendPause=function(){e("VP >> sendPause function called playerID = "+this.vastPlayerId),N&&N.isPlayingVideo&&N.pause()},this.handleFullscreen=function(e){N&&(e?T.requestFullscreen?T.requestFullscreen():T.webkitRequestFullscreen?T.webkitRequestFullscreen():T.mozRequestFullScreen?T.mozRequestFullScreen():T.msRequestFullscreen&&T.msRequestFullscreen():document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen())},this.vastPlayerId=(new Date).getTime(),this.isTerminated=function(){return V},this.getIsVideoPlaying=function(){var e=!(!N||!N.isPlayingVideo);return e},this.getCurrentPlayHeadTime=function(){var e=0;return w&&w.adVideoPlayer&&"function"==typeof w.adVideoPlayer.player&&(e=1e3*w.adVideoPlayer.player().currentTime(),e=parseInt&&"function"==typeof parseInt?parseInt(e):e),e}};e.exports={playAdObject:function(e,t,n,i,o){var a=r(t.targetElementId,t.cachePlayer);a&&a.playAdObject(e,t,n,i,o)},playVast:function(e,t,n,i,o){var a=r(t.targetElementId);a&&a.playVast(e,t,n,i,o)},loadAndPlayVast:function(e,t,i,o,a){var s=n(29);s.load(i,function(s,l){if(s||0===l.length){var d=n(28);d.logDebug("Failed to load "+i,"Vast Video Player")}else{var c=r(t.targetElementId);c&&c.playVast(e,t,l,o,a)}})},stop:function(e,t){var n=o(e.id,t);n&&n.stop()},removeFromPage:function(e){var t=o(e);t&&t.removeFromPage()},play:function(e,t){var n=i(e,t);n&&n.play()},sendPlay:function(e){var t=o(e);t&&t.sendPlay()},sendPause:function(e){var t=o(e);t&&t.sendPause()},handleFullscreen:function(e,t){var n=o(e);n&&n.handleFullscreen(t)},getCurrentPlayHeadTime:function(e){var t=o(e);if(t)return t.getCurrentPlayHeadTime()},getIsVideoPlaying:function(e){var t=o(e);if(t)return t.getIsVideoPlaying()}}},function(e,t){var n=function(e){function t(e){return"object"==typeof e}function n(e){return null===e}function i(e){var o,r,a;for(r=1;r-1},T=["AdPaused","AdVolumeChange"],w=["AdLoaded","AdStopped","AdSkippableStateChange","AdLinearChange","AdDurationChange","AdRemainingTimeChange","AdLog","AdError"],E=1,S=402,I=900,C=405,P={initialPlayback:"auto",initialAudio:"off",skippable:{enabled:!0,allowOverride:!1,videoThreshold:15,videoOffset:5,skipLocation:"top-left",skipText:"Video can be skipped in %%TIME%% seconds",skipButtonText:"SKIP"},adText:"Ad",showMute:!0,showVolume:!0,showProgressBar:!0,showPlayToggle:!0,showBigPlayButton:!0,allowFullscreen:!0,playerSkin:{customPlayerSkin:"",controlBarHeight:30,topDividerColor:"#606060",bottomDividerColor:"#606060",topDividerWidth:1,bottomDividerWidth:1,videoBackgroundColor:"#000000"},disableCollapse:{enabled:!1,replay:!1},endCard:{enabled:!1,clickable:!0,color:"",imageUrl:"",imageWidth:"",imageHeight:"",showCompanion:!0},enableInlineVideoForIos:!0,delayExpandUntilVPAIDInit:!1,delayExpandUntilVPAIDImpression:!1,flash:{swf:"http://acdn.adnxs.com/video/player/vastPlayer/AppnexusFlashPlayer.swf"},vpaidTimeout:5e3,waterfallTimeout:3e4,waterfallSteps:-1,fixedSizePlayer:!0,disableTopBar:!1,sideStream:{enabled:!1,position:"bottom-right",xOffset:0,yOffset:0,space:"empty",dynamicBigPlayButtonOnSideStream:!0},sideStreamObject:{},preloadInlineAudioForIos:!1,controlBarPosition:"over",customPlayerSkinCss:"",customButton:{enabled:!1,url:"",altText:"",imageSrc:"",imgWidth:50,imgHeight:30},enableNativeInline:!1,androidDSOverride:!1,cbNotification:function(){},parentIframeIsModal:!1,learnMore:{enabled:!1,clickToPause:!0,text:"Learn More",separator:"-"},playerContextId:"anadvideoplayer",data:{skipOffset:"",durationMsec:null,skipOffsetMsec:null,isVastVideoSkippable:!1,vastProgressEvent:{},vastDurationMsec:null,adIcons:null},test:function(){}},j={externalNameOfVideoPlayer:v,videoPlayerObj:i,autoplayHandler:h,mobileSupport:h,customSkinning:u,options:{},adVideoPlayer:{},callbackForAdUnit:{},vpaidData:{},iframeVideoWrapper:{},isPlayingVideo:!1,isDoneInitialPlay:!1,isFullscreen:!1,heightOffset:0,explicitPaused:!1,aspectRatio:0,finalAspectRatio:0,videoObjectId:{},isViewable:!1,isSkipped:!1,isCompleted:!1,isMuted:!1,isExplicitMuted:!1,hasBeenUnmuted:!1,isChrome:navigator.userAgent.indexOf("Chrome")>-1,videojs_vpaid:r,overlayPlayer:!1,forceToSkip:!1,ExtendDefaultOption:a,delayEventHandler:null,pausedByViewability:!1,mutedByVisibility:!1,gotAdImpressionForFlash:!1,gotAdStartedForFlash:!1,isReadyToExpandForMobile:!1,isAlreadyPlaingForVPAID:!1,isSideStreamActivated:!1,isExpanded:!0,isVideoCompleteInjected:!1,isFullscreenToggled:!1,toggleWindowFocus:!0,viewabilityTracking:null,isDoneFirstLoadStart:!1,flashBlockerTimeout:null,startedReplay:!1,Utils:l,isAlreadyStart:!1,isEnded:!1,blockTrackingUserActivity:!1,videoId:"",divIdForVideo:"",init:function(e){var t=a(P,e);return this.options=t,"boolean"==typeof this.options.disableCollapse&&(this.options.disableCollapse={enabled:this.options.disableCollapse,replay:!1}),this.options.skippable.allowOverride===!0&&(this.options.skippable.videoThreshold=0,this.options.skippable.enabled=!0),this.delayEventHandler=new d,this.delayEventHandler.suppress(this.options.delayExpandUntilVPAIDImpression),this.delayEventHandler.start(),this.viewabilityTracking=new p,t},getValueFromPlayer:function(e){var t=0;try{"controlBar.height"===e&&this.adVideoPlayer&&this.adVideoPlayer.controlBar&&this.adVideoPlayer.controlBar.height&&"function"==typeof this.adVideoPlayer.controlBar.height&&"html5"===this.decidePlayer(this.options.requiredPlayer)&&(t=this.adVideoPlayer.controlBar.height())}catch(n){b(n)}return t},decidePlayer:function(e){var t="",n="flash",i="html5",o=function(){var e=navigator.appVersion.indexOf("Mobile"),t=navigator.appVersion.indexOf("Android");return e>-1||t>-1},r=this.options.playerTechnology;if(r&&r.length&&1===r.length)switch(e){case 1:t=i;break;case 2:t=n;break;case 0:t=r[0]===i?i:n}if(r&&r.length&&2===r.length)switch(e){case 1:t=i;break;case 2:t=n;break;case 0:t=i}return o()&&(t=i),t},buildPlayer:function(e,t){var n=this;if(t.waterfallStepId&&A("CHECKING AUTOPLAY FOR WATERFALL STEP: "+t.waterfallStepId),"html5"===this.decidePlayer(t.requiredPlayer)&&this.autoplayHandler&&!t.overlayPlayer){var i,o=function(i){var o=n.autoplayHandler.videoPolicy;switch(i){case o.allowAutoplay:break;case o.stopMediaWithSound:"on"===t.initialAudio?("auto"!==t.initialPlayback&&"mouseover"!==t.initialPlayback||(t.initialAudio="off",t.audioOnMouseover=!1),t.isWaterfall===!0&&(t.adAttempt>0?(t.initialAudio="off",t.audioOnMouseover=!1):t.audioOnMouseover=!0)):"auto"!==t.initialPlayback&&"mouseover"!==t.initialPlayback||(t.audioOnMouseover=!1);break;case o.neverAutoplay:t.initialPlayback="click",t.isWaterfall&&(t.isWaterfall=!1,t.stopWaterfall=!0)}t.waterfallStepId&&A("BUILDING PLAYER FOR WATERFALL STEP: "+t.waterfallStepId),n.buildPlayerCallback(e,t)};i=!h.isMobile()&&("on"===t.initialAudio||t.audioOnMouseover===!0),n.autoplayHandler.getAutoplayPolicy(o,i)}else n.buildPlayerCallback(e,t)},buildPlayerCallback:function(e,t){this.callbackForAdUnit=e,t.hasOwnProperty("overlayPlayer")&&(this.overlayPlayer=t.overlayPlayer,t.hasOwnProperty("fullscreenMode")&&(t.allowFullscreen=!1)),k()&&"flash"===this.decidePlayer(this.options.requiredPlayer)||this.options.targetElement&&!this.options.firstAdAttempted&&(this.options.targetElement.style.visibility="hidden"),"flash"===this.decidePlayer(this.options.requiredPlayer)&&(this.options.disableCollapse.replay=!1);var n=(new Date).getTime()+Math.floor(1e4*Math.random()),i="APNVideo_Player_"+n;this.externalNameOfVideoPlayer=i,o(e,t,this)},getPlayerStatus:function(){},notifyPlayer:function(e,t){this.adVideoPlayer.handleAdUnitNotification({name:e,value:t})},load:function(){if("html5"===this.decidePlayer(this.options.requiredPlayer)){A("load video");try{this.adVideoPlayer&&void 0!==this.adVideoPlayer&&this.adVideoPlayer.load&&"function"==typeof this.adVideoPlayer.load&&(this.options.delayExpandUntilVPAIDImpression&&this.adVideoPlayer.player()&&this.adVideoPlayer.player().autoplay()&&this.adVideoPlayer.player().autoplay(!1),this.adVideoPlayer.load())}catch(e){b(e)}}},replay:function(){this.isEnded&&(this.dispatchEventToAdunit({name:"rewind"}),this.startedReplay=!0,this.isEnded=!1,this.explicitPlay(),this.adVideoPlayer.controlBar.playToggle&&this.adVideoPlayer.controlBar.playToggle.el()&&this.adVideoPlayer.controlBar.playToggle.el().style&&(this.adVideoPlayer.controlBar.playToggle.el().style["pointer-events"]=""),this.options.sideStream&&this.options.sideStream.wasEnabled===!0&&(this.options.sideStream.enabled=!0,delete this.options.sideStream.wasEnabled),this.options.endCard&&this.options.endCard.enabled&&(this.actualPlayByVideoJS(),l.isIos()||this.adVideoPlayer.bigPlayButton.show()))},actualPlayByVideoJS:function(){this.adVideoPlayer.play(),this.options.vpaid&&this.adVideoPlayer.trigger("handleManualUserInActive")},play:function(){if(this.isEnded!==!0){var e=h.isMobile()&&h.iOSversion()[0]>=10&&this.options.enableInlineVideoForIos===!1;if(e){var t=this;t.overlayPlayer?t.options.targetElement.style.overflow="":setTimeout(function(){t.options.targetElement.style.overflow=""},t.options.expandTime)}this.isAlreadyPlaingForVPAID=!0,this.isCompleted||(A("play video"),this.isDoneInitialPlay?"html5"===this.decidePlayer(this.options.requiredPlayer)?this.isPlayingVideo||this.dispatchEventToAdunit({name:"video_resume"}):this.isPlayingVideo||this.dispatchEventToAdunit({name:"video_resume"}):this.options.vpaid||(this.dispatchEventToAdunit({name:"video_start"}),this.dispatchEventToAdunit({name:"video_impression"})),this.options.vpaid&&this.isIosInlineRequired()?this.isDoneInitialPlay?this.actualPlayByVideoJS():this.adVideoPlayer.trigger("play"):this.options.vpaid&&this.options.overlayPlayer&&h.isIOS()&&h.iOSversion()[0]<10&&!this.isDoneInitialPlay?this.adVideoPlayer.trigger("play"):this.options.vpaid&&this.options.overlayPlayer&&navigator.appVersion.indexOf("Android")>-1&&this.options.enableWaterfall&&!this.isDoneInitialPlay?this.adVideoPlayer.trigger("play"):this.actualPlayByVideoJS(),"html5"===this.decidePlayer(this.options.requiredPlayer)||(this.isPlayingVideo=!0),this.isDoneInitialPlay=!0,this.isEnded=!1)}},resetVpaid:function(){this.dispatchEventToAdunit({name:"reset"})},pause:function(){this.isPlayingVideo&&(A("pause video"),this.adVideoPlayer.pause(),this.options.vpaid&&this.adVideoPlayer.trigger("handleManualUserActive"),this.isCompleted||this.isEnded||this.dispatchEventToAdunit({name:"video_pause"}))},explicitPause:function(){A("explicit pause video"),this.explicitPaused=!0,this.pause()},explicitPlay:function(){A("explicit play video"),this.explicitPaused=!1,this.play()},mute:function(){this.isMuted||(A("mute audio"),"html5"===this.decidePlayer(this.options.requiredPlayer)?(this.adVideoPlayer.muted(!0),this.dispatchEventToAdunit({name:"video_mute"})):this.adVideoPlayer.mute(),this.isMuted=!0)},explicitMute:function(){A("explicit mute video"),this.isExplicitMuted=!0,this.mute()},unmute:function(){!this.isExplicitMuted&&this.isMuted&&(A("unmute audio"),"html5"===this.decidePlayer(this.options.requiredPlayer)?(this.adVideoPlayer.muted()===!0&&this.adVideoPlayer.muted(!1),(this.isMuted||"off"===this.options.initialAudio)&&this.dispatchEventToAdunit({name:"video_unmute"})):(this.adVideoPlayer.unmute(),this.hasBeenUnmuted=!0),this.isMuted=!1)},explicitUnmute:function(){this.isExplicitMuted=!1,this.unmute()},resizeVideoWithDimensions:function(e,t){var n=this;this.options.width=e,this.options.height=t,n.resizeVideo(n.aspectRatio)},mouseIn:function(){this.adVideoPlayer.mouseIn()},mouseOut:function(){this.adVideoPlayer.mouseOut()},destroy:function(e,t){this.isPlayingVideo=!1,this.adVideoPlayer.pause(),this.isCompleted===!1&&(this.options.vpaid===!1?this.dispatchEventToAdunit({name:"video_skip"}):this.options.vpaid===!0&&this.isSkipped===!1&&this.dispatchEventToAdunit({name:"video_skip"})),"function"==typeof this.callbackForAdUnit.cbWhenSkipped&&this.callbackForAdUnit.cbWhenSkipped("video-skip"),this.isSkipped=!0,this.verificationManager&&this.verificationManager.destroy(),A("destroy");var n=I;"function"==typeof this.callbackForAdUnit.cbWhenDestroy&&(this.overlayPlayer?e&&t?this.callbackForAdUnit.cbWhenDestroy({type:E,code:n,message:t},!0,this.options):this.callbackForAdUnit.cbWhenDestroy(null,!0,this.options):e&&t?this.callbackForAdUnit.cbWhenDestroy({type:E,code:n,message:t},null,this.options):this.callbackForAdUnit.cbWhenDestroy(null,null,this.options))},destroyWithoutSkip:function(e,t,n,i){try{var o=this,r=function(){o.isPlayingVideo=!1,o.adVideoPlayer&&o.adVideoPlayer.pause&&"function"==typeof o.adVideoPlayer.pause&&o.adVideoPlayer.pause(),o.verificationManager&&o.verificationManager.destroy(),A("destroy without skip: "+o.options.iframeVideoWrapperId);var r=i||I;"function"==typeof o.callbackForAdUnit.cbWhenDestroy&&(o.overlayPlayer?e&&t?(n&&(r=S),o.callbackForAdUnit.cbWhenDestroy({type:E,code:r,message:t},!0,o.options)):o.callbackForAdUnit.cbWhenDestroy(null,!0,o.options):e&&t?(n&&(r=S),o.callbackForAdUnit.cbWhenDestroy({type:E,code:r,message:t},null,o.options)):o.callbackForAdUnit.cbWhenDestroy(null,null,o.options))};o.options.disableCollapseForDelay&&o.options.disableCollapseForDelay>0?setTimeout(r,o.options.disableCollapseForDelay):r()}catch(a){b("failed to destroy/notify by "+a)}},getVideoObject:function(){return this.adVideoPlayer},handleFlashPlay:function(){var e=this,t=function(){e.resizeVideo(e.aspectRatio),A("flash player is ready to play"),e.callbackForAdUnit.cbWhenReady&&e.callbackForAdUnit.cbWhenReady(e)};e.isChrome?(e.setChromeSize(),setTimeout(t,100)):t()},handlePlayerNotification:function(e){"video_time"!==e.name&&A("Got notification from player = "+e.name);var t=this,n={flash_is_respondble:function(){t.flashBlockerTimeout&&(clearTimeout(t.flashBlockerTimeout),t.flashBlockerTimeout=null),A("Flash is respondble")},canplay:function(){if(t.flashBlockerTimeout&&(clearTimeout(t.flashBlockerTimeout),t.flashBlockerTimeout=null,A("Flash is respondble")),t.options.hasOwnProperty("overlayPlayer"))try{t.adVideoPlayer.setDOMPlayerIdAndSize(t.adVideoPlayer.id,t.options.width,t.options.height)}catch(n){A("Failed to execute setDOMPlayerIdAndSize(...) on Flash Player")}if(t.options.vpaid)try{var i=t.adVideoPlayer.getCompanionsXml();i&&i.length>0&&(e.companionAds=i)}catch(o){}t.options.vpaid&&t.options.delayExpandUntilVPAIDImpression?t.actualPlayByVideoJS():t.handleFlashPlay()},video_failed:function(){t.flashBlockerTimeout&&(clearTimeout(t.flashBlockerTimeout),t.flashBlockerTimeout=null,A("Flash is respondble")),t.destroyWithoutSkip(!0,m,null,C)},video_timeout:function(){t.destroyWithoutSkip(!0,m,!0,S)},video_bitrate:function(){var t=e.bandwidth;A("bandwidth from flash : "+t)},video_impression:function(){},video_mute:function(){e.hasOwnProperty("value")&&!e.value&&(e.name="video_unmute"),e.hasOwnProperty("value")&&(t.isMuted=e.value)},video_click:function(){e.hasOwnProperty("playerHandles")?e.playerHandles?e.hasOwnProperty("url")&&e.url.length>0?t.click(e.url):t.click():t.dispatchEventToAdunit({name:"ad-click",trackClick:!0}):t.click()},video_complete:function(){t.isCompleted=!0,t.options.disableCollapse.enabled||t.destroyWithoutSkip()},video_fullscreen:function(){t.isFullscreen?setTimeout(function(){t.isFullscreen=!t.isFullscreen},1e3):t.isFullscreen=!t.isFullscreen},quartile_event:function(){},video_pause:function(){},video_start:function(){t.isDoneInitialPlay||"auto"===t.options.initialPlayback||t.play()},video_time:function(){},video_resume:function(){},video_stopped:function(){t.destroyWithoutSkip()},video_skipped:function(){t.destroy()},video_ratio:function(){},video_heightOffset:function(){t.heightOffset=e.heightOffset},video_paused_by_user:function(){t.explicitPause()},video_resumed_by_user:function(){A("received video_resumed_by_user from Flash"),t.requiredForFlashVpaid()?t.isVpaidFlashVideoPlaying===!1?(A("call explicitPlay by video_Resumed_by_user event"),t.explicitPlay()):A("do nothing because of isVpaidFlashVideoPlaying:true"):t.explicitPlay()},video_progress:function(){if(e&&e.offset)return void t.dispatchEventToAdunit({name:e.offset},function(){A("handle video_progress by flash : "+e.offset)})}};if(t.isDoneInitialPlay||"video_mute"!==e.name){var i=n[e.name];i&&void 0!==i&&i(),"video_pause"!==e.name&&"video_resume"!==e.name&&"video_impression"!==e.name&&"video_start"!==e.name&&"video_failed"!==e.name&&"video_timeout"!==e.name&&this.dispatchEventToAdunit(e),"video_impression"!==e.name&&"video_start"!==e.name||!t.options.vpaid||this.dispatchEventToAdunit(e)}},handleOverlayNotification:function(e){A("Got overlay notification from player = "+e.name);var t=this,n={leaveFullscreen:function(){t.options.hasOwnProperty("playerNotification")&&t.options.playerNotification("leaveFullscreen")}},i=n[e.name];i&&void 0!==i&&i()},requiredForFlashVpaid:function(){return"flash"===this.decidePlayer(this.options.requiredPlayer)&&this.options.vpaid===!0},notifyVpaidEvent:function(e){var t=this;if(t.requiredForFlashVpaid()&&("AdPaused"===e&&(A("received VPAID AdPaused from Flash"),t.isVpaidFlashVideoPlaying=!1,t.isPlayingVideo=!1,A("set isVpaidFlashVideoPlaying = false"),A("set isPlayingVideo = false")),"AdPlaying"===e&&(A("received VPAID AdPlaying from Flash"),t.isVpaidFlashVideoPlaying=!0,t.isPlayingVideo=!0,A("set isVpaidFlashVideoPlaying = true"),A("set isPlayingVideo = true"))),"flash"===t.decidePlayer(t.options.requiredPlayer)&&t.options.delayExpandUntilVPAIDImpression&&("AdVideoStart"===e&&t.adVideoPlayer.pause(),"AdImpression"===e&&(t.gotAdImpressionForFlash=!0),"AdStarted"===e&&(t.gotAdStartedForFlash=!0),t.gotAdImpressionForFlash&&t.gotAdStartedForFlash&&(t.handleFlashPlay(),t.gotAdImpressionForFlash=!1,t.gotAdStartedForFlash=!1)),!(t.options.delayExpandUntilVPAIDImpression&&t.delayEventHandler.isSuppress&&T.indexOf(e)>=0)){if("AdVolumeChange"===e){var n="html5"===this.decidePlayer(this.options.requiredPlayer);if(n){var i=t.adVideoPlayer.player().muted(),o=t.adVideoPlayer.player().volume();i?i&&(A("set VPAID AdVolumeChange video_mute"),this.dispatchEventToAdunit({name:"video_mute"})):o>0&&(A("set VPAID AdVolumeChange video_unmute"),this.dispatchEventToAdunit({name:"video_unmute"}))}}w.indexOf(e)>=0||w.indexOf("vpaid."+e)>=0?t.notifyVpaidEvent_internal(e):t.delayEventHandler.push(function(){t.notifyVpaidEvent_internal(e)})}},notifyVpaidEvent_internal:function(e){this.options.cbNotification&&this.options.cbNotification("VPAID",e,this.options.targetId),this.options.cbApnVastPlayer&&this.options.cbApnVastPlayer(e)},setChromeSize:function(){this.adVideoPlayer.width="0px",this.adVideoPlayer.height="0px",this.adVideoPlayer.style.width="0px",this.adVideoPlayer.style.height="0px",this.options.targetElement.style.visibility="visible"},click:function(e,t){if(!this.isDoneInitialPlay)return void this.play();this.isIosInlineRequired()===!1&&(this.pause(),this.toggleWindowFocus=!1);var n=!1;if(this.options.useCustomOpenForClickthrough){var i=this.options.clickUrls[0];e&&(i=e),n=!0,this.dispatchEventToAdunit({name:"video_click_open_url",url:i})}else if(e)n=!0,window.open(e);else if(this.options.clickUrls[0]){n=!0;var o=this.options.clickUrls[0];window.open(o)}"undefined"!=typeof t&&t!==!0||this.dispatchEventToAdunit({name:"ad-click",trackClick:n})},getRapamsAndExtensions:function(){var e=this.options.extensions&&this.options.extensions.length>0?""+this.options.extensions+"":"";return{adParameters:this.options.adParameters,extensions:e}},handleViewability:function(e,t,n){var i=this.options&&this.options.viewability&&this.options.viewability.config,o=e&&e.name?e.name:null;"fullscreenchange"!==o&&"video_fullscreen"!==o||(o=this.isFullscreen?"fullscreen":"exitFullscreen"),n||"video_duration"!==o||(this.isAlreadyStart=!0);var r=function(){var i;i=n?this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player&&this.adVideoPlayer.player().duration():e.duration,(!i||void 0===i||i<=0)&&(i=-2),i===-2&&(this.options&&this.options.data&&this.options.data.vastDurationMsec?(i=this.options.data.vastDurationMsec/1e3,(!i||null===i||i<=0)&&(i=-2)):i=-2);var r=this.options.width,a=this.options.height;if(this.viewabilityTracking.init(this.options,i,r,a,t),n)if(this.options.expandable)this.options.vpaid===!0&&"video_start"===o&&this.viewabilityTracking.invokeEvent("expand"),this.options.vpaid===!1&&"loadstart"===o&&this.viewabilityTracking.invokeEvent("expand"),this.viewabilityTracking.invokeEvent(o);else{if(this.options.overlayPlayer&&l.isMobile()&&this.options.delayStartViewability)return;this.viewabilityTracking.invokeEvent(o)}else this.isAlreadyStart&&(this.options.expandable&&this.viewabilityTracking.invokeEvent("expand"),this.viewabilityTracking.invokeEvent("video_start"))},a=function(){if(this.viewabilityTracking&&this.viewabilityTracking.isReady){ -if(n===!1&&"expand"===o&&this.options.expandable)return;"force_start_viewability"===o&&this.options.delayStartViewability?(this.options.delayStartViewability=!1,this.viewabilityTracking.invokeEvent("video_start")):this.viewabilityTracking.invokeEvent(o)}};if(o&&i){var s=this.blockTrackingUserActivity&&("video_resume"===o||"video_pause"===o||"video_mute"===o||"video_unmute"===o);s||(o===t?r.apply(this):a.apply(this))}},findPathForViewability:function(e){var t,n="html5"===this.decidePlayer(this.options.requiredPlayer);if(n){if(t=!this.options.expandable||"undefined"!=typeof this.options.isExpanded&&this.options.isExpanded!==!1?"video_start":"expand",e&&e.name&&e.name===t){if(this.isDoneFirstLoadStart)return;this.isDoneFirstLoadStart=!0}this.handleViewability(e,t,n)}else{if(t="video_duration",e&&"video_start"===e.name)return;e&&e.name&&e.name===t?this.isDoneFirstLoadStart||(this.isDoneFirstLoadStart=!0,this.handleViewability(e,t,n)):this.handleViewability(e,t,n)}},dispatchEventToAdunit:function(e,t){var n=this;if("video_start"===e.name&&n.iframeVideoWrapper.contentDocument){var i=n.iframeVideoWrapper.contentDocument.getElementById(n.divIdForVideo),o=n.iframeVideoWrapper.contentDocument.getElementById(n.videoId);i.style.background=n.options.playerSkin.videoBackgroundColor,o.style.background=n.options.playerSkin.videoBackgroundColor,h.isIOS()&&n.isIosInlineRequired()&&(o.style.opacity=0)}if("video_complete"===e.name&&(void 0===e.obj&&(e.obj={}),e.obj.videoAdPending=this.options.disableCollapse.replay),"video_fullscreen"===e.name&&"flash"===this.decidePlayer(this.options.requiredPlayer)?setTimeout(function(){var t={name:e.name,user:e.user,value:e.value};n.findPathForViewability(t)},1500):this.findPathForViewability(e),(this.startedReplay===!0||this.isEnded)&&this.options.disableCollapse.replay===!0)if(this.startedReplay===!1&&"rewind"===e.name);else{if("video_complete"===e.name&&"function"==typeof t)return void t();if("ad-click"!==e.name&&e.name.indexOf("IconClick")===-1)return void this.callbackForAdUnit.cbForHandlingDispatchedEvent(e,!0)}"video_skip"===e.name&&c.pushAndCheck(this.options.targetElement.id+"_dispatchEventToAdunit",e.name)===!1||"video_complete"===e.name&&this.isVideoCompleteInjected===!0&&this.options.disableCollapse.replay===!1||(e&&"video_time"!==e.name&&A("(push)"+e.name),this.delayEventHandler.push(function(){n.dispatchEventToAdunit_internal(e,t)}),"video_complete"===e.name&&(this.isVideoCompleteInjected=!0))},dispatchEventToAdunit_internal:function(e,t){if(!this.isCompleted||"video_complete"===e.name||"ad-click"===e.name||"video_skip"===e.name||this.startedReplay){var n=this;if(e&&"video_time"!==e.name&&A("invoke callback : "+JSON.stringify(e)),this.options.hasOwnProperty("overlayPlayer")&&this.options.hiddenControls&&(("firstplay"===e.name&&!this.options.vpaid||"video_impression"===e.name&&this.options.vpaid)&&(!l.isMobile()||"click"!==this.options.initialPlayback&&"mouseover"!==this.options.initialPlayback?h.isIOS()&&h.iOSversion()[0]<10&&"auto"===this.options.initialPlayback&&(this.adVideoPlayer.controlBar.el_.style.removeProperty("display"),delete this.options.hiddenControls):(this.adVideoPlayer.controlBar.el_.style.removeProperty("display"),delete this.options.hiddenControls)),"video_resume"===e.name&&this.options.vpaid&&l.isMobile()&&(this.adVideoPlayer.controlBar.el_.style.removeProperty("display"),delete this.options.hiddenControls)),this.callbackForAdUnit.cbForHandlingDispatchedEvent&&"video_time"!==e.name){if("video_pause"===e.name&&(this.isPlayingVideo=!1),"video_play"!==e.name&&"video_start"!==e.name&&"firstplay"!==e.name||(this.isPlayingVideo=!0,this.isDoneInitialPlay=!0),"video_fullscreen"===e.name)return void setTimeout(function(){e.fullscreenStatus=n.isFullscreen?"enter":"exit",n.callbackForAdUnit.cbForHandlingDispatchedEvent(e)},1500);"function"==typeof t&&t();var i=this.blockTrackingUserActivity&&("video_resume"===e.name||"video_pause"===e.name||"video_mute"===e.name||"video_unmute"===e.name);if(i||(e.player=this,this.callbackForAdUnit.cbForHandlingDispatchedEvent(e)),this.verificationManager){var o=this.prepareOmidEventData(e);o.name&&this.verificationManager.dispatchEvent(o.name,o.data)}}this.options.vpaid===!0&&"video_skip"===e.name&&(this.isSkipped=!0)}},resolveMacro:function(e){switch(e){case"MEDIAPLAYHEAD":return this.options.hasOwnProperty("mediaPlayhead")&&"number"==typeof this.options.mediaPlayhead?l.convertTimeSecondsToString(this.options.mediaPlayhead):-1;case"BREAKPOSITION":return this.options.breakPosition?this.options.breakPosition:-1;case"ADCOUNT":return 1;case"PLACEMENTTYPE":return this.options.overlayPlayer?1:this.options.expandable?3:-1;case"CLIENTUA":return this.options.clientUA?this.options.clientUA:"unknown unknown";case"DEVICEIP":return-1;case"PLAYERCAPABILITIES":var t=[];return this.options.skippable&&this.options.skippable.enabled&&t.push("skip"),this.options.showMute&&t.push("mute"),"auto"===this.options.initialPlayback&&("on"===this.options.initialAudio?t.push("autoplay"):t.push("mautoplay")),this.options.allowFullscreen&&t.push("fullscreen"),t.push("icon"),t.join();case"CLICKTYPE":return this.options.clickUrls&&this.options.clickUrls[0]?1:this.options.learnMore.enabled?2:0;case"PLAYERSTATE":var n=[];return this.isSkipped&&n.push("skipped"),this.isMuted&&n.push("muted"),"auto"===this.options.initialPlayback&&("on"===this.options.initialAudio?n.push("autoplayed"):n.push("mautoplayed")),this.adVideoPlayer.isFullscreen&&"function"==typeof this.adVideoPlayer.isFullscreen&&this.adVideoPlayer.isFullscreen()&&n.push("fullscreen"),n.join();case"PLAYERSIZE":return this.options.width+","+this.options.height;case"ADPLAYHEAD":if(this.adVideoPlayer.currentTime&&"function"==typeof this.adVideoPlayer.currentTime){var i=this.adVideoPlayer.currentTime();return l.convertTimeSecondsToString(i)}return-1;case"ASSETURI":return this.options.video.url;case"PODSEQUENCE":return-1;case"LIMITADTRACKING":return 0;default:return-1}},prepareOmidEventData:function(e){var t={error:"sessionError",impression:"impression",video_impression:"impression",video_start:"start","video-first-quartile":"firstQuartile","video-mid":"midpoint","video-third-quartile":"thirdQuartile",video_complete:"complete",video_pause:"pause",video_resume:"resume","user-close":"skipped",video_skip:"skipped",video_skipped:"skipped","audio-mute":"volumeChange","audio-unmute":"volumeChange",video_mute:"volumeChange",video_unmute:"volumeChange",fullscreenchange:"playerStateChange",video_fullscreen:"playerStateChange","video-exit-fullscreen":"playerStateChange","ad-expand":"playerStateChange","ad-collapse":"playerStateChange","ad-click":"adUserInteraction","user-accept-invitation":"adUserInteraction"},n=t.hasOwnProperty(e.name)?t[e.name]:"",i={name:n},o=null;switch(n){case"sessionError":o={},o.errorType=e.code,o.message=e.message;break;case"start":o={},this.options.data.durationMsec?o.duration=this.options.data.durationMsec/1e3:this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player?o.duration=this.adVideoPlayer.player().duration()/1e3:o.duration=-2,this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player?o.videoPlayerVolume=this.adVideoPlayer.player().volume():o.videoPlayerVolume=-1;break;case"volumeChange":o={},"audio-mute"===e.name||"video_mute"===e.name?o.videoPlayerVolume=0:this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player?o.videoPlayerVolume=this.adVideoPlayer.player().volume():o.videoPlayerVolume=-1;break;case"playerStateChange":o={},"video-fullscreen"===e.name||"fullscreenchange"===e.name&&"enter"===e.fullscreenStatus?o.state=this.adVideoPlayer.isFullscreen?"fullscreen":"normal":"video-exit-fullscreen"===e.name||"fullscreenchange"===e.name&&"exit"===e.fullscreenStatus?o.state="normal":"ad-collapse"===e.name?o.state="collapsed":o.state="normal";break;case"adUserInteraction":o={},"ad-click"===e.name?o.interactionType="click":o.interactionType="invitationAccept"}return o&&(i.data=o),i},resizeVideo:function(e,t,n){s.resizeVideo(e,t,this,n)},resizeVideoForSideStream:function(e,t,n){s.resizeVideoForSideStream(this,e,t,n)},isIosInlineRequired:function(){return this.autoplayHandler.isIosInlineRequired(this.options.enableInlineVideoForIos)},resizePlayer:function(e,t){s.resizePlayer(e,t,this)},getFinalSize:function(){return s.getFinalSize(this)},setVastAttribute:function(e){var t,n=this.options;t=e?e:this.adVideoPlayer&&this.adVideoPlayer.player?this.adVideoPlayer.player().duration():0,n.data.durationMsec=null!==t?Math.round(1e3*t):0;var i=this.Utils.getMsecTime(n.data.skipOffset,n.data.durationMsec);n.data.skipOffset&&i>=0?(n.data.isVastVideoSkippable=!0,n.data.skipOffsetMsec=i):n.data.skipOffsetMsec=null;var o=n.data.vastProgressEvent;if(o&&"object"==typeof o)for(var r in o){var a=this.Utils.getMsecTime(r.replace(/progress_/g,""),n.data.durationMsec);o[r]=a}},disableTrackingUserActivity:function(e){this.blockTrackingUserActivity=e,this.adVideoPlayer&&this.adVideoPlayer.bigPlayButton&&(this.adVideoPlayer.bigPlayButton.el_.style.opacity=e===!0?0:1)},delayEventsTracking:function(e,t){this.callbackForAdUnit.cbDelayEventsTracking&&this.callbackForAdUnit.cbDelayEventsTracking(e,t)},notifyOverlayPlayerVideoPaused:function(){this.options.tmpActiveListener&&this.options.cbApnVastPlayer&&this.options.cbApnVastPlayer("apn-video-paused-by-device")},checkWhenVideoPausedByDevice:function(e){if(this.options.overlayPlayer&&this.options.cbApnVastPlayer&&this.iframeVideoWrapper&&this.iframeVideoWrapper.contentDocument){var t=null;if("string"==typeof this.videoObjectId)t=this.iframeVideoWrapper.contentDocument.getElementById(this.videoObjectId);else{var n=this.iframeVideoWrapper.contentDocument.getElementsByTagName("VIDEO");if(n&&n.length>0)for(var i=0;i0){t=n[i];break}}if(t)return e?(this.options.tmpActiveListener=!0,t.addEventListener("pause",this.notifyOverlayPlayerVideoPaused.bind(this))):(delete this.options.tmpActiveListener,t.removeEventListener("pause",this.notifyOverlayPlayerVideoPaused.bind(this))),!0}return!0},forceStartViewability:function(){this.findPathForViewability({name:"force_start_viewability"})},log:A,debug:A,test:function(e,t){var n=this.options;if(n&&n.test&&n.test[e]&&"function"==typeof n.test[e]){var i=function(e){console.debug("%c"+e,"background: red; color: white")},o=function(e){console.debug("%c"+e,"background: green; color: white")};try{var r=function(t,n){t?(n=n+" Succeeded"||"Succeeded",o("Unit Test ["+e+"] : "+n)):(n=n+" failed"||"Assertion failed",i("Unit Test ["+e+"] : "+n))},a=function(t){console.debug("%cUnit Test Log : ["+e+"] : "+t,"background: gray; color: white")};n.test[e](t,r,a)}catch(s){i("unit test failed due to : "+s)}}},setFinalAspectRatio:function(e){this.finalAspectRatio=e},getFinalAspectRatio:function(){return this.finalAspectRatio}};e.exports=j,window[v]=j},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(module){function _handleMultipleEvents(e,t,n,i){vjs.arr.forEach(n,function(n){e(t,n,i)})}function _logType(e,t){return}document.createElement("video"),document.createElement("audio"),document.createElement("track");var global_options,vjs=function(e,t,n){global_options=t;var i;if("string"==typeof e){if(0===e.indexOf("#")&&(e=e.slice(1)),vjs.players[e])return t&&vjs.log.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&vjs.players[e].ready(n),vjs.players[e];i=vjs.el(e)}else i=e;if(!i||!i.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return i.player||new vjs.Player(i,t,n)},videojs=window.videojs_apn=vjs;vjs.CDN_VERSION="GENERATED_CDN_VSN",vjs.ACCESS_PROTOCOL="https:"==document.location.protocol?"https://":"http://",vjs.VERSION="GENERATED_FULL_VSN",vjs.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:500,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},textTrackDisplay:{},bigPlayButton:{},controlBar:{},errorDisplay:{},textTrackSettings:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.userLanguage||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."},"GENERATED_CDN_VSN"!==vjs.CDN_VERSION&&(videojs.options.flash.swf=vjs.ACCESS_PROTOCOL+"vjs.zencdn.net/"+vjs.CDN_VERSION+"/video-js.swf"),vjs.addLanguage=function(e,t){return void 0!==vjs.options.languages[e]?vjs.options.languages[e]=vjs.util.mergeOptions(vjs.options.languages[e],t):vjs.options.languages[e]=t,vjs.options.languages},vjs.players={},__webpack_require__(5).amd?(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return videojs}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))):module.exports=videojs,vjs.CoreObject=vjs.CoreObject=function(){},vjs.CoreObject.extend=function(e){var t,n;e=e||{},t=e.init||e.init||this.prototype.init||this.prototype.init||function(){},n=function(){t.apply(this,arguments)},n.prototype=vjs.obj.create(this.prototype),n.prototype.constructor=n,n.extend=vjs.CoreObject.extend,n.create=vjs.CoreObject.create;for(var i in e)e.hasOwnProperty(i)&&(n.prototype[i]=e[i]);return n},vjs.CoreObject.create=function(){var e=vjs.obj.create(this.prototype);return this.apply(e,arguments),e},vjs.on=function(e,t,n){if(vjs.obj.isArray(t))return _handleMultipleEvents(vjs.on,e,t,n);var i=vjs.getData(e);i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=vjs.guid++),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t){if(!i.disabled){t=vjs.fixEvent(t);var n=i.handlers[t.type];if(n)for(var o=n.slice(0),r=0,a=o.length;r=0;i--)n[i]===t&&n.splice(i,1);e.className=n.join(" ")}},vjs.TEST_VID=vjs.createEl("video"),function(){var e=document.createElement("track");e.kind="captions",e.srclang="en",e.label="English",vjs.TEST_VID.appendChild(e)}(),vjs.USER_AGENT=navigator.userAgent,vjs.IS_IPHONE=/iPhone/i.test(vjs.USER_AGENT),vjs.IS_IPAD=/iPad/i.test(vjs.USER_AGENT),vjs.IS_IPOD=/iPod/i.test(vjs.USER_AGENT),vjs.IS_IOS=vjs.IS_IPHONE||vjs.IS_IPAD||vjs.IS_IPOD,vjs.IOS_VERSION=function(){var e=vjs.USER_AGENT.match(/OS (\d+)_/i);if(e&&e[1])return e[1]}(),vjs.IS_ANDROID=/Android/i.test(vjs.USER_AGENT),vjs.ANDROID_VERSION=function(){var e,t,n=vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return n?(e=n[1]&&parseFloat(n[1]),t=n[2]&&parseFloat(n[2]),e&&t?parseFloat(n[1]+"."+n[2]):e?e:null):null}(),vjs.IS_OLD_ANDROID=vjs.IS_ANDROID&&/webkit/i.test(vjs.USER_AGENT)&&vjs.ANDROID_VERSION<2.3,vjs.IS_FIREFOX=/Firefox/i.test(vjs.USER_AGENT),vjs.IS_CHROME=/Chrome/i.test(vjs.USER_AGENT),vjs.IS_IE8=/MSIE\s8\.0/.test(vjs.USER_AGENT),vjs.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),vjs.BACKGROUND_SIZE_SUPPORTED="backgroundSize"in vjs.TEST_VID.style,vjs.setElementAttributes=function(e,t){vjs.obj.each(t,function(t,n){null===n||"undefined"==typeof n||n===!1?e.removeAttribute(t):e.setAttribute(t,n===!0?"":n)})},vjs.getElementAttributes=function(e){var t,n,i,o,r;if(t={},n=",autoplay,controls,loop,muted,default,",e&&e.attributes&&e.attributes.length>0){i=e.attributes;for(var a=i.length-1;a>=0;a--)o=i[a].name,r=i[a].value,"boolean"!=typeof e[o]&&n.indexOf(","+o+",")===-1||(r=null!==r),t[o]=r}return t},vjs.getComputedDimension=function(e,t){var n="";return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,"").getPropertyValue(t):e.currentStyle&&(n=e["client"+t.substr(0,1).toUpperCase()+t.substr(1)]+"px"),n},vjs.insertFirst=function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},vjs.browser={},vjs.el=function(e){return 0===e.indexOf("#")&&(e=e.slice(1)),document.getElementById(e)},vjs.formatTime=function(e,t){t=t||e;var n=Math.floor(e%60),i=Math.floor(e/60%60),o=Math.floor(e/3600),r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(o=i=n="-"),o=o>0||a>0?o+":":"",i=((o||r>=10)&&i<10?"0"+i:i)+":",n=n<10?"0"+n:n,o+i+n},vjs.blockTextSelection=function(){document.body.focus(),document.onselectstart=function(){return!1}},vjs.unblockTextSelection=function(){document.onselectstart=function(){return!0}},vjs.trim=function(e){return(e+"").replace(/^\s+|\s+$/g,"")},vjs.round=function(e,t){return t||(t=0),Math.round(e*Math.pow(10,t))/Math.pow(10,t)},vjs.createTimeRange=function(e,t){return void 0===e&&void 0===t?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:1,start:function(){return e},end:function(){return t}}},vjs.setLocalStorage=function(e,t){try{var n=window.localStorage||!1;if(!n)return;n[e]=t}catch(i){22==i.code||1014==i.code?vjs.log("LocalStorage Full (VideoJS)",i):18==i.code?vjs.log("LocalStorage not allowed (VideoJS)",i):vjs.log("LocalStorage Error (VideoJS)",i)}},vjs.getAbsoluteURL=function(e){return e.match(/^https?:\/\//)||(e=vjs.createEl("div",{innerHTML:'x'}).firstChild.href),e},vjs.parseUrl=function(e){var t,n,i,o,r;o=["protocol","hostname","port","pathname","search","hash","host"],n=vjs.createEl("a",{href:e}),i=""===n.host&&"file:"!==n.protocol,i&&(t=vjs.createEl("div"),t.innerHTML='',n=t.firstChild,t.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(t)),r={};for(var a=0;a=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),vjs.removeData(this.el_),this.el_=null},vjs.Component.prototype.player_=!0,vjs.Component.prototype.player=function(){return this.player_},vjs.Component.prototype.options_,vjs.Component.prototype.options=function(e){return void 0===e?this.options_:this.options_=vjs.util.mergeOptions(this.options_,e)},vjs.Component.prototype.el_,vjs.Component.prototype.createEl=function(e,t){return vjs.createEl(e,t)},vjs.Component.prototype.localize=function(e){var t=this.player_.language(),n=this.player_.languages();return n&&n[t]&&n[t][e]?n[t][e]:e},vjs.Component.prototype.el=function(){return this.el_},vjs.Component.prototype.contentEl_,vjs.Component.prototype.contentEl=function(){return this.contentEl_||this.el_},vjs.Component.prototype.id_,vjs.Component.prototype.id=function(){return this.id_},vjs.Component.prototype.name_,vjs.Component.prototype.name=function(){return this.name_},vjs.Component.prototype.children_,vjs.Component.prototype.children=function(){return this.children_},vjs.Component.prototype.childIndex_,vjs.Component.prototype.getChildById=function(e){return this.childIndex_[e]},vjs.Component.prototype.childNameIndex_,vjs.Component.prototype.getChild=function(e){return this.childNameIndex_[e]},vjs.Component.prototype.addChild=function(e,t){var n,i,o;return"string"==typeof e?(o=e,t=t||{},i=t.componentClass||vjs.capitalize(o),t.name=o,n=new window.videojs_apn[i](this.player_||this,t)):n=e,this.children_.push(n),"function"==typeof n.id&&(this.childIndex_[n.id()]=n),o=o||n.name&&n.name(),o&&(this.childNameIndex_[o]=n),"function"==typeof n.el&&n.el()&&this.contentEl().appendChild(n.el()),n},vjs.Component.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},vjs.Component.prototype.initChildren=function(){var e,t,n,i,o,r,a;if(e=this,t=e.options(),n=t.children)if(a=function(n,i){void 0!==t[n]&&(i=t[n]),i!==!1&&(e[n]=e.addChild(n,i))},vjs.obj.isArray(n))for(var s=0;s0){for(var t=0,n=e.length;t1?i=!1:t&&(r=e.touches[0].pageX-t.pageX,a=e.touches[0].pageY-t.pageY,s=Math.sqrt(r*r+a*a),s>l&&(i=!1))}),o=function(){i=!1},this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(o){t=null,i===!0&&(n=(new Date).getTime()-e,n0){var r=Number(i.substring(0,i.length-2));t-=2*r,n-=2*r}T.style.width=t+"px",T.style.height=n+"px";var a=u(k);e("repositionPlayer: targetDiv absolute posiotion ="+a.left+", "+a.top),T.style.left=a.left+"px",T.style.top=a.top+"px",e("repositionPlayer: size = "+t+", "+n),S.overlayPlayer?N.resizePlayer(t,n):N.resizeVideo(null,!1,null)}}function a(t){e("Resize event happend"),T&&N&&(O?(O=!1,S.fitInContainer&&(T.style.zIndex=R),setTimeout(function(){r(),"click"!==S.initialPlayback&&N.play()},100)):r()),J&&J(t)}function c(t){switch(e("Got notification: "+t),t){case"leaveFullscreen":q();break;default:e("Unknown player notification: "+t)}}function u(e){for(var t=0,n=0;e&&"BODY"!==e.tagName&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);){var i=document.defaultView.getComputedStyle(e,null).position;if(i&&""!==i&&"static"!==i)break;t+=e.offsetLeft-e.scrollLeft+e.clientLeft,n+=e.offsetTop-e.scrollTop+e.clientTop,e=e.offsetParent}return{left:t,top:n}}function p(){var t,n=function(){try{var e=navigator.platform,t=navigator.userAgent,n=navigator.appVersion;if(/iP(hone|od|ad)/.test(e)&&!/CriOS/.test(t)){var i=n.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3]||0,10)]}return[0,0,0]}catch(o){return[0,0,0]}};try{t=n()[0]>=8&&S.enableInlineVideoForIos===!0}catch(i){e(i)}return t}function h(e){var t=document.defaultView.getComputedStyle(e,null).zIndex;return"auto"!==t?t:0}function m(e,t){if(!e.children)return t;for(var n=Math.max(t,h(e)),i=0;i-1||navigator.appVersion.indexOf("Android")>-1}function y(){return navigator.userAgent.indexOf("Chrome")>-1}function A(){var e=navigator.appVersion.indexOf("Chrome/");if(e>=0){var t=navigator.appVersion.substr(e+7);return e=t.indexOf("."),e>0?Number(t.substr(0,e)):0}return 0}function b(n,i,r){e("play function called"),j=!1,P=3e3,S.vpaidTimeout&&(P=S.vpaidTimeout),x=null,V=!1,_=!1,r&&(V=r),i&&(x=function(e,t){t=t?t:{};var n={event:e,params:t};i(n)}),v()&&(S.showFullScreenButton===!0?S.allowFullscreen=!0:S.allowFullscreen=!1),f()&&(S.enableInlineVideoForIos=!1),e("options before PlayerDefaultOption: ",JSON.stringify(S)),S=s(S),e("options after PlayerDefaultOption: ",JSON.stringify(S)),S.width=n.offsetWidth,S.height=n.offsetHeight;var a=n.style.borderWidth;if(a&&a.length>0){var l=Number(a.substring(0,a.length-2));S.width-=2*l,S.height-=2*l}S.playerHeight=S.height,p()&&(S.playerHeight-=30),o()&&(S.fullscreenMode=!0),e("offsetWidth="+n.offsetWidth+", offsetHeight="+n.offsetHeight+", borderWidth="+n.style.borderWidth);var h=document.createElement("div");h.style.width=S.width+"px",S.fitInContainer?h.style.height=S.height+"px":S.cachePlayer&&S.overlayPlayer?h.style.height="1px":h.style.height=S.height+"px",h.style.backgroundColor="black",h.id=n.id+"_overlay_"+(new Date).getTime();var b=u(n);e("targetDiv absolute posiotion ="+b.left+", "+b.top),h.style.position="absolute",h.style.left=b.left+"px",h.style.top=b.top+"px",S.fitInContainer?h.style.zIndex=Math.max(100,m(n,0)+1):(R=Math.max(100,m(n,0)+1),S.cachePlayer&&S.overlayPlayer?h.style.zIndex=0:h.style.zIndex=R),n.appendChild(h),e("player container offsetLeft = "+h.offsetLeft+", offsetTop = "+h.offsetTop),T=h,k=n,w=(new Date).getTime(),e("timeToReady = "+P+", start time = "+w),C=setTimeout(function(){j||(z(!1),x&&x("Timed-out",{}))},P);var E=function(n,i){e("VastPlayer > cbRenderVideo called");try{e("VastPlayer > cbRenderVideo options: ",JSON.stringify(i))}catch(o){}t(i)};I.cbRenderVideo=E,I.cbWhenDestroy=z,I.cbWhenReady=G,I.cbWhenQuartile=U,I.cbWhenVideoComplete=B,I.cbWhenSkipped=$,I.cbWhenFullScreen=W,I.cbWhenAudio=F,I.cbWhenClickOpenUrl=H,I.cbCoreVideoEvent=L,S.playerNotification=c,S.overlayPlayer&&(S.hasOwnProperty("allowFullscreen")||(S.allowFullscreen=!1)),e("VP >> before options.initialAudio = "+S.initialAudio),"auto"===S.initialPlayback&&"on"===S.initialAudio&&g()&&y()&&A()>=53&&(S.showMute=!0,S.showVolume=!0),e("VP >> after options.initialAudio = "+S.initialAudio),d(T,S,I)}e("VERSION 1.4.15");var T,k,E,w,S={},I={},C=null,j=!1,P=3e3,x=null,V=!1,_=!1,D=null,M=!1,N=null,O=!1,R=0,U=function(t){e("VastPlayer > cbWhenQuartile "+t),x(t,{})},L=function(e,t){var n={type:e,name:t};if("AdHandler"===n.type&&"video_impression"===n.name)try{var i=new CustomEvent("outstream-impression");T.dispatchEvent(i)}catch(o){error(o)}for(var r=[{type:"AdHandler",name:"video_start",mappedEventName:"videoStart"},{type:"AdHandler",name:"rewind",mappedEventName:"videoRewind"},{type:"AdHandler",name:"video_fullscreen_enter",mappedEventName:"video-fullscreen-enter"},{type:"AdHandler",name:"video_fullscreen_exit",mappedEventName:"video-fullscreen-exit"}],a=0;a cbWhenVideoComplete "+t),x(t,{})},$=function(t){e("VastPlayer > cbWhenSkipped "+t),x(t,{})},F=function(t){e("VastPlayer > cbWhenAudio "+t),x(t,{})},H=function(e){x(e,{})},W=function(t){e("VastPlayer > cbWhenFullScreen "+t),x(t,{})},z=function(t,n,i){e("VastPlayer > cbTerminate isError: "+t);var r="unknown";T&&(r=T.id.toString()),e("VastPlayer > cbTerminate: bTerminated = "+_+", targetElement id = "+r),M=!1,_||(_=!0,n||q(),!i&&o()&&S.overlayPlayer&&q(),T&&(N&&(N.isPlayingVideo&&(e("VastPlayer > cbTerminate: pause ad"),N.pause()),T.style.height="1px",N.resizePlayer(1,1)),setTimeout(function(){T&&(T.innerHTML="",k.removeChild(T)),T=null},2e3)),x&&t&&x("video-error",{}))},q=function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},G=function(t){var n,i,r,a,s;n=t&&t.options&&t.options.video&&t.options.video.url?t.options.video.url:"",i=t&&t.options&&t.options.data&&t.options.data.vastDurationMsec?t.options.data.vastDurationMsec:0,r=t&&t.options&&t.options.finalVastXml?t.options.finalVastXml:"",a=t&&t.options&&t.options.finalVastUri?t.options.finalVastUri:"",s=t&&t.getFinalAspectRatio()?t.getFinalAspectRatio():"",_||(j=!0,N=t,e("VastPlayer > cbWhenReady in "+((new Date).getTime()-w)+" msecs"),x&&x("adReady",{creativeUrl:n,duration:i,vastXML:r,vastCreativeUrl:a,aspectRatio:s}),"click"===S.initialPlayback||S.cachePlayer||(o()&&S.overlayPlayer?S.forceAdInFullscreen?(O=!0,q()):(T&&(T.style.width="1px",T.style.height="1px"),z(!1,!0,!0)):N.play()))},J=null;document.body.onresize&&(J=document.body.onresize),window.onresize=a,this.playVast=function(t,n,o,r,a){e("VP >> playVast function called playerId = "+this.vastPlayerId),z(!1,!0),i(),S=n,S.vastXml=o,b(t,r,a)},this.playAdObject=function(t,n,o,r,a){e("VP >> playAdObject function called playerId = "+this.vastPlayerId+", cache mode = "+n.cachePlayer),z(!1,!0),i(),S=n,"string"==typeof o?S.vastXml=o:(S.useAdObj=!0,S.adObj=o),b(t,r,a)},this.stop=function(){C&&(clearTimeout(C),C=null),z(!1)},this.removeFromPage=function(){C&&(clearTimeout(C),C=null),_=!0,T&&(T.innerHTML="",k.removeChild(T),T=null)},this.play=function(){e("VP >> play function called playerId = "+this.vastPlayerId),N&&(S.cachePlayer=!1,o()&&S.overlayPlayer?S.forceAdInFullscreen?(O=!0,q()):z(!1,!0,!0):(T&&S.fitInContainer===!1&&(T.style.zIndex=R),r(),"click"!==S.initialPlayback&&N.play()))},this.sendPlay=function(){e("VP >> sendPlay function called playerID = "+this.vastPlayerId),N&&!N.isPlayingVideo&&N.play()},this.sendPause=function(){e("VP >> sendPause function called playerID = "+this.vastPlayerId),N&&N.isPlayingVideo&&N.pause()},this.handleFullscreen=function(e){N&&(e?k.requestFullscreen?k.requestFullscreen():k.webkitRequestFullscreen?k.webkitRequestFullscreen():k.mozRequestFullScreen?k.mozRequestFullScreen():k.msRequestFullscreen&&k.msRequestFullscreen():document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen())},this.vastPlayerId=(new Date).getTime(),this.isTerminated=function(){return _},this.getIsVideoPlaying=function(){var e=!(!N||!N.isPlayingVideo);return e},this.getCurrentPlayHeadTime=function(){var e=0;return E&&E.adVideoPlayer&&"function"==typeof E.adVideoPlayer.player&&(e=1e3*E.adVideoPlayer.player().currentTime(),e=parseInt&&"function"==typeof parseInt?parseInt(e):e),e}};e.exports={playAdObject:function(e,t,n,i,o){var a=r(t.targetElementId,t.cachePlayer);a&&a.playAdObject(e,t,n,i,o)},playVast:function(e,t,n,i,o){var a=r(t.targetElementId);a&&a.playVast(e,t,n,i,o)},loadAndPlayVast:function(e,t,i,o,a){var s=n(29);s.load(i,function(s,l){if(s||0===l.length){var d=n(28);d.logDebug("Failed to load "+i,"Vast Video Player")}else{var c=r(t.targetElementId);c&&c.playVast(e,t,l,o,a)}})},stop:function(e,t){var n=o(e.id,t);n&&n.stop()},removeFromPage:function(e){var t=o(e);t&&t.removeFromPage()},play:function(e,t){var n=i(e,t);n&&n.play()},sendPlay:function(e){var t=o(e);t&&t.sendPlay()},sendPause:function(e){var t=o(e);t&&t.sendPause()},handleFullscreen:function(e,t){var n=o(e);n&&n.handleFullscreen(t)},getCurrentPlayHeadTime:function(e){var t=o(e);if(t)return t.getCurrentPlayHeadTime()},getIsVideoPlaying:function(e){var t=o(e);if(t)return t.getIsVideoPlaying()}}},function(e,t){var n=function(e){function t(e){return"object"==typeof e}function n(e){return null===e}function i(e){var o,r,a;for(r=1;r-1},k=["AdPaused","AdVolumeChange"],E=["AdLoaded","AdStopped","AdSkippableStateChange","AdLinearChange","AdDurationChange","AdRemainingTimeChange","AdLog","AdError"],w=1,S=402,I=900,C=405,j={initialPlayback:"auto",initialAudio:"off",skippable:{enabled:!0,allowOverride:!1,videoThreshold:15,videoOffset:5,skipLocation:"top-left",skipText:"Video can be skipped in %%TIME%% seconds",skipButtonText:"SKIP"},adText:"Ad",showMute:!0,showVolume:!0,showProgressBar:!0,showPlayToggle:!0,showBigPlayButton:!0,allowFullscreen:!0,playerSkin:{customPlayerSkin:"",controlBarHeight:30,topDividerColor:"#606060",bottomDividerColor:"#606060",topDividerWidth:1,bottomDividerWidth:1,videoBackgroundColor:"#000000"},disableCollapse:{enabled:!1,replay:!1},endCard:{enabled:!1,clickable:!0,color:"",imageUrl:"",imageWidth:"",imageHeight:"",showCompanion:!0},enableInlineVideoForIos:!0,delayExpandUntilVPAIDInit:!1,delayExpandUntilVPAIDImpression:!1,flash:{swf:"http://acdn.adnxs.com/video/player/vastPlayer/AppnexusFlashPlayer.swf"},vpaidTimeout:5e3,waterfallTimeout:3e4,waterfallSteps:-1,fixedSizePlayer:!0,disableTopBar:!1,sideStream:{enabled:!1,position:"bottom-right",xOffset:0,yOffset:0,space:"empty",dynamicBigPlayButtonOnSideStream:!0},sideStreamObject:{},preloadInlineAudioForIos:!1,controlBarPosition:"over",customPlayerSkinCss:"",customButton:{enabled:!1,url:"",altText:"",imageSrc:"",imgWidth:50,imgHeight:30},enableNativeInline:!1,androidDSOverride:!1,cbNotification:function(){},parentIframeIsModal:!1,learnMore:{enabled:!1,clickToPause:!0,text:"Learn More",separator:"-"},playerContextId:"anadvideoplayer",data:{skipOffset:"",durationMsec:null,skipOffsetMsec:null,isVastVideoSkippable:!1,vastProgressEvent:{},vastDurationMsec:null,adIcons:null},test:function(){}},P={externalNameOfVideoPlayer:f,videoPlayerObj:i,autoplayHandler:h,mobileSupport:h,customSkinning:u,options:{},adVideoPlayer:{},callbackForAdUnit:{},vpaidData:{},iframeVideoWrapper:{},isPlayingVideo:!1,isDoneInitialPlay:!1,isFullscreen:!1,heightOffset:0,explicitPaused:!1,aspectRatio:0,finalAspectRatio:0,videoObjectId:{},isViewable:!1,isSkipped:!1,isCompleted:!1,isMuted:!1,isExplicitMuted:!1,hasBeenUnmuted:!1,isChrome:navigator.userAgent.indexOf("Chrome")>-1,videojs_vpaid:r,overlayPlayer:!1,forceToSkip:!1,ExtendDefaultOption:a,delayEventHandler:null,pausedByViewability:!1,mutedByVisibility:!1,gotAdImpressionForFlash:!1,gotAdStartedForFlash:!1,isReadyToExpandForMobile:!1,isAlreadyPlaingForVPAID:!1,isSideStreamActivated:!1,isExpanded:!0,isVideoCompleteInjected:!1,isFullscreenToggled:!1,toggleWindowFocus:!0,viewabilityTracking:null,isDoneFirstLoadStart:!1,flashBlockerTimeout:null,startedReplay:!1,Utils:l,isAlreadyStart:!1,isEnded:!1,blockTrackingUserActivity:!1,videoId:"",divIdForVideo:"",init:function(e){var t=a(j,e);return this.options=t,"boolean"==typeof this.options.disableCollapse&&(this.options.disableCollapse={enabled:this.options.disableCollapse,replay:!1}),this.options.skippable.allowOverride===!0&&(this.options.skippable.videoThreshold=0,this.options.skippable.enabled=!0),this.delayEventHandler=new d,this.delayEventHandler.suppress(this.options.delayExpandUntilVPAIDImpression),this.delayEventHandler.start(),this.viewabilityTracking=new p,t},getValueFromPlayer:function(e){var t=0;try{"controlBar.height"===e&&this.adVideoPlayer&&this.adVideoPlayer.controlBar&&this.adVideoPlayer.controlBar.height&&"function"==typeof this.adVideoPlayer.controlBar.height&&"html5"===this.decidePlayer(this.options.requiredPlayer)&&(t=this.adVideoPlayer.controlBar.height())}catch(n){b(n)}return t},decidePlayer:function(e){var t="",n="flash",i="html5",o=function(){var e=navigator.appVersion.indexOf("Mobile"),t=navigator.appVersion.indexOf("Android");return e>-1||t>-1},r=this.options.playerTechnology;if(r&&r.length&&1===r.length)switch(e){case 1:t=i;break;case 2:t=n;break;case 0:t=r[0]===i?i:n}if(r&&r.length&&2===r.length)switch(e){case 1:t=i;break;case 2:t=n;break;case 0:t=i}return o()&&(t=i),t},buildPlayer:function(e,t){var n=this;if(t.waterfallStepId&&A("CHECKING AUTOPLAY FOR WATERFALL STEP: "+t.waterfallStepId),"html5"===this.decidePlayer(t.requiredPlayer)&&this.autoplayHandler&&!t.overlayPlayer){var i,o=function(i){var o=n.autoplayHandler.videoPolicy;switch(i){case o.allowAutoplay:break;case o.stopMediaWithSound:"on"===t.initialAudio?("auto"!==t.initialPlayback&&"mouseover"!==t.initialPlayback||(t.initialAudio="off",t.audioOnMouseover=!1),t.isWaterfall===!0&&(t.adAttempt>0?(t.initialAudio="off",t.audioOnMouseover=!1):t.audioOnMouseover=!0)):"auto"!==t.initialPlayback&&"mouseover"!==t.initialPlayback||(t.audioOnMouseover=!1);break;case o.neverAutoplay:t.initialPlayback="click",t.isWaterfall&&(t.isWaterfall=!1,t.stopWaterfall=!0)}t.waterfallStepId&&A("BUILDING PLAYER FOR WATERFALL STEP: "+t.waterfallStepId),n.buildPlayerCallback(e,t)};i=!h.isMobile()&&("on"===t.initialAudio||t.audioOnMouseover===!0),n.autoplayHandler.getAutoplayPolicy(o,i)}else n.buildPlayerCallback(e,t)},buildPlayerCallback:function(e,t){this.callbackForAdUnit=e,t.hasOwnProperty("overlayPlayer")&&(this.overlayPlayer=t.overlayPlayer,t.hasOwnProperty("fullscreenMode")&&(t.allowFullscreen=!1)),T()&&"flash"===this.decidePlayer(this.options.requiredPlayer)||this.options.targetElement&&!this.options.firstAdAttempted&&(this.options.targetElement.style.visibility="hidden"),"flash"===this.decidePlayer(this.options.requiredPlayer)&&(this.options.disableCollapse.replay=!1);var n=(new Date).getTime()+Math.floor(1e4*Math.random()),i="APNVideo_Player_"+n;this.externalNameOfVideoPlayer=i,o(e,t,this)},getPlayerStatus:function(){},notifyPlayer:function(e,t){this.adVideoPlayer.handleAdUnitNotification({name:e,value:t})},load:function(){if("html5"===this.decidePlayer(this.options.requiredPlayer)){A("load video");try{this.adVideoPlayer&&void 0!==this.adVideoPlayer&&this.adVideoPlayer.load&&"function"==typeof this.adVideoPlayer.load&&(this.options.delayExpandUntilVPAIDImpression&&this.adVideoPlayer.player()&&this.adVideoPlayer.player().autoplay()&&this.adVideoPlayer.player().autoplay(!1),this.adVideoPlayer.load())}catch(e){b(e)}}},replay:function(){this.isEnded&&(this.dispatchEventToAdunit({name:"rewind"}),this.startedReplay=!0,this.isEnded=!1,this.explicitPlay(),this.adVideoPlayer.controlBar.playToggle&&this.adVideoPlayer.controlBar.playToggle.el()&&this.adVideoPlayer.controlBar.playToggle.el().style&&(this.adVideoPlayer.controlBar.playToggle.el().style["pointer-events"]=""),this.options.sideStream&&this.options.sideStream.wasEnabled===!0&&(this.options.sideStream.enabled=!0,delete this.options.sideStream.wasEnabled),this.options.endCard&&this.options.endCard.enabled&&(this.actualPlayByVideoJS(),l.isIos()||this.adVideoPlayer.bigPlayButton.show()))},actualPlayByVideoJS:function(){this.adVideoPlayer.play(),this.options.vpaid&&this.adVideoPlayer.trigger("handleManualUserInActive")},play:function(){if(this.isEnded!==!0){var e=h.isMobile()&&h.iOSversion()[0]>=10&&this.options.enableInlineVideoForIos===!1;if(e){var t=this;t.overlayPlayer?t.options.targetElement.style.overflow="":setTimeout(function(){t.options.targetElement.style.overflow=""},t.options.expandTime)}this.isAlreadyPlaingForVPAID=!0,this.isCompleted||(A("play video"),this.isDoneInitialPlay?"html5"===this.decidePlayer(this.options.requiredPlayer)?this.isPlayingVideo||this.dispatchEventToAdunit({name:"video_resume"}):this.isPlayingVideo||this.dispatchEventToAdunit({name:"video_resume"}):this.options.vpaid||(this.dispatchEventToAdunit({name:"video_start"}),this.dispatchEventToAdunit({name:"video_impression"})),this.options.vpaid&&this.isIosInlineRequired()?this.isDoneInitialPlay?this.actualPlayByVideoJS():this.adVideoPlayer.trigger("play"):this.options.vpaid&&this.options.overlayPlayer&&h.isIOS()&&h.iOSversion()[0]<10&&!this.isDoneInitialPlay?this.adVideoPlayer.trigger("play"):this.options.vpaid&&this.options.overlayPlayer&&navigator.appVersion.indexOf("Android")>-1&&this.options.enableWaterfall&&!this.isDoneInitialPlay?this.adVideoPlayer.trigger("play"):this.actualPlayByVideoJS(),"html5"===this.decidePlayer(this.options.requiredPlayer)||(this.isPlayingVideo=!0),this.isDoneInitialPlay=!0,this.isEnded=!1)}},resetVpaid:function(){this.dispatchEventToAdunit({name:"reset"})},pause:function(){this.isPlayingVideo&&(A("pause video"),this.adVideoPlayer.pause(),this.options.vpaid&&this.adVideoPlayer.trigger("handleManualUserActive"),this.isCompleted||this.isEnded||this.dispatchEventToAdunit({name:"video_pause"}))},explicitPause:function(){A("explicit pause video"),this.explicitPaused=!0,this.pause()},explicitPlay:function(){A("explicit play video"),this.explicitPaused=!1,this.play()},mute:function(){this.isMuted||(A("mute audio"),"html5"===this.decidePlayer(this.options.requiredPlayer)?(this.adVideoPlayer.muted(!0),this.dispatchEventToAdunit({name:"video_mute"})):this.adVideoPlayer.mute(),this.isMuted=!0)},explicitMute:function(){A("explicit mute video"),this.isExplicitMuted=!0,this.mute()},unmute:function(){!this.isExplicitMuted&&this.isMuted&&(A("unmute audio"),"html5"===this.decidePlayer(this.options.requiredPlayer)?(this.adVideoPlayer.muted()===!0&&this.adVideoPlayer.muted(!1),(this.isMuted||"off"===this.options.initialAudio)&&this.dispatchEventToAdunit({name:"video_unmute"})):(this.adVideoPlayer.unmute(),this.hasBeenUnmuted=!0),this.isMuted=!1)},explicitUnmute:function(){this.isExplicitMuted=!1,this.unmute()},resizeVideoWithDimensions:function(e,t){var n=this;this.options.width=e,this.options.height=t,n.resizeVideo(n.aspectRatio)},mouseIn:function(){this.adVideoPlayer.mouseIn()},mouseOut:function(){this.adVideoPlayer.mouseOut()},destroy:function(e,t){this.isPlayingVideo=!1,this.adVideoPlayer.pause(),this.isCompleted===!1&&(this.options.vpaid===!1?this.dispatchEventToAdunit({name:"video_skip"}):this.options.vpaid===!0&&this.isSkipped===!1&&this.dispatchEventToAdunit({name:"video_skip"})),"function"==typeof this.callbackForAdUnit.cbWhenSkipped&&this.callbackForAdUnit.cbWhenSkipped("video-skip"),this.isSkipped=!0,this.verificationManager&&this.verificationManager.destroy(),A("destroy");var n=I;"function"==typeof this.callbackForAdUnit.cbWhenDestroy&&(this.overlayPlayer?e&&t?this.callbackForAdUnit.cbWhenDestroy({type:w,code:n,message:t},!0,this.options):this.callbackForAdUnit.cbWhenDestroy(null,!0,this.options):e&&t?this.callbackForAdUnit.cbWhenDestroy({type:w,code:n,message:t},null,this.options):this.callbackForAdUnit.cbWhenDestroy(null,null,this.options))},destroyWithoutSkip:function(e,t,n,i){try{var o=this,r=function(){o.isPlayingVideo=!1,o.adVideoPlayer&&o.adVideoPlayer.pause&&"function"==typeof o.adVideoPlayer.pause&&o.adVideoPlayer.pause(),o.verificationManager&&o.verificationManager.destroy(),A("destroy without skip: "+o.options.iframeVideoWrapperId);var r=i||I;"function"==typeof o.callbackForAdUnit.cbWhenDestroy&&(o.overlayPlayer?e&&t?(n&&(r=S),o.callbackForAdUnit.cbWhenDestroy({type:w,code:r,message:t},!0,o.options)):o.callbackForAdUnit.cbWhenDestroy(null,!0,o.options):e&&t?(n&&(r=S),o.callbackForAdUnit.cbWhenDestroy({type:w,code:r,message:t},null,o.options)):o.callbackForAdUnit.cbWhenDestroy(null,null,o.options))};o.options.disableCollapseForDelay&&o.options.disableCollapseForDelay>0?setTimeout(r,o.options.disableCollapseForDelay):r()}catch(a){b("failed to destroy/notify by "+a)}},getVideoObject:function(){return this.adVideoPlayer},handleFlashPlay:function(){var e=this,t=function(){e.resizeVideo(e.aspectRatio),A("flash player is ready to play"),e.callbackForAdUnit.cbWhenReady&&e.callbackForAdUnit.cbWhenReady(e)};e.isChrome?(e.setChromeSize(),setTimeout(t,100)):t()},handlePlayerNotification:function(e){"video_time"!==e.name&&A("Got notification from player = "+e.name);var t=this,n={flash_is_respondble:function(){t.flashBlockerTimeout&&(clearTimeout(t.flashBlockerTimeout),t.flashBlockerTimeout=null),A("Flash is respondble")},canplay:function(){if(t.flashBlockerTimeout&&(clearTimeout(t.flashBlockerTimeout),t.flashBlockerTimeout=null,A("Flash is respondble")),t.options.hasOwnProperty("overlayPlayer"))try{t.adVideoPlayer.setDOMPlayerIdAndSize(t.adVideoPlayer.id,t.options.width,t.options.height)}catch(n){A("Failed to execute setDOMPlayerIdAndSize(...) on Flash Player")}if(t.options.vpaid)try{var i=t.adVideoPlayer.getCompanionsXml();i&&i.length>0&&(e.companionAds=i)}catch(o){}t.options.vpaid&&t.options.delayExpandUntilVPAIDImpression?t.actualPlayByVideoJS():t.handleFlashPlay()},video_failed:function(){t.flashBlockerTimeout&&(clearTimeout(t.flashBlockerTimeout),t.flashBlockerTimeout=null,A("Flash is respondble")),t.destroyWithoutSkip(!0,m,null,C)},video_timeout:function(){t.destroyWithoutSkip(!0,m,!0,S)},video_bitrate:function(){var t=e.bandwidth;A("bandwidth from flash : "+t)},video_impression:function(){},video_mute:function(){e.hasOwnProperty("value")&&!e.value&&(e.name="video_unmute"),e.hasOwnProperty("value")&&(t.isMuted=e.value)},video_click:function(){e.hasOwnProperty("playerHandles")?e.playerHandles?e.hasOwnProperty("url")&&e.url.length>0?t.click(e.url):t.click():t.dispatchEventToAdunit({name:"ad-click",trackClick:!0}):t.click()},video_complete:function(){t.isCompleted=!0,t.options.disableCollapse.enabled||t.destroyWithoutSkip()},video_fullscreen:function(){t.isFullscreen?setTimeout(function(){t.isFullscreen=!t.isFullscreen},1e3):t.isFullscreen=!t.isFullscreen},quartile_event:function(){},video_pause:function(){},video_start:function(){t.isDoneInitialPlay||"auto"===t.options.initialPlayback||t.play()},video_time:function(){},video_resume:function(){},video_stopped:function(){t.destroyWithoutSkip()},video_skipped:function(){t.destroy()},video_ratio:function(){},video_heightOffset:function(){t.heightOffset=e.heightOffset},video_paused_by_user:function(){t.explicitPause()},video_resumed_by_user:function(){A("received video_resumed_by_user from Flash"),t.requiredForFlashVpaid()?t.isVpaidFlashVideoPlaying===!1?(A("call explicitPlay by video_Resumed_by_user event"),t.explicitPlay()):A("do nothing because of isVpaidFlashVideoPlaying:true"):t.explicitPlay()},video_progress:function(){if(e&&e.offset)return void t.dispatchEventToAdunit({name:e.offset},function(){A("handle video_progress by flash : "+e.offset)})}};if(t.isDoneInitialPlay||"video_mute"!==e.name){var i=n[e.name];i&&void 0!==i&&i(),"video_pause"!==e.name&&"video_resume"!==e.name&&"video_impression"!==e.name&&"video_start"!==e.name&&"video_failed"!==e.name&&"video_timeout"!==e.name&&this.dispatchEventToAdunit(e),"video_impression"!==e.name&&"video_start"!==e.name||!t.options.vpaid||this.dispatchEventToAdunit(e)}},handleOverlayNotification:function(e){A("Got overlay notification from player = "+e.name);var t=this,n={leaveFullscreen:function(){t.options.hasOwnProperty("playerNotification")&&t.options.playerNotification("leaveFullscreen")}},i=n[e.name];i&&void 0!==i&&i()},requiredForFlashVpaid:function(){return"flash"===this.decidePlayer(this.options.requiredPlayer)&&this.options.vpaid===!0},notifyVpaidEvent:function(e){var t=this;if(t.requiredForFlashVpaid()&&("AdPaused"===e&&(A("received VPAID AdPaused from Flash"),t.isVpaidFlashVideoPlaying=!1,t.isPlayingVideo=!1,A("set isVpaidFlashVideoPlaying = false"),A("set isPlayingVideo = false")),"AdPlaying"===e&&(A("received VPAID AdPlaying from Flash"),t.isVpaidFlashVideoPlaying=!0,t.isPlayingVideo=!0,A("set isVpaidFlashVideoPlaying = true"),A("set isPlayingVideo = true"))),"flash"===t.decidePlayer(t.options.requiredPlayer)&&t.options.delayExpandUntilVPAIDImpression&&("AdVideoStart"===e&&t.adVideoPlayer.pause(),"AdImpression"===e&&(t.gotAdImpressionForFlash=!0),"AdStarted"===e&&(t.gotAdStartedForFlash=!0),t.gotAdImpressionForFlash&&t.gotAdStartedForFlash&&(t.handleFlashPlay(),t.gotAdImpressionForFlash=!1,t.gotAdStartedForFlash=!1)),!(t.options.delayExpandUntilVPAIDImpression&&t.delayEventHandler.isSuppress&&k.indexOf(e)>=0)){if("AdVolumeChange"===e){var n="html5"===this.decidePlayer(this.options.requiredPlayer);if(n){var i=t.adVideoPlayer.player().muted(),o=t.adVideoPlayer.player().volume();i?i&&(A("set VPAID AdVolumeChange video_mute"),this.dispatchEventToAdunit({name:"video_mute"})):o>0&&(A("set VPAID AdVolumeChange video_unmute"),this.dispatchEventToAdunit({name:"video_unmute"}))}}E.indexOf(e)>=0||E.indexOf("vpaid."+e)>=0?t.notifyVpaidEvent_internal(e):t.delayEventHandler.push(function(){t.notifyVpaidEvent_internal(e)})}},notifyVpaidEvent_internal:function(e){this.options.cbNotification&&this.options.cbNotification("VPAID",e,this.options.targetId),this.options.cbApnVastPlayer&&this.options.cbApnVastPlayer(e)},setChromeSize:function(){this.adVideoPlayer.width="0px",this.adVideoPlayer.height="0px",this.adVideoPlayer.style.width="0px",this.adVideoPlayer.style.height="0px",this.options.targetElement.style.visibility="visible"},click:function(e,t){if(!this.isDoneInitialPlay)return void this.play();this.isIosInlineRequired()===!1&&(this.pause(),this.toggleWindowFocus=!1);var n=!1;if(this.options.useCustomOpenForClickthrough){var i=this.options.clickUrls[0];e&&(i=e),n=!0,this.dispatchEventToAdunit({name:"video_click_open_url",url:i})}else if(e)n=!0,window.open(e);else if(this.options.clickUrls[0]){n=!0;var o=this.options.clickUrls[0];window.open(o)}"undefined"!=typeof t&&t!==!0||this.dispatchEventToAdunit({name:"ad-click",trackClick:n})},getRapamsAndExtensions:function(){var e=this.options.extensions&&this.options.extensions.length>0?""+this.options.extensions+"":"";return{adParameters:this.options.adParameters,extensions:e}},handleViewability:function(e,t,n){var i=this.options&&this.options.viewability&&this.options.viewability.config,o=e&&e.name?e.name:null;"fullscreenchange"!==o&&"video_fullscreen"!==o||(o=this.isFullscreen?"fullscreen":"exitFullscreen"),n||"video_duration"!==o||(this.isAlreadyStart=!0);var r=function(){var i;i=n?this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player&&this.adVideoPlayer.player().duration():e.duration,(!i||void 0===i||i<=0)&&(i=-2),i===-2&&(this.options&&this.options.data&&this.options.data.vastDurationMsec?(i=this.options.data.vastDurationMsec/1e3,(!i||null===i||i<=0)&&(i=-2)):i=-2);var r=this.options.width,a=this.options.height;if(this.viewabilityTracking.init(this.options,i,r,a,t),n)if(this.options.expandable)this.options.vpaid===!0&&"video_start"===o&&this.viewabilityTracking.invokeEvent("expand"),this.options.vpaid===!1&&"loadstart"===o&&this.viewabilityTracking.invokeEvent("expand"),this.viewabilityTracking.invokeEvent(o);else{if(this.options.overlayPlayer&&l.isMobile()&&this.options.delayStartViewability)return;this.viewabilityTracking.invokeEvent(o)}else this.isAlreadyStart&&(this.options.expandable&&this.viewabilityTracking.invokeEvent("expand"),this.viewabilityTracking.invokeEvent("video_start"))},a=function(){if(this.viewabilityTracking&&this.viewabilityTracking.isReady){ +if(n===!1&&"expand"===o&&this.options.expandable)return;"force_start_viewability"===o&&this.options.delayStartViewability?(this.options.delayStartViewability=!1,this.viewabilityTracking.invokeEvent("video_start")):this.viewabilityTracking.invokeEvent(o)}};if(o&&i){var s=this.blockTrackingUserActivity&&("video_resume"===o||"video_pause"===o||"video_mute"===o||"video_unmute"===o);s||(o===t?r.apply(this):a.apply(this))}},findPathForViewability:function(e){var t,n="html5"===this.decidePlayer(this.options.requiredPlayer);if(n){if(t=!this.options.expandable||"undefined"!=typeof this.options.isExpanded&&this.options.isExpanded!==!1?"video_start":"expand",e&&e.name&&e.name===t){if(this.isDoneFirstLoadStart)return;this.isDoneFirstLoadStart=!0}this.handleViewability(e,t,n)}else{if(t="video_duration",e&&"video_start"===e.name)return;e&&e.name&&e.name===t?this.isDoneFirstLoadStart||(this.isDoneFirstLoadStart=!0,this.handleViewability(e,t,n)):this.handleViewability(e,t,n)}},dispatchEventToAdunit:function(e,t){var n=this;if("video_start"===e.name&&n.iframeVideoWrapper.contentDocument){var i=n.iframeVideoWrapper.contentDocument.getElementById(n.divIdForVideo),o=n.iframeVideoWrapper.contentDocument.getElementById(n.videoId);i.style.background=n.options.playerSkin.videoBackgroundColor,o.style.background=n.options.playerSkin.videoBackgroundColor,h.isIOS()&&n.isIosInlineRequired()&&(o.style.opacity=0)}if("video_complete"===e.name&&(void 0===e.obj&&(e.obj={}),e.obj.videoAdPending=this.options.disableCollapse.replay),"video_fullscreen"===e.name&&"flash"===this.decidePlayer(this.options.requiredPlayer)?setTimeout(function(){var t={name:e.name,user:e.user,value:e.value};n.findPathForViewability(t)},1500):this.findPathForViewability(e),(this.startedReplay===!0||this.isEnded)&&this.options.disableCollapse.replay===!0)if(this.startedReplay===!1&&"rewind"===e.name);else{if("video_complete"===e.name&&"function"==typeof t)return void t();if("ad-click"!==e.name&&e.name.indexOf("IconClick")===-1)return void this.callbackForAdUnit.cbForHandlingDispatchedEvent(e,!0)}"video_skip"===e.name&&c.pushAndCheck(this.options.targetElement.id+"_dispatchEventToAdunit",e.name)===!1||"video_complete"===e.name&&this.isVideoCompleteInjected===!0&&this.options.disableCollapse.replay===!1||(e&&"video_time"!==e.name&&A("(push)"+e.name),this.delayEventHandler.push(function(){n.dispatchEventToAdunit_internal(e,t)}),"video_complete"===e.name&&(this.isVideoCompleteInjected=!0))},dispatchEventToAdunit_internal:function(e,t){if(!this.isCompleted||"video_complete"===e.name||"ad-click"===e.name||"video_skip"===e.name||this.startedReplay){var n=this;if(e&&"video_time"!==e.name&&A("invoke callback : "+JSON.stringify(e)),this.options.hasOwnProperty("overlayPlayer")&&this.options.hiddenControls&&(("firstplay"===e.name&&!this.options.vpaid||"video_impression"===e.name&&this.options.vpaid)&&(!l.isMobile()||"click"!==this.options.initialPlayback&&"mouseover"!==this.options.initialPlayback?h.isIOS()&&h.iOSversion()[0]<10&&"auto"===this.options.initialPlayback&&(this.adVideoPlayer.controlBar.el_.style.removeProperty("display"),delete this.options.hiddenControls):(this.adVideoPlayer.controlBar.el_.style.removeProperty("display"),delete this.options.hiddenControls)),"video_resume"===e.name&&this.options.vpaid&&l.isMobile()&&(this.adVideoPlayer.controlBar.el_.style.removeProperty("display"),delete this.options.hiddenControls)),this.callbackForAdUnit.cbForHandlingDispatchedEvent&&"video_time"!==e.name){if("video_pause"===e.name&&(this.isPlayingVideo=!1),"video_play"!==e.name&&"video_start"!==e.name&&"firstplay"!==e.name||(this.isPlayingVideo=!0,this.isDoneInitialPlay=!0),"video_fullscreen"===e.name)return void setTimeout(function(){e.fullscreenStatus=n.isFullscreen?"enter":"exit",n.callbackForAdUnit.cbForHandlingDispatchedEvent(e)},1500);"function"==typeof t&&t();var i=this.blockTrackingUserActivity&&("video_resume"===e.name||"video_pause"===e.name||"video_mute"===e.name||"video_unmute"===e.name);if(i||(e.player=this,this.callbackForAdUnit.cbForHandlingDispatchedEvent(e)),this.verificationManager){var o=this.prepareOmidEventData(e);o.name&&this.verificationManager.dispatchEvent(o.name,o.data)}}this.options.vpaid===!0&&"video_skip"===e.name&&(this.isSkipped=!0)}},resolveMacro:function(e){switch(e){case"MEDIAPLAYHEAD":return this.options.hasOwnProperty("mediaPlayhead")&&"number"==typeof this.options.mediaPlayhead?l.convertTimeSecondsToString(this.options.mediaPlayhead):-1;case"BREAKPOSITION":return this.options.breakPosition?this.options.breakPosition:-1;case"ADCOUNT":return 1;case"PLACEMENTTYPE":return this.options.overlayPlayer?1:this.options.expandable?3:-1;case"CLIENTUA":return this.options.clientUA?this.options.clientUA:"unknown unknown";case"DEVICEIP":return-1;case"PLAYERCAPABILITIES":var t=[];return this.options.skippable&&this.options.skippable.enabled&&t.push("skip"),this.options.showMute&&t.push("mute"),"auto"===this.options.initialPlayback&&("on"===this.options.initialAudio?t.push("autoplay"):t.push("mautoplay")),this.options.allowFullscreen&&t.push("fullscreen"),t.push("icon"),t.join();case"CLICKTYPE":return this.options.clickUrls&&this.options.clickUrls[0]?1:this.options.learnMore.enabled?2:0;case"PLAYERSTATE":var n=[];return this.isSkipped&&n.push("skipped"),this.isMuted&&n.push("muted"),"auto"===this.options.initialPlayback&&("on"===this.options.initialAudio?n.push("autoplayed"):n.push("mautoplayed")),this.adVideoPlayer.isFullscreen&&"function"==typeof this.adVideoPlayer.isFullscreen&&this.adVideoPlayer.isFullscreen()&&n.push("fullscreen"),n.join();case"PLAYERSIZE":return this.options.width+","+this.options.height;case"ADPLAYHEAD":if(this.adVideoPlayer.currentTime&&"function"==typeof this.adVideoPlayer.currentTime){var i=this.adVideoPlayer.currentTime();return l.convertTimeSecondsToString(i)}return-1;case"ASSETURI":return this.options.video.url;case"PODSEQUENCE":return-1;case"LIMITADTRACKING":return 0;default:return-1}},prepareOmidEventData:function(e){var t={error:"sessionError",impression:"impression",video_impression:"impression",video_start:"start","video-first-quartile":"firstQuartile","video-mid":"midpoint","video-third-quartile":"thirdQuartile",video_complete:"complete",video_pause:"pause",video_resume:"resume","user-close":"skipped",video_skip:"skipped",video_skipped:"skipped","audio-mute":"volumeChange","audio-unmute":"volumeChange",video_mute:"volumeChange",video_unmute:"volumeChange",fullscreenchange:"playerStateChange",video_fullscreen:"playerStateChange","video-exit-fullscreen":"playerStateChange","ad-expand":"playerStateChange","ad-collapse":"playerStateChange","ad-click":"adUserInteraction","user-accept-invitation":"adUserInteraction"},n=t.hasOwnProperty(e.name)?t[e.name]:"",i={name:n},o=null;switch(n){case"sessionError":o={},o.errorType=e.code,o.message=e.message;break;case"start":o={},this.options.data.durationMsec?o.duration=this.options.data.durationMsec/1e3:this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player?o.duration=this.adVideoPlayer.player().duration()/1e3:o.duration=-2,this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player?o.videoPlayerVolume=this.adVideoPlayer.player().volume():o.videoPlayerVolume=-1;break;case"volumeChange":o={},"audio-mute"===e.name||"video_mute"===e.name?o.videoPlayerVolume=0:this.adVideoPlayer&&this.adVideoPlayer.player&&"function"==typeof this.adVideoPlayer.player?o.videoPlayerVolume=this.adVideoPlayer.player().volume():o.videoPlayerVolume=-1;break;case"playerStateChange":o={},"video-fullscreen"===e.name||"fullscreenchange"===e.name&&"enter"===e.fullscreenStatus?o.state=this.adVideoPlayer.isFullscreen?"fullscreen":"normal":"video-exit-fullscreen"===e.name||"fullscreenchange"===e.name&&"exit"===e.fullscreenStatus?o.state="normal":"ad-collapse"===e.name?o.state="collapsed":o.state="normal";break;case"adUserInteraction":o={},"ad-click"===e.name?o.interactionType="click":o.interactionType="invitationAccept"}return o&&(i.data=o),i},resizeVideo:function(e,t,n){s.resizeVideo(e,t,this,n)},resizeVideoForSideStream:function(e,t,n){s.resizeVideoForSideStream(this,e,t,n)},isIosInlineRequired:function(){return this.autoplayHandler.isIosInlineRequired(this.options.enableInlineVideoForIos)},resizePlayer:function(e,t){s.resizePlayer(e,t,this)},getFinalSize:function(){return s.getFinalSize(this)},setVastAttribute:function(e){var t,n=this.options;t=e?e:this.adVideoPlayer&&this.adVideoPlayer.player?this.adVideoPlayer.player().duration():0,n.data.durationMsec=null!==t?Math.round(1e3*t):0;var i=this.Utils.getMsecTime(n.data.skipOffset,n.data.durationMsec);n.data.skipOffset&&i>=0?(n.data.isVastVideoSkippable=!0,n.data.skipOffsetMsec=i):n.data.skipOffsetMsec=null;var o=n.data.vastProgressEvent;if(o&&"object"==typeof o)for(var r in o){var a=this.Utils.getMsecTime(r.replace(/progress_/g,""),n.data.durationMsec);o[r]=a}},disableTrackingUserActivity:function(e){this.blockTrackingUserActivity=e,this.adVideoPlayer&&this.adVideoPlayer.bigPlayButton&&(this.adVideoPlayer.bigPlayButton.el_.style.opacity=e===!0?0:1)},delayEventsTracking:function(e,t){this.callbackForAdUnit.cbDelayEventsTracking&&this.callbackForAdUnit.cbDelayEventsTracking(e,t)},notifyOverlayPlayerVideoPaused:function(){this.options.tmpActiveListener&&this.options.cbApnVastPlayer&&this.options.cbApnVastPlayer("apn-video-paused-by-device")},checkWhenVideoPausedByDevice:function(e){if(this.options.overlayPlayer&&this.options.cbApnVastPlayer&&this.iframeVideoWrapper&&this.iframeVideoWrapper.contentDocument){var t=null;if("string"==typeof this.videoObjectId)t=this.iframeVideoWrapper.contentDocument.getElementById(this.videoObjectId);else{var n=this.iframeVideoWrapper.contentDocument.getElementsByTagName("VIDEO");if(n&&n.length>0)for(var i=0;i0){t=n[i];break}}if(t)return e?(this.options.tmpActiveListener=!0,t.addEventListener("pause",this.notifyOverlayPlayerVideoPaused.bind(this))):(delete this.options.tmpActiveListener,t.removeEventListener("pause",this.notifyOverlayPlayerVideoPaused.bind(this))),!0}return!0},forceStartViewability:function(){this.findPathForViewability({name:"force_start_viewability"})},log:A,debug:A,test:function(e,t){var n=this.options;if(n&&n.test&&n.test[e]&&"function"==typeof n.test[e]){var i=function(e){console.debug("%c"+e,"background: red; color: white")},o=function(e){console.debug("%c"+e,"background: green; color: white")};try{var r=function(t,n){t?(n=n+" Succeeded"||"Succeeded",o("Unit Test ["+e+"] : "+n)):(n=n+" failed"||"Assertion failed",i("Unit Test ["+e+"] : "+n))},a=function(t){console.debug("%cUnit Test Log : ["+e+"] : "+t,"background: gray; color: white")};n.test[e](t,r,a)}catch(s){i("unit test failed due to : "+s)}}},setFinalAspectRatio:function(e){this.finalAspectRatio=e},getFinalAspectRatio:function(){return this.finalAspectRatio}};e.exports=P,window[f]=P},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(module){function _handleMultipleEvents(e,t,n,i){vjs.arr.forEach(n,function(n){e(t,n,i)})}function _logType(e,t){return}document.createElement("video"),document.createElement("audio"),document.createElement("track");var global_options,vjs=function(e,t,n){global_options=t;var i;if("string"==typeof e){if(0===e.indexOf("#")&&(e=e.slice(1)),vjs.players[e])return t&&vjs.log.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&vjs.players[e].ready(n),vjs.players[e];i=vjs.el(e)}else i=e;if(!i||!i.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return i.player||new vjs.Player(i,t,n)},videojs=window.videojs_apn=vjs;vjs.CDN_VERSION="GENERATED_CDN_VSN",vjs.ACCESS_PROTOCOL="https:"==document.location.protocol?"https://":"http://",vjs.VERSION="GENERATED_FULL_VSN",vjs.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:500,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},textTrackDisplay:{},bigPlayButton:{},controlBar:{},errorDisplay:{},textTrackSettings:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.userLanguage||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."},"GENERATED_CDN_VSN"!==vjs.CDN_VERSION&&(videojs.options.flash.swf=vjs.ACCESS_PROTOCOL+"vjs.zencdn.net/"+vjs.CDN_VERSION+"/video-js.swf"),vjs.addLanguage=function(e,t){return void 0!==vjs.options.languages[e]?vjs.options.languages[e]=vjs.util.mergeOptions(vjs.options.languages[e],t):vjs.options.languages[e]=t,vjs.options.languages},vjs.players={},__webpack_require__(5).amd?(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return videojs}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))):module.exports=videojs,vjs.CoreObject=vjs.CoreObject=function(){},vjs.CoreObject.extend=function(e){var t,n;e=e||{},t=e.init||e.init||this.prototype.init||this.prototype.init||function(){},n=function(){t.apply(this,arguments)},n.prototype=vjs.obj.create(this.prototype),n.prototype.constructor=n,n.extend=vjs.CoreObject.extend,n.create=vjs.CoreObject.create;for(var i in e)e.hasOwnProperty(i)&&(n.prototype[i]=e[i]);return n},vjs.CoreObject.create=function(){var e=vjs.obj.create(this.prototype);return this.apply(e,arguments),e},vjs.on=function(e,t,n){if(vjs.obj.isArray(t))return _handleMultipleEvents(vjs.on,e,t,n);var i=vjs.getData(e);i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=vjs.guid++),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t){if(!i.disabled){t=vjs.fixEvent(t);var n=i.handlers[t.type];if(n)for(var o=n.slice(0),r=0,a=o.length;r=0;i--)n[i]===t&&n.splice(i,1);e.className=n.join(" ")}},vjs.TEST_VID=vjs.createEl("video"),function(){var e=document.createElement("track");e.kind="captions",e.srclang="en",e.label="English",vjs.TEST_VID.appendChild(e)}(),vjs.USER_AGENT=navigator.userAgent,vjs.IS_IPHONE=/iPhone/i.test(vjs.USER_AGENT),vjs.IS_IPAD=/iPad/i.test(vjs.USER_AGENT),vjs.IS_IPOD=/iPod/i.test(vjs.USER_AGENT),vjs.IS_IOS=vjs.IS_IPHONE||vjs.IS_IPAD||vjs.IS_IPOD,vjs.IOS_VERSION=function(){var e=vjs.USER_AGENT.match(/OS (\d+)_/i);if(e&&e[1])return e[1]}(),vjs.IS_ANDROID=/Android/i.test(vjs.USER_AGENT),vjs.ANDROID_VERSION=function(){var e,t,n=vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return n?(e=n[1]&&parseFloat(n[1]),t=n[2]&&parseFloat(n[2]),e&&t?parseFloat(n[1]+"."+n[2]):e?e:null):null}(),vjs.IS_OLD_ANDROID=vjs.IS_ANDROID&&/webkit/i.test(vjs.USER_AGENT)&&vjs.ANDROID_VERSION<2.3,vjs.IS_FIREFOX=/Firefox/i.test(vjs.USER_AGENT),vjs.IS_CHROME=/Chrome/i.test(vjs.USER_AGENT),vjs.IS_IE8=/MSIE\s8\.0/.test(vjs.USER_AGENT),vjs.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),vjs.BACKGROUND_SIZE_SUPPORTED="backgroundSize"in vjs.TEST_VID.style,vjs.setElementAttributes=function(e,t){vjs.obj.each(t,function(t,n){null===n||"undefined"==typeof n||n===!1?e.removeAttribute(t):e.setAttribute(t,n===!0?"":n)})},vjs.getElementAttributes=function(e){var t,n,i,o,r;if(t={},n=",autoplay,controls,loop,muted,default,",e&&e.attributes&&e.attributes.length>0){i=e.attributes;for(var a=i.length-1;a>=0;a--)o=i[a].name,r=i[a].value,"boolean"!=typeof e[o]&&n.indexOf(","+o+",")===-1||(r=null!==r),t[o]=r}return t},vjs.getComputedDimension=function(e,t){var n="";return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,"").getPropertyValue(t):e.currentStyle&&(n=e["client"+t.substr(0,1).toUpperCase()+t.substr(1)]+"px"),n},vjs.insertFirst=function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},vjs.browser={},vjs.el=function(e){return 0===e.indexOf("#")&&(e=e.slice(1)),document.getElementById(e)},vjs.formatTime=function(e,t){t=t||e;var n=Math.floor(e%60),i=Math.floor(e/60%60),o=Math.floor(e/3600),r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(o=i=n="-"),o=o>0||a>0?o+":":"",i=((o||r>=10)&&i<10?"0"+i:i)+":",n=n<10?"0"+n:n,o+i+n},vjs.blockTextSelection=function(){document.body.focus(),document.onselectstart=function(){return!1}},vjs.unblockTextSelection=function(){document.onselectstart=function(){return!0}},vjs.trim=function(e){return(e+"").replace(/^\s+|\s+$/g,"")},vjs.round=function(e,t){return t||(t=0),Math.round(e*Math.pow(10,t))/Math.pow(10,t)},vjs.createTimeRange=function(e,t){return void 0===e&&void 0===t?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:1,start:function(){return e},end:function(){return t}}},vjs.setLocalStorage=function(e,t){try{var n=window.localStorage||!1;if(!n)return;n[e]=t}catch(i){22==i.code||1014==i.code?vjs.log("LocalStorage Full (VideoJS)",i):18==i.code?vjs.log("LocalStorage not allowed (VideoJS)",i):vjs.log("LocalStorage Error (VideoJS)",i)}},vjs.getAbsoluteURL=function(e){return e.match(/^https?:\/\//)||(e=vjs.createEl("div",{innerHTML:'x'}).firstChild.href),e},vjs.parseUrl=function(e){var t,n,i,o,r;o=["protocol","hostname","port","pathname","search","hash","host"],n=vjs.createEl("a",{href:e}),i=""===n.host&&"file:"!==n.protocol,i&&(t=vjs.createEl("div"),t.innerHTML='',n=t.firstChild,t.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(t)),r={};for(var a=0;a=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),vjs.removeData(this.el_),this.el_=null},vjs.Component.prototype.player_=!0,vjs.Component.prototype.player=function(){return this.player_},vjs.Component.prototype.options_,vjs.Component.prototype.options=function(e){return void 0===e?this.options_:this.options_=vjs.util.mergeOptions(this.options_,e)},vjs.Component.prototype.el_,vjs.Component.prototype.createEl=function(e,t){return vjs.createEl(e,t)},vjs.Component.prototype.localize=function(e){var t=this.player_.language(),n=this.player_.languages();return n&&n[t]&&n[t][e]?n[t][e]:e},vjs.Component.prototype.el=function(){return this.el_},vjs.Component.prototype.contentEl_,vjs.Component.prototype.contentEl=function(){return this.contentEl_||this.el_},vjs.Component.prototype.id_,vjs.Component.prototype.id=function(){return this.id_},vjs.Component.prototype.name_,vjs.Component.prototype.name=function(){return this.name_},vjs.Component.prototype.children_,vjs.Component.prototype.children=function(){return this.children_},vjs.Component.prototype.childIndex_,vjs.Component.prototype.getChildById=function(e){return this.childIndex_[e]},vjs.Component.prototype.childNameIndex_,vjs.Component.prototype.getChild=function(e){return this.childNameIndex_[e]},vjs.Component.prototype.addChild=function(e,t){var n,i,o;return"string"==typeof e?(o=e,t=t||{},i=t.componentClass||vjs.capitalize(o),t.name=o,n=new window.videojs_apn[i](this.player_||this,t)):n=e,this.children_.push(n),"function"==typeof n.id&&(this.childIndex_[n.id()]=n),o=o||n.name&&n.name(),o&&(this.childNameIndex_[o]=n),"function"==typeof n.el&&n.el()&&this.contentEl().appendChild(n.el()),n},vjs.Component.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},vjs.Component.prototype.initChildren=function(){var e,t,n,i,o,r,a;if(e=this,t=e.options(),n=t.children)if(a=function(n,i){void 0!==t[n]&&(i=t[n]),i!==!1&&(e[n]=e.addChild(n,i))},vjs.obj.isArray(n))for(var s=0;s0){for(var t=0,n=e.length;t1?i=!1:t&&(r=e.touches[0].pageX-t.pageX,a=e.touches[0].pageY-t.pageY,s=Math.sqrt(r*r+a*a),s>l&&(i=!1))}),o=function(){i=!1},this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(o){t=null,i===!0&&(n=(new Date).getTime()-e,n'+this.defaultValue+""},t),vjs.Component.prototype.createEl.call(this,"div",t)},vjs.Menu=vjs.Component.extend(),vjs.Menu.prototype.addItem=function(e){this.addChild(e),e.on("click",vjs.bind(this,function(){this.unlockShowing()}))},vjs.Menu.prototype.createEl=function(){var e=this.options().contentElType||"ul";this.contentEl_=vjs.createEl(e,{className:"vjs-menu-content"});var t=vjs.Component.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),vjs.on(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},vjs.MenuItem=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),this.selected(t.selected)}}),vjs.MenuItem.prototype.createEl=function(e,t){return vjs.Button.prototype.createEl.call(this,"li",vjs.obj.merge({className:"vjs-menu-item",innerHTML:this.localize(this.options_.label)},t))},vjs.MenuItem.prototype.onClick=function(){this.selected(!0)},vjs.MenuItem.prototype.selected=function(e){e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-selected",!0)):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-selected",!1))},vjs.MenuButton=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),this.update(),this.on("keydown",this.onKeyPress),this.el_.setAttribute("aria-haspopup",!0),this.el_.setAttribute("role","button")}}),vjs.MenuButton.prototype.update=function(){var e=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=e,this.addChild(e),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},vjs.MenuButton.prototype.buttonPressed_=!1,vjs.MenuButton.prototype.createMenu=function(){var e=new vjs.Menu(this.player_);if(this.options().title&&e.contentEl().appendChild(vjs.createEl("li",{className:"vjs-menu-title",innerHTML:vjs.capitalize(this.options().title),tabindex:-1})),this.items=this.createItems(),this.items)for(var t=0;t0&&this.items[0].el().focus()},vjs.MenuButton.prototype.unpressButton=function(){this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-pressed",!1)},vjs.MediaError=function(e){"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:"object"==typeof e&&vjs.obj.merge(this,e),this.message||(this.message="")},vjs.MediaError.prototype.code=0,vjs.MediaError.prototype.message="",vjs.MediaError.prototype.status=null,vjs.MediaError.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],vjs.MediaError.defaultMessages={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var errNum=0;errNum9},vjs.Player.prototype.languages_,vjs.Player.prototype.languages=function(){return this.languages_},vjs.Player.prototype.options_=vjs.options,vjs.Player.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),vjs.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech&&this.tech.dispose(),vjs.Component.prototype.dispose.call(this)},vjs.Player.prototype.getTagSettings=function(e){var t,n,i={sources:[],tracks:[]};if(t=vjs.getElementAttributes(e),n=t["data-setup"],null!==n&&vjs.obj.merge(t,vjs.JSON.parse(n||"{}")),vjs.obj.merge(i,t),e.hasChildNodes()){var o,r,a,s,l;for(o=e.childNodes,s=0,l=o.length;s0&&(i.startTime=this.cache_.currentTime),this.cache_.src=t.src),this.tech=new window.videojs_apn[e](this,i),this.tech.ready(n)},vjs.Player.prototype.unloadTech=function(){this.isReady_=!1,this.tech.dispose(),this.tech=!1},vjs.Player.prototype.onLoadStart=function(){this.removeClass("vjs-ended"),this.error(null),this.paused()?this.hasStarted(!1):this.trigger("firstplay")},vjs.Player.prototype.hasStarted_=!1,vjs.Player.prototype.hasStarted=function(e){return void 0!==e?(this.hasStarted_!==e&&(this.hasStarted_=e,e?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):this.hasStarted_},vjs.Player.prototype.onLoadedMetaData,vjs.Player.prototype.onLoadedData,vjs.Player.prototype.onLoadedAllData,vjs.Player.prototype.onPlay=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0)},vjs.Player.prototype.onWaiting=function(){this.addClass("vjs-waiting")},vjs.Player.prototype.onWaitEnd=function(){this.removeClass("vjs-waiting")},vjs.Player.prototype.onSeeking=function(){this.addClass("vjs-seeking")},vjs.Player.prototype.onSeeked=function(){this.removeClass("vjs-seeking")},vjs.Player.prototype.onFirstPlay=function(){this.options_.starttime&&this.currentTime(this.options_.starttime),this.addClass("vjs-has-started")},vjs.Player.prototype.onPause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused")},vjs.Player.prototype.onTimeUpdate,vjs.Player.prototype.onProgress=function(){1==this.bufferedPercent()&&this.trigger("loadedalldata")},vjs.Player.prototype.onEnded=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()},vjs.Player.prototype.onDurationChange=function(){var e=this.techGet("duration");e&&(e<0&&(e=1/0),this.duration(e),e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"))},vjs.Player.prototype.onVolumeChange,vjs.Player.prototype.onFullscreenChange=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},vjs.Player.prototype.onError,vjs.Player.prototype.cache_,vjs.Player.prototype.getCache=function(){return this.cache_},vjs.Player.prototype.techCall=function(e,t){if(this.tech&&!this.tech.isReady_)this.tech.ready(function(){this[e](t)});else try{this.tech[e](t)}catch(n){throw vjs.log(n),n}},vjs.Player.prototype.techGet=function(e){if(this.tech&&this.tech.isReady_)try{return this.tech[e]()}catch(t){throw void 0===this.tech[e]?vjs.log("Video.js: "+e+" method not defined for "+this.techName+" playback technology.",t):"TypeError"==t.name?(vjs.log("Video.js: "+e+" unavailable on "+this.techName+" playback technology element.",t),this.tech.isReady_=!1):vjs.log(t),t}},vjs.Player.prototype.play=function(){return this.techCall("play"),this},vjs.Player.prototype.pause=function(){return this.techCall("pause"),this.trigger("apn-vpaid-pause"),this},vjs.Player.prototype.paused=function(){return this.techGet("paused")!==!1},vjs.Player.prototype.currentTime=function(e){return void 0!==e?(this.techCall("setCurrentTime",e),this):this.cache_.currentTime=this.techGet("currentTime")||0},vjs.Player.prototype.duration=function(e){return void 0!==e?(this.cache_.duration=parseFloat(e),this):(void 0===this.cache_.duration&&this.onDurationChange(),this.cache_.duration||0)},vjs.Player.prototype.remainingTime=function(){return this.duration()-this.currentTime()},vjs.Player.prototype.buffered=function(){var e=this.techGet("buffered");return e&&e.length||(e=vjs.createTimeRange(0,0)),e},vjs.Player.prototype.bufferedPercent=function(){var e,t,n=this.duration(),i=this.buffered(),o=0;if(!n)return 0;for(var r=0;rn&&(t=n),o+=t-e;return o/n},vjs.Player.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},vjs.Player.prototype.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall("setVolume",t),vjs.setLocalStorage("volume",t),this):(t=parseFloat(this.techGet("volume")),isNaN(t)?1:t)},vjs.Player.prototype.muted=function(e){if(void 0!==e){var t=vjs.IS_IOS&&this.options_.enableInlineVideoForIos;return t||this.techCall("setMuted",e),this}return this.techGet("muted")||!1},vjs.Player.prototype.supportsFullScreen=function(){return this.techGet("supportsFullScreen")||!1},vjs.Player.prototype.isFullscreen_=!1,vjs.Player.prototype.isFullscreen=function(e){return void 0!==e?(this.isFullscreen_=!!e,this):this.isFullscreen_},vjs.Player.prototype.isFullScreen=function(e){return vjs.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")'),this.isFullscreen(e)},vjs.Player.prototype.requestFullscreen=function(){var e=vjs.browser.fullscreenAPI;return this.isFullscreen(!0),e?(vjs.on(document,e.fullscreenchange,vjs.bind(this,function(t){this.isFullscreen(document[e.fullscreenElement]),this.isFullscreen()===!1&&vjs.off(document,e.fullscreenchange,arguments.callee)})),this.el_[e.requestFullscreen](),this.trigger("fullscreenchange")):this.tech.supportsFullScreen()?(this.enterFullWindow(),this.trigger("fullscreenchange")):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},vjs.Player.prototype.requestFullScreen=function(){return vjs.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")'),this.requestFullscreen()},vjs.Player.prototype.exitFullscreen=function(){var e=vjs.browser.fullscreenAPI;return this.isFullscreen(!1),e?(document[e.exitFullscreen](),this.trigger("fullscreenchange")):this.tech.supportsFullScreen()?(this.exitFullWindow(),this.trigger("fullscreenchange")):(this.exitFullWindow(),this.push("fullscreenchange")),this},vjs.Player.prototype.cancelFullScreen=function(){return vjs.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()"),this.exitFullscreen()},vjs.Player.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=document.documentElement.style.overflow,vjs.on(document,"keydown",vjs.bind(this,this.fullWindowOnEscKey)),document.documentElement.style.overflow="hidden",vjs.addClass(document.body,"vjs-full-window"),this.trigger("enterFullWindow")},vjs.Player.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},vjs.Player.prototype.exitFullWindow=function(){this.isFullWindow=!1,vjs.off(document,"keydown",this.fullWindowOnEscKey),document.documentElement.style.overflow=this.docOrigOverflow,vjs.removeClass(document.body,"vjs-full-window"),this.trigger("exitFullWindow")},vjs.Player.prototype.selectSource=function(e){for(var t=0,n=this.options_.techOrder;t=0||(console.log("active:onmouseout:initialize"),s=void 0,l=void 0)},n=function(){e(),this.clearInterval(i),i=this.setInterval(e,250)},o=function(t){e(),this.clearInterval(i)},this.on("mousedown",n),this.on("mousemove",t),this.on("mouseup",o),this.on("mouseover",d),this.on("mouseout",c),this.on("keydown",e),this.on("keyup",e),r=this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options().inactivityTimeout;e>0&&(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},vjs.Player.prototype.playbackRate=function(e){return void 0!==e?(this.techCall("setPlaybackRate",e),this):this.tech&&this.tech.featuresPlaybackRate?this.techGet("playbackRate"):1},vjs.Player.prototype.isAudio_=!1,vjs.Player.prototype.isAudio=function(e){return void 0!==e?(this.isAudio_=!!e,this):this.isAudio_},vjs.Player.prototype.networkState=function(){return this.techGet("networkState")},vjs.Player.prototype.readyState=function(){return this.techGet("readyState")},vjs.Player.prototype.textTracks=function(){return this.tech&&this.tech.textTracks()},vjs.Player.prototype.remoteTextTracks=function(){return this.tech&&this.tech.remoteTextTracks()},vjs.Player.prototype.addTextTrack=function(e,t,n){return this.tech&&this.tech.addTextTrack(e,t,n)},vjs.Player.prototype.addRemoteTextTrack=function(e){return this.tech&&this.tech.addRemoteTextTrack(e)},vjs.Player.prototype.removeRemoteTextTrack=function(e){this.tech&&this.tech.removeRemoteTextTrack(e)},vjs.ControlBar=vjs.Component.extend(),vjs.ControlBar.prototype.options_={loadEvent:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}},vjs.ControlBar.prototype.createEl=function(){return vjs.createEl("div",{className:"vjs-control-bar"})},vjs.LiveDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.LiveDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-live-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+""+this.localize("LIVE"),"aria-live":"off"}),e.appendChild(this.contentEl_),e},vjs.PlayToggle=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),this.on(e,"play",this.onPlay),this.on(e,"pause",this.onPause)}}),vjs.PlayToggle.prototype.buttonText="Play",vjs.PlayToggle.prototype.buildCSSClass=function(){return"vjs-play-control "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.PlayToggle.prototype.onClick=function(){},vjs.PlayToggle.prototype.onPlay=function(){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.el_.children[0].children[0].innerHTML=this.localize("Pause")},vjs.PlayToggle.prototype.onPause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.el_.children[0].children[0].innerHTML=this.localize("Play")},vjs.CurrentTimeDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.on(e,"timeupdate",this.updateContent)}}),vjs.CurrentTimeDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00',"aria-live":"off"}),e.appendChild(this.contentEl_),e},vjs.CurrentTimeDisplay.prototype.updateContent=function(){var e=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.contentEl_.innerHTML=''+this.localize("Current Time")+" "+vjs.formatTime(e,this.player_.duration())},vjs.DurationDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.on(e,"timeupdate",this.updateContent),this.on(e,"loadedmetadata",this.updateContent)}}),vjs.DurationDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00","aria-live":"off"}),e.appendChild(this.contentEl_),e},vjs.DurationDisplay.prototype.updateContent=function(){var e=this.player_.duration();e&&(this.contentEl_.innerHTML=''+this.localize("Duration Time")+" "+vjs.formatTime(e))},vjs.TimeDivider=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.TimeDivider.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-time-divider",innerHTML:"
/
"})},vjs.RemainingTimeDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.on(e,"timeupdate",this.updateContent)}}),vjs.RemainingTimeDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00","aria-live":"off"}),e.appendChild(this.contentEl_),e},vjs.RemainingTimeDisplay.prototype.updateContent=function(){this.player_.duration()&&(this.contentEl_.innerHTML=''+this.localize("Remaining Time")+" -"+vjs.formatTime(this.player_.remainingTime()))},vjs.FullscreenToggle=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t)}}),vjs.FullscreenToggle.prototype.buttonText="Fullscreen",vjs.FullscreenToggle.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.FullscreenToggle.prototype.onClick=function(){this.player_.isFullscreen()?(this.player_.exitFullscreen(),this.controlText_.innerHTML=this.localize("Fullscreen")):(this.player_.requestFullscreen(),this.controlText_.innerHTML=this.localize("Non-Fullscreen"))},vjs.ProgressControl=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.ProgressControl.prototype.options_={children:{seekBar:{}}},vjs.ProgressControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},vjs.SeekBar=vjs.Slider.extend({init:function(e,t){vjs.Slider.call(this,e,t),this.on(e,"timeupdate",this.updateARIAAttributes),e.ready(vjs.bind(this,this.updateARIAAttributes))}}),vjs.SeekBar.prototype.options_={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"},vjs.SeekBar.prototype.playerEvent="timeupdate",vjs.SeekBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})},vjs.SeekBar.prototype.updateARIAAttributes=function(){var e=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",vjs.round(100*this.getPercent(),2)),this.el_.setAttribute("aria-valuetext",vjs.formatTime(e,this.player_.duration()))},vjs.SeekBar.prototype.getPercent=function(){return this.player_.currentTime()/this.player_.duration()},vjs.LoadProgressBar=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.on(e,"progress",this.update)}}),vjs.LoadProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},vjs.LoadProgressBar.prototype.update=function(){var e,t,n,i,o=this.player_.buffered(),r=this.player_.duration(),a=this.player_.bufferedEnd(),s=this.el_.children,l=function(e,t){var n=e/t||0;return 100*n+"%"};for(this.el_.style.width=l(a,r),e=0;eo.length;e--)this.el_.removeChild(s[e-1])},vjs.PlayProgressBar=vjs.Component.extend({ init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.PlayProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-play-progress",innerHTML:''+this.localize("Progress")+": 0%"})},vjs.SeekHandle=vjs.SliderHandle.extend({init:function(e,t){vjs.SliderHandle.call(this,e,t),this.on(e,"timeupdate",this.updateContent)}}),vjs.SeekHandle.prototype.defaultValue="00:00",vjs.SeekHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})},vjs.SeekHandle.prototype.updateContent=function(){var e=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.innerHTML=''+vjs.formatTime(e,this.player_.duration())+""},vjs.VolumeControl=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),e.tech&&e.tech.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(e,"loadstart",function(){e.tech.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}}),vjs.VolumeControl.prototype.options_={children:{volumeBar:{}}},vjs.VolumeControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},vjs.VolumeBar=vjs.Slider.extend({init:function(e,t){vjs.Slider.call(this,e,t),this.on(e,"volumechange",this.updateARIAAttributes),e.ready(vjs.bind(this,this.updateARIAAttributes))}}),vjs.VolumeBar.prototype.updateARIAAttributes=function(){this.el_.setAttribute("aria-valuenow",vjs.round(100*this.player_.volume(),2)),this.el_.setAttribute("aria-valuetext",vjs.round(100*this.player_.volume(),2)+"%")},vjs.VolumeBar.prototype.options_={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"},vjs.VolumeBar.prototype.playerEvent="volumechange",vjs.VolumeBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})},vjs.VolumeBar.prototype.onMouseMove=function(e){if(this.player_.muted(),global_options.hasOwnProperty("overlayPlayer"))e.srcElement&&"VIDEO"!=e.srcElement.tagName&&e.srcElement.className.indexOf("vjs")>=0?"VIDEO"!=e.srcElement.tagName&&e.srcElement.className&&e.srcElement.className.indexOf("vjs")>=0&&this.player_.volume(this.calculateDistance(e)):e.currentTarget&&"VIDEO"!=e.currentTarget.tagName&&e.currentTarget.className&&e.currentTarget.className.indexOf("vjs")>=0&&this.player_.volume(this.calculateDistance(e));else{var t=document.getElementById(global_options.iframeVideoWrapperId).contentWindow.document,n=t.elementFromPoint(e.clientX,e.clientY);n&&"VIDEO"!=n.tagName&&n.className.indexOf("vjs")>=0&&this.player_.volume(this.calculateDistance(e))}},vjs.VolumeBar.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},vjs.VolumeBar.prototype.stepForward=function(){this.player_.volume(this.player_.volume()+.1)},vjs.VolumeBar.prototype.stepBack=function(){this.player_.volume(this.player_.volume()-.1)},vjs.VolumeLevel=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.VolumeLevel.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},vjs.VolumeHandle=vjs.SliderHandle.extend(),vjs.VolumeHandle.prototype.defaultValue="00:00",vjs.VolumeHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-volume-handle"})},vjs.MuteToggle=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),this.on(e,"volumechange",this.update);var n=e.getMuteSettingsForIOS10();e.tech&&e.tech.featuresVolumeControl===!1&&!n&&this.addClass("vjs-hidden"),this.on(e,"loadstart",function(){e.tech.featuresVolumeControl!==!1||n?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")})}}),vjs.MuteToggle.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'
'+this.localize("Mute")+"
"})},vjs.MuteToggle.prototype.onClick=function(){if(this.player_.muted()){var e=this.player_.volume();0===e&&(e=.5,this.player_.volume(e))}this.player_.muted(!this.player_.muted())},vjs.MuteToggle.prototype.update=function(){var e=this.player_.volume(),t=3;if(0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2),this.el_){this.player_.muted()?this.el_.children[0].children[0].innerHTML!=this.localize("Unmute")&&(this.el_.children[0].children[0].innerHTML=this.localize("Unmute")):this.el_.children[0].children[0].innerHTML!=this.localize("Mute")&&(this.el_.children[0].children[0].innerHTML=this.localize("Mute"));for(var n=0;n<4;n++)vjs.removeClass(this.el_,"vjs-vol-"+n);vjs.addClass(this.el_,"vjs-vol-"+t)}},vjs.VolumeMenuButton=vjs.MenuButton.extend({init:function(e,t){vjs.MenuButton.call(this,e,t),this.on(e,"volumechange",this.volumeUpdate),e.tech&&e.tech.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(e,"loadstart",function(){e.tech.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),this.addClass("vjs-menu-button")}}),vjs.VolumeMenuButton.prototype.createMenu=function(){var e=new vjs.Menu(this.player_,{contentElType:"div"}),t=new vjs.VolumeBar(this.player_,this.options_.volumeBar);return t.on("focus",function(){e.lockShowing()}),t.on("blur",function(){e.unlockShowing()}),e.addChild(t),e},vjs.VolumeMenuButton.prototype.onClick=function(){vjs.MuteToggle.prototype.onClick.call(this),vjs.MenuButton.prototype.onClick.call(this)},vjs.VolumeMenuButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'
'+this.localize("Mute")+"
"})},vjs.VolumeMenuButton.prototype.volumeUpdate=vjs.MuteToggle.prototype.update,vjs.PlaybackRateMenuButton=vjs.MenuButton.extend({init:function(e,t){vjs.MenuButton.call(this,e,t),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",this.updateVisibility),this.on(e,"ratechange",this.updateLabel)}}),vjs.PlaybackRateMenuButton.prototype.buttonText="Playback Rate",vjs.PlaybackRateMenuButton.prototype.className="vjs-playback-rate",vjs.PlaybackRateMenuButton.prototype.createEl=function(){var e=vjs.MenuButton.prototype.createEl.call(this);return this.labelEl_=vjs.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),e.appendChild(this.labelEl_),e},vjs.PlaybackRateMenuButton.prototype.createMenu=function(){var e=new vjs.Menu(this.player()),t=this.player().options().playbackRates;if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new vjs.PlaybackRateMenuItem(this.player(),{rate:t[n]+"x"}));return e},vjs.PlaybackRateMenuButton.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},vjs.PlaybackRateMenuButton.prototype.onClick=function(){for(var e=this.player().playbackRate(),t=this.player().options().playbackRates,n=t[0],i=0;ie){n=t[i];break}this.player().playbackRate(n)},vjs.PlaybackRateMenuButton.prototype.playbackRateSupported=function(){return this.player().tech&&this.player().tech.featuresPlaybackRate&&this.player().options().playbackRates&&this.player().options().playbackRates.length>0},vjs.PlaybackRateMenuButton.prototype.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},vjs.PlaybackRateMenuButton.prototype.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},vjs.PlaybackRateMenuItem=vjs.MenuItem.extend({contentElType:"button",init:function(e,t){var n=this.label=t.rate,i=this.rate=parseFloat(n,10);t.label=n,t.selected=1===i,vjs.MenuItem.call(this,e,t),this.on(e,"ratechange",this.update)}}),vjs.PlaybackRateMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this),this.player().playbackRate(this.rate)},vjs.PlaybackRateMenuItem.prototype.update=function(){this.selected(this.player().playbackRate()==this.rate)},vjs.PosterImage=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),this.update(),e.on("posterchange",vjs.bind(this,this.update))}}),vjs.PosterImage.prototype.dispose=function(){this.player().off("posterchange",this.update),vjs.Button.prototype.dispose.call(this)},vjs.PosterImage.prototype.createEl=function(){var e=vjs.createEl("div",{className:"vjs-poster",tabIndex:-1});return vjs.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=vjs.createEl("img"),e.appendChild(this.fallbackImg_)),e},vjs.PosterImage.prototype.update=function(){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},vjs.PosterImage.prototype.setSrc=function(e){var t;this.fallbackImg_?this.fallbackImg_.src=e:(t="",e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t)},vjs.PosterImage.prototype.onClick=function(){this.player_.play()},vjs.LoadingSpinner=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.LoadingSpinner.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner"})},vjs.BigPlayButton=vjs.Button.extend(),vjs.BigPlayButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-big-play-button",innerHTML:'',"aria-label":"play video"})},vjs.BigPlayButton.prototype.onClick=function(){},vjs.ErrorDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.update(),this.on(e,"error",this.update)}}),vjs.ErrorDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{});return this.contentEl_=vjs.createEl("div"),e.appendChild(this.contentEl_),e},vjs.ErrorDisplay.prototype.update=function(){this.player().error()&&(this.contentEl_.innerHTML=this.localize(this.player().error().message))},function(){var e;vjs.MediaTechController=vjs.Component.extend({init:function(e,t,n){t=t||{},t.reportTouchActivity=!1,vjs.Component.call(this,e,t,n),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),this.initControlsListeners(),this.initTextTrackListeners()}}),vjs.MediaTechController.prototype.initControlsListeners=function(){var e,t;e=this.player(),t=function(){e.controls()&&!e.usingNativeControls()&&this.addControlsListeners()},this.ready(t),this.on(e,"controlsenabled",t),this.on(e,"controlsdisabled",this.removeControlsListeners),this.ready(function(){this.networkState&&this.networkState()>0&&this.player().trigger("loadstart")})},vjs.MediaTechController.prototype.addControlsListeners=function(){var e;this.on("mousedown",this.onClick),this.on("touchstart",function(t){e=this.player_.userActive()}),this.on("touchmove",function(t){e&&this.player().reportUserActivity()}),this.on("touchend",function(e){e.preventDefault()}),this.emitTapEvents(),this.on("tap",this.onTap)},vjs.MediaTechController.prototype.removeControlsListeners=function(){this.off("tap"),this.off("touchstart"),this.off("touchmove"),this.off("touchleave"),this.off("touchcancel"),this.off("touchend"),this.off("click"),this.off("mousedown")},vjs.MediaTechController.prototype.onClick=function(e){0===e.button&&this.player().controls()&&(this.player().paused()?this.player().play():this.player().pause())},vjs.MediaTechController.prototype.onTap=function(){this.player().userActive(!this.player().userActive())},vjs.MediaTechController.prototype.manualProgressOn=function(){this.manualProgress=!0,this.trackProgress()},vjs.MediaTechController.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress()},vjs.MediaTechController.prototype.trackProgress=function(){this.progressInterval=this.setInterval(function(){var e=this.player().bufferedPercent();this.bufferedPercent_!=e&&this.player().trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()},500)},vjs.MediaTechController.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},vjs.MediaTechController.prototype.manualTimeUpdatesOn=function(){var e=this.player_;this.manualTimeUpdates=!0,this.on(e,"play",this.trackCurrentTime),this.on(e,"pause",this.stopTrackingCurrentTime),this.one("timeupdate",function(){this.featuresTimeupdateEvents=!0,this.manualTimeUpdatesOff()})},vjs.MediaTechController.prototype.manualTimeUpdatesOff=function(){var e=this.player_;this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(e,"play",this.trackCurrentTime),this.off(e,"pause",this.stopTrackingCurrentTime)},vjs.MediaTechController.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.player().trigger("timeupdate")},250)},vjs.MediaTechController.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.player().trigger("timeupdate")},vjs.MediaTechController.prototype.dispose=function(){this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),vjs.Component.prototype.dispose.call(this)},vjs.MediaTechController.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.player().trigger("timeupdate")},vjs.MediaTechController.prototype.initTextTrackListeners=function(){var e,t=this.player_,n=function(){var e=t.getChild("textTrackDisplay");e&&e.updateDisplay()};e=this.textTracks(),e&&(e.addEventListener("removetrack",n),e.addEventListener("addtrack",n),this.on("dispose",vjs.bind(this,function(){e.removeEventListener("removetrack",n),e.removeEventListener("addtrack",n)})))},vjs.MediaTechController.prototype.emulateTextTracks=function(){var e,t,n=this.player_;!window.WebVTT,t=this.textTracks(),t&&(e=function(){var e,t,i;for(i=n.getChild("textTrackDisplay"),i.updateDisplay(),e=0;e=0;n--){var l=s[n],d={};"undefined"!=typeof r.options_[l]&&(d[l]=r.options_[l]),vjs.setElementAttributes(a,d)}return r.options_.enableNativeInline&&(a.setAttribute("playsinline",""),a.setAttribute("webkit-playsinline","")),a},vjs.Html5.prototype.hideCaptions=function(){for(var e,t=this.el_.querySelectorAll("track"),n=t.length,i={captions:1,subtitles:1};n--;)e=t[n].track,e&&e.kind in i&&!t[n]["default"]&&(e.mode="disabled")},vjs.Html5.prototype.setupTriggers=function(){for(var e=vjs.Html5.Events.length-1;e>=0;e--)this.on(vjs.Html5.Events[e],this.eventHandler)},vjs.Html5.prototype.eventHandler=function(e){"error"==e.type&&this.error()?this.player().error(this.error().code):(e.bubbles=!1,this.player().trigger(e))},vjs.Html5.prototype.useNativeControls=function(){var e,t,n,i,o;e=this,t=this.player(),e.setControls(t.controls()),n=function(){e.setControls(!0)},i=function(){e.setControls(!1)},t.on("controlsenabled",n),t.on("controlsdisabled",i),o=function(){t.off("controlsenabled",n),t.off("controlsdisabled",i)},e.on("dispose",o),t.on("usingcustomcontrols",o),t.usingNativeControls(!0)},vjs.Html5.prototype.play=function(){this.el_.play()},vjs.Html5.prototype.pause=function(){this.el_.pause()},vjs.Html5.prototype.paused=function(){return this.el_.paused},vjs.Html5.prototype.currentTime=function(){return this.el_.currentTime||this.el_.currentTimeForOutstream||0},vjs.Html5.prototype.setCurrentTime=function(e){try{this.el_.currentTimeForOutstream=e,this.el_.currentTime=e}catch(t){vjs.log(t,"Video is not ready. (Video.js)")}},vjs.Html5.prototype.duration=function(){return this.el_.duration||0},vjs.Html5.prototype.buffered=function(){return this.el_.buffered},vjs.Html5.prototype.volume=function(){return this.el_.volume},vjs.Html5.prototype.setVolume=function(e){this.el_.volume=e},vjs.Html5.prototype.muted=function(){return this.el_.muted},vjs.Html5.prototype.setMuted=function(e){this.el_.muted=e},vjs.Html5.prototype.width=function(){return this.el_.offsetWidth},vjs.Html5.prototype.height=function(){return this.el_.offsetHeight},vjs.Html5.prototype.supportsFullScreen=function(){return!("function"!=typeof this.el_.webkitEnterFullScreen||!/Android/.test(vjs.USER_AGENT)&&/Chrome|Mac OS X 10.5/.test(vjs.USER_AGENT))},vjs.Html5.prototype.enterFullScreen=function(){var e=this.el_;"webkitDisplayingFullscreen"in e&&this.one("webkitbeginfullscreen",function(){this.player_.isFullscreen(!0),this.one("webkitendfullscreen",function(){this.player_.isFullscreen(!1),this.player_.trigger("fullscreenchange")}),this.player_.trigger("fullscreenchange")}),e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},vjs.Html5.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},vjs.Html5.prototype.returnOriginalIfBlobURI_=function(e,t){var n=/^blob\:/i;return t&&e&&n.test(e)?t:e},vjs.Html5.prototype.src=function(e){var t=this.el_.src;return void 0===e?this.returnOriginalIfBlobURI_(t,this.source_):void this.setSrc(e)},vjs.Html5.prototype.setSrc=function(e){this.el_.src=e},vjs.Html5.prototype.load=function(){this.el_.load()},vjs.Html5.prototype.currentSrc=function(){var e=this.el_.currentSrc;return this.currentSource_?this.returnOriginalIfBlobURI_(e,this.currentSource_.src):e},vjs.Html5.prototype.poster=function(){return this.el_.poster},vjs.Html5.prototype.setPoster=function(e){this.el_.poster=e},vjs.Html5.prototype.preload=function(){return this.el_.preload},vjs.Html5.prototype.setPreload=function(e){this.el_.preload=e},vjs.Html5.prototype.autoplay=function(){return this.el_.autoplay},vjs.Html5.prototype.setAutoplay=function(e){this.el_.autoplay=e},vjs.Html5.prototype.controls=function(){return this.el_.controls},vjs.Html5.prototype.setControls=function(e){this.el_.controls=!!e},vjs.Html5.prototype.loop=function(){return this.el_.loop},vjs.Html5.prototype.setLoop=function(e){this.el_.loop=e},vjs.Html5.prototype.error=function(){return this.el_.error},vjs.Html5.prototype.seeking=function(){return this.el_.seeking},vjs.Html5.prototype.seekable=function(){return this.el_.seekable},vjs.Html5.prototype.ended=function(){return this.el_.ended},vjs.Html5.prototype.defaultMuted=function(){return this.el_.defaultMuted},vjs.Html5.prototype.playbackRate=function(){return this.el_.playbackRate},vjs.Html5.prototype.setPlaybackRate=function(e){this.el_.playbackRate=e},vjs.Html5.prototype.networkState=function(){return this.el_.networkState},vjs.Html5.prototype.readyState=function(){return this.el_.readyState},vjs.Html5.prototype.textTracks=function(){return this.featuresNativeTextTracks?this.el_.textTracks:vjs.MediaTechController.prototype.textTracks.call(this)},vjs.Html5.prototype.addTextTrack=function(e,t,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,n):vjs.MediaTechController.prototype.addTextTrack.call(this,e,t,n)},vjs.Html5.prototype.addRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return vjs.MediaTechController.prototype.addRemoteTextTrack.call(this,e);var t=document.createElement("track");return e=e||{},e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e["default"]&&(t["default"]=e["default"]),e.id&&(t.id=e.id),e.src&&(t.src=e.src),this.el().appendChild(t),"metadata"===t.track.kind?t.track.mode="hidden":t.track.mode="disabled",t.onload=function(){var e=t.track;t.readyState>=2&&("metadata"===e.kind&&"hidden"!==e.mode?e.mode="hidden":"metadata"!==e.kind&&"disabled"!==e.mode&&(e.mode="disabled"),t.onload=null)},this.remoteTextTracks().addTrack_(t.track),t},vjs.Html5.prototype.removeRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return vjs.MediaTechController.prototype.removeRemoteTextTrack.call(this,e);var t,n;for(this.remoteTextTracks().removeTrack_(e),t=this.el().querySelectorAll("track"),n=0;n0&&(e="number"!=typeof vjs.TEST_VID.textTracks[0].mode),e&&vjs.IS_FIREFOX&&(e=!1),e},vjs.Html5.prototype.featuresVolumeControl=vjs.Html5.canControlVolume(),vjs.Html5.prototype.featuresPlaybackRate=vjs.Html5.canControlPlaybackRate(),vjs.Html5.prototype.movingMediaElementInDOM=!vjs.IS_IOS,vjs.Html5.prototype.featuresFullscreenResize=!0,vjs.Html5.prototype.featuresProgressEvents=!0,vjs.Html5.prototype.featuresNativeTextTracks=vjs.Html5.supportsNativeTextTracks(),function(){var e,t=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,n=/^video\/mp4/i;vjs.Html5.patchCanPlayType=function(){vjs.ANDROID_VERSION>=4&&(e||(e=vjs.TEST_VID.constructor.prototype.canPlayType),vjs.TEST_VID.constructor.prototype.canPlayType=function(n){return n&&t.test(n)?"maybe":e.call(this,n)}),vjs.IS_OLD_ANDROID&&(e||(e=vjs.TEST_VID.constructor.prototype.canPlayType),vjs.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&n.test(t)?"maybe":e.call(this,t)})},vjs.Html5.unpatchCanPlayType=function(){var t=vjs.TEST_VID.constructor.prototype.canPlayType;return vjs.TEST_VID.constructor.prototype.canPlayType=e,e=null,t},vjs.Html5.patchCanPlayType()}(),vjs.Html5.Events="loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange".split(","),vjs.Html5.disposeMediaElement=function(e){if(e){for(e.player=null,e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&!function(){try{e.load()}catch(t){}}()}},vjs.MediaLoader=vjs.Component.extend({init:function(e,t,n){if(vjs.Component.call(this,e,t,n),e.options_.sources&&0!==e.options_.sources.length)e.src(e.options_.sources);else for(var i=0,o=e.options_.techOrder;i=o?i.push(r):r.startTime===r.endTime&&r.startTime<=o&&r.startTime+.5>=o&&i.push(r);if(p=!1,i.length!==this.activeCues_.length)p=!0;else for(e=0;e>>0;if(0===o)return-1;var r=+t||0;if(Math.abs(r)===1/0&&(r=0),r>=o)return-1;for(n=Math.max(r>=0?r:o-Math.abs(r),0);ne?this.show():this.hide()},vjs.SubtitlesButton=vjs.TextTrackButton.extend({init:function(e,t,n){vjs.TextTrackButton.call(this,e,t,n),this.el_.setAttribute("aria-label","Subtitles Menu")}}),vjs.SubtitlesButton.prototype.kind_="subtitles",vjs.SubtitlesButton.prototype.buttonText="Subtitles",vjs.SubtitlesButton.prototype.className="vjs-subtitles-button",vjs.ChaptersButton=vjs.TextTrackButton.extend({init:function(e,t,n){vjs.TextTrackButton.call(this,e,t,n),this.el_.setAttribute("aria-label","Chapters Menu")}}),vjs.ChaptersButton.prototype.kind_="chapters",vjs.ChaptersButton.prototype.buttonText="Chapters",vjs.ChaptersButton.prototype.className="vjs-chapters-button",vjs.ChaptersButton.prototype.createItems=function(){var e,t,n=[];if(t=this.player_.textTracks(),!t)return n;for(var i=0;i0&&this.show(),a},vjs.ChaptersTrackMenuItem=vjs.MenuItem.extend({init:function(e,t){var n=this.track=t.track,i=this.cue=t.cue,o=e.currentTime();t.label=i.text,t.selected=i.startTime<=o&&o
'}vjs.TextTrackSettings=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.hide(),vjs.on(this.el().querySelector(".vjs-done-button"),"click",vjs.bind(this,function(){this.saveSettings(),this.hide()})),vjs.on(this.el().querySelector(".vjs-default-button"),"click",vjs.bind(this,function(){this.el().querySelector(".vjs-fg-color > select").selectedIndex=0,this.el().querySelector(".vjs-bg-color > select").selectedIndex=0,this.el().querySelector(".window-color > select").selectedIndex=0,this.el().querySelector(".vjs-text-opacity > select").selectedIndex=0,this.el().querySelector(".vjs-bg-opacity > select").selectedIndex=0,this.el().querySelector(".vjs-window-opacity > select").selectedIndex=0,this.el().querySelector(".vjs-edge-style select").selectedIndex=0,this.el().querySelector(".vjs-font-family select").selectedIndex=0,this.el().querySelector(".vjs-font-percent select").selectedIndex=2,this.updateDisplay()})),vjs.on(this.el().querySelector(".vjs-fg-color > select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".vjs-bg-color > select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".window-color > select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".vjs-text-opacity > select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".vjs-bg-opacity > select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".vjs-window-opacity > select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".vjs-font-percent select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".vjs-edge-style select"),"change",vjs.bind(this,this.updateDisplay)),vjs.on(this.el().querySelector(".vjs-font-family select"),"change",vjs.bind(this,this.updateDisplay)),e.options().persistTextTrackSettings&&this.restoreSettings()}}),vjs.TextTrackSettings.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:n()})},vjs.TextTrackSettings.prototype.getValues=function(){var t,n,i,o,r,a,s,l,d,c,u,p;t=this.el(),r=e(t.querySelector(".vjs-edge-style select")),a=e(t.querySelector(".vjs-font-family select")),s=e(t.querySelector(".vjs-fg-color > select")),i=e(t.querySelector(".vjs-text-opacity > select")),l=e(t.querySelector(".vjs-bg-color > select")),n=e(t.querySelector(".vjs-bg-opacity > select")),d=e(t.querySelector(".window-color > select")),o=e(t.querySelector(".vjs-window-opacity > select")),p=window.parseFloat(e(t.querySelector(".vjs-font-percent > select"))),c={backgroundOpacity:n,textOpacity:i,windowOpacity:o,edgeStyle:r,fontFamily:a,color:s,backgroundColor:l,windowColor:d,fontPercent:p};for(u in c)(""===c[u]||"none"===c[u]||"fontPercent"===u&&1===c[u])&&delete c[u];return c},vjs.TextTrackSettings.prototype.setValues=function(e){var n,i=this.el();t(i.querySelector(".vjs-edge-style select"),e.edgeStyle),t(i.querySelector(".vjs-font-family select"),e.fontFamily),t(i.querySelector(".vjs-fg-color > select"),e.color),t(i.querySelector(".vjs-text-opacity > select"),e.textOpacity),t(i.querySelector(".vjs-bg-color > select"),e.backgroundColor),t(i.querySelector(".vjs-bg-opacity > select"),e.backgroundOpacity),t(i.querySelector(".window-color > select"),e.windowColor),t(i.querySelector(".vjs-window-opacity > select"),e.windowOpacity),n=e.fontPercent,n&&(n=n.toFixed(2)),t(i.querySelector(".vjs-font-percent > select"),n)},vjs.TextTrackSettings.prototype.restoreSettings=function(){var e;try{e=JSON.parse(window.localStorage.getItem("vjs-text-track-settings"))}catch(t){}e&&this.setValues(e)},vjs.TextTrackSettings.prototype.saveSettings=function(){var e;if(this.player_.options().persistTextTrackSettings){e=this.getValues();try{vjs.isEmpty(e)?window.localStorage.removeItem("vjs-text-track-settings"):window.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e))}catch(t){}}},vjs.TextTrackSettings.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}}(),vjs.JSON,"undefined"!=typeof window.JSON&&"function"==typeof window.JSON.parse)vjs.JSON=window.JSON;else{vjs.JSON={};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;vjs.JSON.parse=function(text,reviver){function walk(e,t){var n,i,o=e[t];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(i=walk(o,n),void 0!==i?o[n]=i:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data")}}vjs.autoSetup=function(){var e,t,n,i,o,r=document.getElementsByTagName("video"),a=document.getElementsByTagName("audio"),s=[];if(r&&r.length>0)for(i=0,o=r.length;i0)for(i=0,o=a.length;i0)for(i=0,o=s.length;i-1||t>-1},m=function(){var e=/iPad|iPhone|iPod/.test(navigator.appVersion);return e},f=function(e){return!!e.isFullscreen||!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)&&(!window.screenTop&&!window.screenY)},v=function(e){switch(e.nativeControlsForTouch=!1,e.controls=!0,e.preload="auto",e.extensions||(e.extensions=""),s.setSizeForInitialRender(e),m()&&e.sideStream&&e.sideStream.enabled===!1&&(e.nonViewableBehavior="pause"),e.initialPlayback){case"auto":e.autoplay=!1;break;case"click":e.autoplay=!1;break;case"mouseover":e.autoplay=!1}e.hasOwnProperty("disableTopBar")||(e.disableTopBar=!1),e.communicator=n.externalNameOfVideoPlayer,(l.isAndroid()||p())&&(e.controlBarPosition="below"),"flash"===n.decidePlayer(e.requiredPlayer)&&(e.controlBarPosition="over");var t=e.endCard;if(t&&t.enabled&&!t.buttons&&(t.buttons=[],t.showDefaultButtons=!0,t.buttons.indexOf("replay")<0&&e.disableCollapse&&e.disableCollapse.replay&&t.buttons.push({type:"replay"}),t.buttons.indexOf("learnMore")<0&&e.learnMore&&e.learnMore.enabled)){var i={type:"learnMore"};e.learnMore.text&&(i.text=e.learnMore.text),t.buttons.push(i)}return e};c=v(c),"off"===c.initialAudio&&(n.isMuted=!0),c.flash=c.flash?c.flash:{swf:"http://video.devnxs.net/players/flash/AppnexusFlashPlayer.swf"},n.options=c;var g=function(e,t){if(c.playOnMouseover===!0){var i=function(){n.isDoneInitialPlay===!0&&!n.explicitPaused&&n.isViewable&&n.isPlayingVideo===!1&&n.play()},o=function(){n.pause()};e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",o)}if(c.audioOnMouseover!==!1){var r,a=0;"number"==typeof c.audioOnMouseover&&(a=c.audioOnMouseover);var s=function(){!n.isFullscreen&&n.isDoneInitialPlay&&(clearTimeout(r),n.mute(),e.removeEventListener("mouseleave",s))},l=function(){n.isFullscreen||!n.isDoneInitialPlay||n.mutedByViewability||(r=setTimeout(function(){n.unmute(),u("unmute by mouseover")},a)),e.addEventListener("mouseleave",s,!1)};p()||(d=setInterval(function(){n&&n.isFullscreen&&s&&e&&e.removeEventListener("mouseleave",s)},500),e.addEventListener("mouseenter",l,!1))}if(c.autoInitialSize&&!h()&&window.addEventListener("resize",function(){if(f(n)!==!0){var e=!(!n.options.sideStreamObject||"function"!=typeof n.options.sideStreamObject.shouldNotResizeWhenSideStreamActivated)&&n.options.sideStreamObject.shouldNotResizeWhenSideStreamActivated();e||c.targetElement&&c.targetElement.style&&c.targetElement.style.height&&0===Number(c.targetElement.style.height.replace("px",""))||setTimeout(function(){if(c.disableCollapse.enabled||!n.isSkipped&&!n.isCompleted){c.width=c.targetElement.offsetWidth;var e=/android/i.test(navigator.userAgent.toLowerCase());e?c.targetElement.style.webkitTransition="height 0s ease":c.targetElement.style.transition="height 0s ease",n.resizeVideo(-1),c.targetElement.style.height=c.height+"px";var t=document.getElementById(n.videoObjectId);t&&void 0!==typeof t&&(t.style.width=c.width,t.style.height=c.height),setTimeout(function(){var t=function(e){return e<0?0:e/1e3},n=t(c.expandTime);n=n<=0?.001:n,e?c.targetElement.style.webkitTransition="height "+n+"s ease":c.targetElement.style.transition="height "+n+"s ease"},500)}},0)}}),"flash"===n.decidePlayer(c.requiredPlayer)&&(e.addEventListener("mouseenter",function(){n.mouseIn()}),e.addEventListener("mouseleave",function(){n.mouseOut()})),e.style.cursor="pointer",t&&void 0!==t){if(m()){var v=!1;t.ontouchmove=function(){v=!0},t.ontouchend=function(e){return v?void(v=!1):void g(e)}}else t.onclick=function(e){g(e)};var g=function(){"html5"!==n.decidePlayer(c.requiredPlayer)||c.vpaid||(c.learnMore.enabled===!0?c.learnMore.clickToPause===!0&&(n.isPlayingVideo?n.explicitPause():n.explicitPlay()):n.click())}}var y=n.options&&n.options.playerSkin&&n.options.playerSkin.customPlayerSkin;m()&&n.overlayPlayer&&n.options&&n.options.enableInlineVideoForIos===!1&&y&&(n.adVideoPlayer.controlBar.fullscreenToggle.dispose(),n.adVideoPlayer.one("playing",function(){n.adVideoPlayer.controlBar.el().style.display="none",setTimeout(function(){n.adVideoPlayer.controlBar.el().style.display="block"},7e3)}))};switch(n.decidePlayer(c.requiredPlayer)){case"html5":p()?new o(n,g).start():new i(n,g).start();break;case"flash":r(n,g)}a.sharedInstance().run(t)};e.exports=p},function(e,t,n){var i=n(8),o=n(9),r=function(e){o.info("Video Player: "+e)};e.exports=function(e,t){var o=this;this.options=e.options,this.an_video_ad_player_id="",this.an_video_ad_player_html5_api_id="",this.targetElement="",this.videojsOrigin=e.videoPlayerObj,this.dispatchEventToAdunit=e.dispatchEventToAdunit.bind(e),this.callbackForAdUnit=e.callbackForAdUnit,this.topChromeHeight=24,this.pendingFullscreenExit=!1,this.bigbuttonUnmuteTimeout=250,this.CONST_MESSAGE_GENERAL_ERROR="General error reported from HTML5 video player",this.adIndicatorTextContent=this.options.adText,this.readyForSkip=!1,this.floatingSkipButton=null,this.floatingAdSkipText=null,this.isIos=i.isIos,this.isAndroid=i.isAndroid,this.isMobile=i.isMobile,this.refreshVideoLookAndFeel=i.refreshVideoLookAndFeel,this.initializeIframeAndVideo=n(10)(o,e).init,this.UIController=n(16)(o,e,t).init,this.displayVolumeControls=n(42)(o).displayVolumeControls,this.start=function(){r("WE ARE USING HTML5 PLAYER");var t=(new Date).getTime()+Math.floor(1e4*Math.random());o.options.techOrder=["html5"],o.options.iframeVideoWrapperId="iframeVideoWrapper_"+t;var n="an_video_ad_player_"+t,i="an_video_ad_player_"+t+"_html5_api";o.an_video_ad_player_id=n,o.an_video_ad_player_html5_api_id=i,e.divIdForVideo=n,e.videoId=i,o.targetElement=o.options.targetElement,o.initializeIframeAndVideo(o.UIController)}}},function(e,t,n){function i(e,t){if(!(e&&t&&e.getBoundingClientRect&&t.getBoundingClientRect))return s("Utils.elementsOverlap expects two html elements"),!1;var n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return!(n.righti.right||n.bottomi.bottom)}var o="PlayerManager_Utils",r=n(9),a=function(e){r.verbose(e,o)},s=function(e){r.info(e,o)},l=function(){var e=/iphone/i.test(navigator.userAgent.toLowerCase());return e},d=function(){var e=l()||/ipad/i.test(navigator.userAgent.toLowerCase());return e},c=function(){return/android/i.test(navigator.userAgent.toLowerCase())},u=function(){return navigator.appVersion.indexOf("Mobile")>-1||navigator.appVersion.indexOf("Android")>-1},p=function(){var e=navigator.userAgent.match(/OS (\d+)_/i);if(e&&e[1])return e[1]},h=function(e,t){!t.isSkipped&&t.isExpanded&&(e.autoInitialSize&&!e.shouldResizeVideoToFillMobileWebview&&(e.width=e.targetElement.offsetWidth),t.resizeVideo(-1,u()),e.targetElement.style.height=e.height+"px")},m=function(e){d()&&e.options.enableInlineVideoForIos&&setTimeout(function(){var t=document.getElementById(e.options.iframeVideoWrapperId);t.style.width="",t.style.height=""},0)},f=function(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),n.eventName=t,e.dispatchEvent(n)},v=function(){this.queue=[],this.id="",this.isSuppress=!1,this.isPaused=!1,this.isCompleted=!1;var e=100,t=!1;this.push=function(e){return this.isSuppress===!1&&"function"==typeof e?void e():t?void(t=!1):void(this.isPaused===!1&&this.queue.push(e))},this.start=function(){a("delay event starts");var t=this,n=function(){if(t.isSuppress===!1){var i=t.queue.shift();i&&"function"==typeof i&&i()}setTimeout(function(){t.isCompleted===!1&&n()},e)};n()},this.ImmediateStop=function(){this.isCompleted=!0},this.lazyTerminate=function(){var e=this,t=function(){e.ImmediateStop()};this.queue.push(t)},this.suppress=function(e){this.isSuppress=e},this.clearQueue=function(){this.queue=[]},this.ignoreNextQueue=function(){t=!0}},g=function(e){return"undefined"==typeof e||""===e||e===!1||null===e},y=function(e){if(null===e||void 0===e)return!0;if(0===e.length)return!0;if(""===e)return!0;if("object"!=typeof e)return!1;if(e.length>0)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},A=function(){var e={};return{pushAndCheck:function(t,n){var i=t+"_"+n;return!e[i]&&(e[i]=!0,!0)}}},b=function(e){var t=!1;try{t=!isNaN(parseFloat(e))&&isFinite(e)}catch(n){a(n)}return t},k=function(e,t){try{var n=e.indexOf("%");if(n>0){if(t&&t>0){var i=Number(e.substring(0,n));return i>=0&&i<=100?Math.round(t*(i/100)):-1}return-1}n=e.indexOf(".");var o=n>0?Number(e.substring(n+1).substr(0,3)):0;n>0&&(e=e.substring(0,n));var r=e.split(":");if(3===r.length){for(var s=0;s0&&(i+=n+">"),i+=t,c(e)&&console.log(i)}catch(o){c(e)&&console.log(o)}}var p=0,h=1,m=2,f=3,v=4,g=5,y=6,A=6,b="AppNexus_Page_Debug_Log_Level",k=y,T=p,w=T,E=T,S=T,I=T;e.exports={traceAtLevel:function(){try{if(arguments.length>0){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);o.call(this,e,t)}}catch(n){}},always:function(){try{o.call(this,h,Array.prototype.slice.call(arguments))}catch(e){}},error:function(){try{o.call(this,m,Array.prototype.slice.call(arguments))}catch(e){}},log:function(){try{o.call(this,g,Array.prototype.slice.call(arguments))}catch(e){}},warn:function(){try{o.call(this,f,Array.prototype.slice.call(arguments))}catch(e){}},info:function(){try{o.call(this,v,Array.prototype.slice.call(arguments))}catch(e){}},debug:function(){try{o.call(this,y,Array.prototype.slice.call(arguments))}catch(e){}},verbose:function(){try{o.call(this,A,Array.prototype.slice.call(arguments))}catch(e){}},handleLogDebugLegacySupport:function(e,t){try{u(g,e,t)}catch(n){}},setDebugLevel:function(e){try{d(e)}catch(t){}},isTraceLevelActive:function(e){try{return c(e)}catch(t){return!1}},TRACE_LEVEL_ALWAYS:h,TRACE_LEVEL_ERROR:m,TRACE_LEVEL_WARN:f,TRACE_LEVEL_INFO:v,TRACE_LEVEL_LOG:g,TRACE_LEVEL_DEBUG:y,TRACE_LEVEL_VERBOSE:A},l()},function(e,t,n){var i="[PlayerManager_InitializeElements]",o=n(9),r=n(11),a=function(e){o.verbose(i,e)},s=function(e){o.debug(i,e)},l=function(e){o.log(i,e)};e.exports=function(e,t){return{init:function(n){l("init");var i,o=!1;if(t.autoplayHandler.isRequiredFakeAndroidAutoStart(e.options.initialPlayback,e.options.initialAudio,e.options.automatedTestingOnlyAndroidSkipTouchStart,!0)){a("Setting correct iframe for androids 'fake' autostart");for(var d=e.options.targetElement.getElementsByTagName("iframe"),c=0;c-1;v&&t.overlayPlayer===!1?(i.onload=function(){m(),f=!0},setTimeout(function(){f===!1&&(a("destroying due to an error in firefox"),t.destroyWithoutSkip(!0,e.CONST_MESSAGE_GENERAL_ERROR,null,900))},e.options.vpaidTimeout)):m()}}}},function(e,t,n){var i=(n(12),n(14)),o=n(15),r=o.OmidSessionClient.AdSession,a=o.OmidSessionClient.Partner,s=o.OmidSessionClient.Context,l=o.OmidSessionClient.VerificationScriptResource,d=o.OmidSessionClient.AdEvents,c=o.OmidSessionClient.VideoEvents,u="[PlayerManager_Verifications]",p=n(9);e.exports=function(e,t){var n,o,h,m=e,f=t,v=[],g=new i(e,t.player),y=function(e){p.debug(u,"OMID sessionObserver");try{"sessionStart"===e.type?(p.debug(u,"OMID sessionStart"),""!==OMIDVideoEvents().position&&h.loaded({isSkippable:OMIDVideoEvents().isSkippable,isAutoPlay:OMIDVideoEvents().isAutoPlay,position:OMIDVideoEvents().position}),o.impressionOccurred()):"sessionError"===event.type?p.debug(u,"OMID sessionError"):"sessionFinish"===event.type&&p.debug(u,"OMID sessionFinish")}catch(t){p.debug(u,"Failed OMID sessionStart "+t)}};return{init:function(){p.debug(u,"init verifications");for(var e=0;e0)try{if(""!==getOMIDPartner().name&&""!==getOMIDPartner().version){var E=new a(getOMIDPartner().name,getOMIDPartner().version),S=new s(E,v);p.debug(u,"BuildTest::"+f.videoElement),S.setVideoElement(f.videoElement),n=new r(S),o=new d(n),h=new c(n),n.registerSessionObserver(y),p.debug(u,"OMID _adSession"),p.debug(u,n),p.debug(u,h)}}catch(w){p.debug(u,"Failed OMID registerSessionObserver "+w)}},start:function(){p.debug(u,"start verifications")},dispatchEvent:function(e,t){p.debug(u,"try to dispatch OMID event: "+e+", data: ",t);try{"start"===e?h.start(t.duration,t.videoPlayerVolume):"firstQuartile"===e?h.firstQuartile():"thirdQuartile"===e?h.thirdQuartile():"midpoint"===e?h.midpoint():"complete"===e?h.complete():"volumeChange"===e?h.volumeChange(t.videoPlayerVolume):"adUserInteraction"===e?h.adUserInteraction(t.interactionType):"resume"===e?h.resume():"pause"===e?h.pause():"playerStateChange"===e?h.playerStateChange(t.state):"skipped"===e&&h.skipped()}catch(n){p.debug(u,"Failed OMID Video Events "+n)}},destroy:function(){p.debug(u,"destroy verifications")}}}},function(e,t,n){var i=n(13),o="[PlayerManager_Verification_OMID]",r=n(9),a=function(e){r.debug(o,e)};e.exports=function(e,t){function n(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)});return t}function s(e,t){p=e,h=t,v&&u()}function l(e,t){y&&y.addListener(e,t)}function d(){var e={apiVersion:"1.0",environment:"web",accessMode:"full",videElement:f.videoElement,adSessionType:"html",adCount:1,omidJsInfo:{omidImplementer:"videoads-ad-video-player-manager",serviceVersion:"3.5.19"}};return m.adServingId&&(e.adServingId=m.adServingId),e}function c(e){return e===m.vendor?m.verificationParams:null}function u(){r.debug(o,"start OMID session");var e={adSessionId:g,type:"sessionStart",timestamp:Date.now(),data:{context:d()}},t=c(h);t&&(e.data.verificationParameters=t),y=new i(g,p),p(e)}var p,h,m=e,f=t,v=!1,g=n(),y=null,A=[];return{init:function(){r.debug(o,"expose OMID interface"),f.frameWin.omid3p={registerSessionObserver:s,addEventListener:l}},start:function(){v=!0,p&&u()},dispatchEvent:function(e,t){y?(A.length>0&&(A.forEach(function(t){a("dispatch from cache OMID event "+e),y.fireEvent(t.eventName,t.data)}),A=[]),r.debug(o,"dispatch OMID event "+e),y.fireEvent(e,t)):(r.debug(o,"save in cache OMID event "+e),A.push({event:e,data:t}))},destroy:function(){if(r.debug(o,"terminate OMID session"),p&&v){var e={adSessionId:g,type:"sessionFinish",timestamp:Date.now()};p(e)}}}}},function(e,t){e.exports=function(e,t){function n(e,t){return!!e.find(function(e){return t===e})}function i(e){return n(u,e)||n(p,e)||n(h,e)||n(m,e)||n(f,e)}function o(e,t){var n=null;switch(e){case"sessionError":n={},t&&t.type&&(n.errorType=t.type),t&&t.message&&(n.message=t.message);break;case"impression":n={},n.mediaType="video";break;case"loaded":n={},n.skippable=t.skippable,n.skippable&&(n.skipOffset=parseInt(t.skipOffset/1e3+.5)),n.autoPlay=t.autoPlay,n.position=t.position;break;case"start":n={},n.duration=t.duration,n.videoPlayerVolume=t.volume;break;case"volumeChange":n={},n.videoPlayerVolume=t.volume;break;case"playerStateChange":n={},n.state=t.state;break;case"adUsetInteraction":n={},n.interactionType=t.interactionType}return n}function r(e,t){var n={adSessionId:l,type:e,timestamp:Date.now()},i=o(e,t);return i&&(n.data=i),n}function a(e){return"sessionError"===e}function s(e,t){c.hasOwnProperty(e)||(c[e]=[]),c[e].push(t)}var l=e,d=t,c={},u=["sessionStart","sessionError","sessionFinish"],p=["impression"],h=["loaded","start","firstQuartile","midpoint","thirdQuartile","complete","pause","resume","bufferStart","bufferFinish","skipped","volumeChange","playerStateChange","adUserInteraction"],m=["geometryChange"],f=["video"];return{addListener:function(e,t){i(e)&&(n(f,e)?h.forEach(function(e){s(e,t)}):s(e,t))},fireEvent:function(e,t){if(c.hasOwnProperty(e)){var n=r(e,t);a(e)?d(n):c[e].forEach(function(e){e(n)})}}}}},function(e,t,n){var i="[PlayerManager_Verification_Tracking]",o=n(9);e.exports=function(e,t){function n(e,t){var n=e;if(t)for(var i in t)n=n.split("["+i.toUpperCase()+"]").join(encodeURIComponent(t[i]));return n=a(n)}function r(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)});return t}function a(e){for(var n in c)if(e.indexOf("["+n+"]")>=0){var i=c[n];null===i&&(i=t?t.resolveMacro(n):-1),e=e.split("["+n+"]").join(encodeURIComponent(i))}return e}for(var s={},l=0;li)throw Error("Value for "+e+" is outside the range ["+n+","+i+"]")},assertFunction:function(e,t){if(!t)throw Error(e+" must not be truthy.")},assertPositiveNumber:function(e,t){if((0,module$exports$omid$common$argsChecker.assertNumber)(e,t),0>t)throw Error(e+" must be a positive number.")}},module$exports$omid$common$exporter={};module$exports$omid$common$exporter.packageExport=function(e,t,n){(n=void 0===n?module$contents$omid$common$exporter_getOmidExports():n)&&(e=e.split("."),e.slice(0,e.length-1).reduce(module$contents$omid$common$exporter_getOrCreateName,n)[e[e.length-1]]=t)};var module$exports$omid$sessionClient$Partner=function(e,t){module$exports$omid$common$argsChecker.assertTruthyString("Partner.name",e),module$exports$omid$common$argsChecker.assertTruthyString("Partner.version",t),this.name=e,this.version=t};(0,module$exports$omid$common$exporter.packageExport)("OmidSessionClient.Partner",module$exports$omid$sessionClient$Partner);var module$exports$omid$sessionClient$VerificationScriptResource=function(e,t,n){module$exports$omid$common$argsChecker.assertTruthyString("VerificationScriptResource.resourceUrl",e),this.resourceUrl=e,this.vendorKey=t,this.verificationParameters=n};(0,module$exports$omid$common$exporter.packageExport)("OmidSessionClient.VerificationScriptResource",module$exports$omid$sessionClient$VerificationScriptResource);var module$exports$omid$sessionClient$Context=function(e,t){module$exports$omid$common$argsChecker.assertNotNullObject("Context.partner",e),this.partner=e,this.verificationScriptResources=t,this.videoElement=this.slotElement=null};module$exports$omid$sessionClient$Context.prototype.setVideoElement=function(e){module$exports$omid$common$argsChecker.assertNotNullObject("Context.videoElement",e),this.videoElement=e},module$exports$omid$sessionClient$Context.prototype.setSlotElement=function(e){module$exports$omid$common$argsChecker.assertNotNullObject("Context.slotElement",e),this.slotElement=e},(0,module$exports$omid$common$exporter.packageExport)("OmidSessionClient.Context",module$exports$omid$sessionClient$Context);var module$exports$omid$common$OmidGlobalProvider={},module$contents$omid$common$OmidGlobalProvider_globalThis=eval("this");module$exports$omid$common$OmidGlobalProvider.omidGlobal=module$contents$omid$common$OmidGlobalProvider_getOmidGlobal();var module$contents$omid$sessionClient$OmidJsSessionInterface_ExportedNodeKeys={ROOT:"omidSessionInterface",AD_EVENTS:"adEvents",VIDEO_EVENTS:"videoEvents"},module$contents$omid$sessionClient$OmidJsSessionInterface_MethodNameMap={sessionError:"reportError"},module$contents$omid$sessionClient$OmidJsSessionInterface_VideoEventMethodNames=Object.keys(module$exports$omid$common$constants.VideoEventType).map(function(e){return module$exports$omid$common$constants.VideoEventType[e]}),module$contents$omid$sessionClient$OmidJsSessionInterface_AdEventMethodNames=["impressionOccurred"],module$exports$omid$sessionClient$OmidJsSessionInterface=function(e){e=void 0===e?module$exports$omid$common$OmidGlobalProvider.omidGlobal:e,this.interfaceRoot_=e[module$contents$omid$sessionClient$OmidJsSessionInterface_ExportedNodeKeys.ROOT]};module$exports$omid$sessionClient$OmidJsSessionInterface.prototype.isSupported=function(){return null!=this.interfaceRoot_},module$exports$omid$sessionClient$OmidJsSessionInterface.prototype.sendMessage=function(e,t,n){if("registerSessionObserver"==e&&(n=[t]),module$contents$omid$sessionClient$OmidJsSessionInterface_MethodNameMap[e]&&(e=module$contents$omid$sessionClient$OmidJsSessionInterface_MethodNameMap[e]),t=this.interfaceRoot_,0<=module$contents$omid$sessionClient$OmidJsSessionInterface_AdEventMethodNames.indexOf(e)&&(t=t[module$contents$omid$sessionClient$OmidJsSessionInterface_ExportedNodeKeys.AD_EVENTS]),0<=module$contents$omid$sessionClient$OmidJsSessionInterface_VideoEventMethodNames.indexOf(e)&&(t=t[module$contents$omid$sessionClient$OmidJsSessionInterface_ExportedNodeKeys.VIDEO_EVENTS]),t=t[e],!t)throw Error("Unrecognized method name: "+e+".");t.apply(null,$jscomp.arrayFromIterable(n))};var module$exports$omid$common$Rectangle=function(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i},module$exports$omid$common$logger={error:function(e){for(var t=[],n=0;no)break;if(i