@24i/bigscreen-sdk 1.0.39 → 1.0.40-alpha.2687
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -47
- package/__mocks__/@24i/bigscreen-sdk/animations.ts +2 -2
- package/package.json +1 -1
- package/packages/adobe-heartbeat/README.md +46 -46
- package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +244 -244
- package/packages/adobe-heartbeat/src/__external__/Adobe/Adobe.d.ts +24 -24
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.d.ts +126 -126
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.js +76 -76
- package/packages/adobe-heartbeat/src/index.ts +5 -5
- package/packages/adobe-heartbeat/src/types.ts +67 -67
- package/packages/analytics/README.md +7 -7
- package/packages/analytics/src/A.ts +1 -1
- package/packages/analytics/src/Analytics.ts +1 -1
- package/packages/analytics/src/analyticsOnScroll.ts +1 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +1 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +1 -1
- package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +200 -200
- package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +118 -118
- package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +17 -17
- package/packages/analytics/src/clients/GoogleAnalytics/index.ts +2 -2
- package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +77 -77
- package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +50 -50
- package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +14 -14
- package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +169 -169
- package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +102 -102
- package/packages/analytics/src/clients/TealiumAnalytics/findIdForLanguage.ts +9 -9
- package/packages/analytics/src/clients/TealiumAnalytics/index.ts +4 -4
- package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +33 -33
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +70 -70
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +36 -36
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +13 -13
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +11 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +11 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +18 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +18 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +8 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +8 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +18 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/types.ts +156 -156
- package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +116 -116
- package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +99 -99
- package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +34 -34
- package/packages/analytics/src/clients/TwentyFourIQ/index.ts +2 -2
- package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +31 -31
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdLoaded.ts +13 -13
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdSkipped.ts +16 -16
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +21 -21
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +15 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +24 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +18 -18
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +15 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +17 -17
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +21 -21
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +24 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +24 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +34 -34
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +32 -32
- package/packages/analytics/src/clients/TwentyFourIQ/types.ts +115 -115
- package/packages/analytics/src/constants.ts +1 -1
- package/packages/analytics/src/index.ts +3 -3
- package/packages/analytics/src/interface.ts +1 -1
- package/packages/analytics/src/utils/generateSessionId.ts +8 -8
- package/packages/animations/README.md +85 -85
- package/packages/animations/src/AnimationUtils.ts +238 -238
- package/packages/animations/src/JSAnimations.ts +144 -144
- package/packages/animations/src/__mocks__/JSAnimations.ts +30 -30
- package/packages/animations/src/index.ts +3 -3
- package/packages/announcement-banner/README.md +49 -49
- package/packages/announcement-banner/src/AnnouncementBanner.scss +8 -8
- package/packages/announcement-banner/src/AnnouncementBanner.tsx +136 -136
- package/packages/announcement-banner/src/index.ts +1 -1
- package/packages/async-image/README.md +47 -47
- package/packages/async-image/src/AsyncImage.tsx +101 -101
- package/packages/async-image/src/index.ts +2 -2
- package/packages/conviva/README.md +47 -47
- package/packages/conviva/src/ConvivaSDK.ts +38 -38
- package/packages/conviva/src/__mocks__/ConvivaMock.ts +36 -36
- package/packages/conviva/src/index.ts +1 -1
- package/packages/conviva/src/theoPlugin/ConvivaConviguration.ts +19 -19
- package/packages/conviva/src/theoPlugin/__external__/Conviva_4.0.15.js +698 -698
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.d.ts +7 -7
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.js +635 -635
- package/packages/conviva/src/theoPlugin/convivaTheoPluginWrapper.ts +61 -61
- package/packages/conviva/src/theoPlugin/index.ts +2 -2
- package/packages/developer-tools/DeveloperConsole/README.md +114 -114
- package/packages/developer-tools/DeveloperConsole/index.ts +3 -3
- package/packages/developer-tools/DeveloperConsole/unstyled.ts +1 -1
- package/packages/developer-tools/DeveloperToolsService/README.md +54 -54
- package/packages/developer-tools/DeveloperToolsService/index.ts +3 -3
- package/packages/developer-tools/DeveloperToolsService/unstyled.ts +1 -1
- package/packages/developer-tools/EnvironmentSelection/README.md +77 -77
- package/packages/developer-tools/EnvironmentSelection/index.ts +3 -3
- package/packages/developer-tools/EnvironmentSelection/unstyled.ts +1 -1
- package/packages/developer-tools/PlayerDebugWindow/README.md +65 -65
- package/packages/developer-tools/PlayerDebugWindow/index.ts +3 -3
- package/packages/developer-tools/PlayerDebugWindow/unstyled.ts +1 -1
- package/packages/developer-tools/README.md +24 -24
- package/packages/developer-tools/TechnicalInfo/README.md +90 -90
- package/packages/developer-tools/TechnicalInfo/index.ts +9 -9
- package/packages/developer-tools/TechnicalInfo/unstyled.ts +6 -6
- package/packages/developer-tools/src/DeveloperConsole/ControlButton.tsx +16 -16
- package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +389 -389
- package/packages/developer-tools/src/DeveloperConsole/Panel.tsx +108 -108
- package/packages/developer-tools/src/DeveloperConsole/PanelMessage.tsx +33 -33
- package/packages/developer-tools/src/DeveloperConsole/helpers/Queue.ts +38 -38
- package/packages/developer-tools/src/DeveloperConsole/helpers/index.ts +2 -2
- package/packages/developer-tools/src/DeveloperConsole/helpers/instrumentHandler.ts +165 -165
- package/packages/developer-tools/src/DeveloperConsole/index.ts +2 -2
- package/packages/developer-tools/src/DeveloperConsole/initDeveloperConsole.tsx +8 -8
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.scss +91 -91
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.1080.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.1080.scss +16 -16
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.scss +16 -16
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.scss +87 -87
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.1080.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.1080.scss +9 -9
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.scss +9 -9
- package/packages/developer-tools/src/DeveloperConsole/styles.ts +2 -2
- package/packages/developer-tools/src/DeveloperConsole/types.ts +49 -49
- package/packages/developer-tools/src/DeveloperConsole/utils/formatTime.ts +13 -13
- package/packages/developer-tools/src/DeveloperConsole/utils/index.ts +3 -3
- package/packages/developer-tools/src/DeveloperConsole/utils/stringify.ts +10 -10
- package/packages/developer-tools/src/DeveloperConsole/utils/styles.ts +24 -24
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolItem.tsx +21 -21
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +125 -125
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsService.tsx +122 -122
- package/packages/developer-tools/src/DeveloperToolsService/index.ts +1 -1
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.scss +64 -64
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.1080.scss +2 -2
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.1080.scss +3 -3
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.scss +4 -4
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.scss +2 -2
- package/packages/developer-tools/src/DeveloperToolsService/styles/_animated.scss +5 -5
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.1080.scss +16 -16
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.scss +16 -16
- package/packages/developer-tools/src/DeveloperToolsService/styles.ts +1 -1
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentList.tsx +90 -90
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentListItem.tsx +106 -106
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentSelection.tsx +102 -102
- package/packages/developer-tools/src/EnvironmentSelection/assets/checkmark.svg +18 -18
- package/packages/developer-tools/src/EnvironmentSelection/config.ts +43 -43
- package/packages/developer-tools/src/EnvironmentSelection/constants.ts +1 -1
- package/packages/developer-tools/src/EnvironmentSelection/index.ts +2 -2
- package/packages/developer-tools/src/EnvironmentSelection/sizes.1080.ts +5 -5
- package/packages/developer-tools/src/EnvironmentSelection/sizes.ts +5 -5
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +141 -141
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.1080.scss +2 -2
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.1080.scss +3 -3
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.scss +3 -3
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.scss +2 -2
- package/packages/developer-tools/src/EnvironmentSelection/styles/_animated.scss +9 -9
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.1080.scss +26 -26
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.scss +26 -26
- package/packages/developer-tools/src/EnvironmentSelection/styles.ts +1 -1
- package/packages/developer-tools/src/EnvironmentSelection/types.ts +10 -10
- package/packages/developer-tools/src/EnvironmentSelection/utils/format.ts +4 -4
- package/packages/developer-tools/src/IDeveloperTool.ts +14 -14
- package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +115 -115
- package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +128 -128
- package/packages/developer-tools/src/PlayerDebugWindow/index.ts +1 -1
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.scss +29 -29
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.1080.scss +2 -2
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.scss +2 -2
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.1080.scss +11 -11
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.scss +11 -11
- package/packages/developer-tools/src/PlayerDebugWindow/styles.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/ITechnicalInfoProvider.ts +5 -5
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +125 -125
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +77 -77
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +349 -349
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +55 -55
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Player.ts +7 -7
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Storage.ts +9 -9
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-down.svg +18 -18
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-up.svg +18 -18
- package/packages/developer-tools/src/TechnicalInfo/index.ts +5 -5
- package/packages/developer-tools/src/TechnicalInfo/sizes.1080.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/sizes.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.scss +187 -187
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.1080.scss +2 -2
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.1080.scss +3 -3
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.scss +3 -3
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.scss +2 -2
- package/packages/developer-tools/src/TechnicalInfo/styles/_animated.scss +16 -16
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.1080.scss +50 -50
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.scss +50 -50
- package/packages/developer-tools/src/TechnicalInfo/styles.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/translations.ts +79 -79
- package/packages/developer-tools/src/TechnicalInfo/utils/eme01bSupport.ts +58 -58
- package/packages/developer-tools/src/TechnicalInfo/utils/emeSupport.ts +84 -84
- package/packages/developer-tools/src/TechnicalInfo/utils/formatTimezone.ts +15 -15
- package/packages/developer-tools/src/TechnicalInfo/utils/mseSupport.ts +14 -14
- package/packages/developer-tools/src/utils/reload.ts +6 -6
- package/packages/device/README.md +219 -219
- package/packages/device/keymap.ts +1 -1
- package/packages/device/resolver/index.ts +2 -2
- package/packages/device/resolver/keymap.ts +1 -1
- package/packages/device/src/DeviceEventMap.ts +1 -1
- package/packages/device/src/device.ts +6 -6
- package/packages/device/src/driver/index.android.tv.ts +1 -1
- package/packages/device/src/driver/index.entone.ts +1 -1
- package/packages/device/src/driver/index.firetv.ts +1 -1
- package/packages/device/src/driver/index.hbbtv.tv.ts +1 -1
- package/packages/device/src/driver/index.kreatv.ts +1 -1
- package/packages/device/src/driver/index.saphi.tv.ts +1 -1
- package/packages/device/src/driver/index.smartcast.tv.ts +1 -1
- package/packages/device/src/driver/index.tizen.tv.ts +1 -1
- package/packages/device/src/driver/index.ts +1 -1
- package/packages/device/src/driver/index.vidaa.tv.ts +1 -1
- package/packages/device/src/driver/index.webos.tv.ts +1 -1
- package/packages/device/src/getKeyDigit.ts +35 -35
- package/packages/device/src/getKeyMap.ts +4 -4
- package/packages/device/src/index.ts +8 -8
- package/packages/device/src/isClickOrEnter.ts +3 -3
- package/packages/device/src/resolver/index.ts +2 -2
- package/packages/device/src/resolver/resolver.ts +84 -84
- package/packages/digital-clock/README.md +26 -26
- package/packages/digital-clock/src/DigitalClock.tsx +78 -78
- package/packages/digital-clock/src/index.ts +1 -1
- package/packages/driver-androidtv/src/DeviceAndroidTV.ts +224 -224
- package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +36 -36
- package/packages/driver-androidtv/src/formatUserAgent.ts +11 -11
- package/packages/driver-androidtv/src/index.ts +1 -1
- package/packages/driver-androidtv/src/keymap.ts +27 -27
- package/packages/driver-androidtv/src/types.ts +113 -113
- package/packages/driver-base/DeviceBase.md +139 -139
- package/packages/driver-base/README.md +44 -44
- package/packages/driver-base/src/ConnectionType.ts +1 -1
- package/packages/driver-base/src/DeviceBase.ts +279 -279
- package/packages/driver-base/src/KeyMap/Key.ts +48 -48
- package/packages/driver-base/src/KeyMap/KeyMap.ts +390 -390
- package/packages/driver-base/src/KeyMap/generateKeyCodeKeyMap.ts +11 -11
- package/packages/driver-base/src/KeyMap/index.ts +5 -5
- package/packages/driver-base/src/KeyMap/interface.ts +8 -8
- package/packages/driver-base/src/KeyMap/overrideValues.ts +17 -17
- package/packages/driver-base/src/KeyMap/switchByKey.ts +18 -18
- package/packages/driver-base/src/ScreenSize.ts +1 -1
- package/packages/driver-base/src/VolumeRange.ts +5 -5
- package/packages/driver-base/src/__mocks__/DeviceBase.ts +100 -100
- package/packages/driver-base/src/__mocks__/keyMap.ts +42 -42
- package/packages/driver-base/src/bindPreventDefaultEvent.ts +5 -5
- package/packages/driver-base/src/errors.ts +32 -32
- package/packages/driver-base/src/index.ts +10 -10
- package/packages/driver-base/src/loadObject.ts +30 -30
- package/packages/driver-base/src/types/DeviceEvent.ts +11 -11
- package/packages/driver-base/src/types/ExitOptions.ts +1 -1
- package/packages/driver-base/src/types/KeycodeKeyMap.ts +86 -86
- package/packages/driver-base/src/types/ScreenSaverStatus.ts +3 -3
- package/packages/driver-base/src/utils.ts +10 -10
- package/packages/driver-browser/src/DeviceBrowser.ts +170 -170
- package/packages/driver-browser/src/getBrowser.ts +51 -51
- package/packages/driver-browser/src/getOsName.ts +30 -30
- package/packages/driver-browser/src/index.ts +1 -1
- package/packages/driver-browser/src/keymap.ts +22 -22
- package/packages/driver-browser/src/patchSuitestKeys.ts +27 -27
- package/packages/driver-entone/README.md +9 -9
- package/packages/driver-entone/src/DeviceEntone.ts +232 -232
- package/packages/driver-entone/src/IEntone.ts +460 -460
- package/packages/driver-entone/src/__mocks__/entone.ts +177 -177
- package/packages/driver-entone/src/constants.ts +73 -73
- package/packages/driver-entone/src/index.ts +1 -1
- package/packages/driver-entone/src/keymap.ts +57 -57
- package/packages/driver-firetv/src/DeviceFireTV.ts +18 -18
- package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +36 -36
- package/packages/driver-firetv/src/index.ts +1 -1
- package/packages/driver-hbbtv/src/DeviceHbbTV.ts +313 -313
- package/packages/driver-hbbtv/src/__mocks__/hbbtv.ts +17 -17
- package/packages/driver-hbbtv/src/constants.ts +28 -28
- package/packages/driver-hbbtv/src/deviceInfo.ts +23 -23
- package/packages/driver-hbbtv/src/getVersion.ts +16 -16
- package/packages/driver-hbbtv/src/index.ts +1 -1
- package/packages/driver-hbbtv/src/keymap.ts +45 -45
- package/packages/driver-hbbtv/src/types.ts +366 -366
- package/packages/driver-kreatv/src/DeviceKreaTV.ts +271 -271
- package/packages/driver-kreatv/src/IToi.ts +379 -379
- package/packages/driver-kreatv/src/__mocks__/toi2.ts +76 -76
- package/packages/driver-kreatv/src/__mocks__/toi3.ts +43 -43
- package/packages/driver-kreatv/src/index.ts +1 -1
- package/packages/driver-kreatv/src/keymap.ts +31 -31
- package/packages/driver-kreatv/src/toi2.ts +107 -107
- package/packages/driver-kreatv/src/toi3.ts +102 -102
- package/packages/driver-kreatv/src/types.ts +35 -35
- package/packages/driver-saphi/src/DeviceSaphi.ts +144 -144
- package/packages/driver-saphi/src/__mocks__/SmartTvA_API.ts +11 -11
- package/packages/driver-saphi/src/__mocks__/userAgent.ts +4 -4
- package/packages/driver-saphi/src/constants.ts +1 -1
- package/packages/driver-saphi/src/formatUserAgent.ts +19 -19
- package/packages/driver-saphi/src/index.ts +1 -1
- package/packages/driver-saphi/src/keymap.ts +64 -64
- package/packages/driver-saphi/src/types.ts +75 -75
- package/packages/driver-smartcast/src/DeviceSmartCast.ts +317 -317
- package/packages/driver-smartcast/src/__mocks__/api.ts +49 -49
- package/packages/driver-smartcast/src/index.ts +1 -1
- package/packages/driver-smartcast/src/keymap.ts +9 -9
- package/packages/driver-smartcast/src/types.ts +65 -65
- package/packages/driver-tizen/src/DeviceTizen.ts +298 -298
- package/packages/driver-tizen/src/ITizen.ts +212 -212
- package/packages/driver-tizen/src/IWebapis.ts +95 -95
- package/packages/driver-tizen/src/TizenKeys.ts +96 -96
- package/packages/driver-tizen/src/__mocks__/tizen.ts +35 -35
- package/packages/driver-tizen/src/constants.ts +197 -197
- package/packages/driver-tizen/src/index.ts +1 -1
- package/packages/driver-tizen/src/types.ts +14 -14
- package/packages/driver-vidaa/src/DeviceVidaa.ts +141 -141
- package/packages/driver-vidaa/src/__mocks__/vidaa.ts +21 -21
- package/packages/driver-vidaa/src/constants.ts +8 -8
- package/packages/driver-vidaa/src/formatUserAgent.ts +16 -16
- package/packages/driver-vidaa/src/index.ts +1 -1
- package/packages/driver-vidaa/src/keymap.ts +56 -56
- package/packages/driver-vidaa/src/types.ts +90 -90
- package/packages/driver-webos/src/DeviceWebos.ts +313 -313
- package/packages/driver-webos/src/__mocks__/webos.ts +172 -172
- package/packages/driver-webos/src/constants.ts +20 -20
- package/packages/driver-webos/src/index.ts +1 -1
- package/packages/driver-webos/src/keymap.ts +10 -10
- package/packages/driver-webos/src/types.ts +344 -344
- package/packages/driver-webos/src/utils.ts +60 -60
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs.js +12 -12
- package/packages/driver-xbox/__external__/winjs/directionalnavigation-1.0.0.0.js +1015 -1015
- package/packages/driver-xbox/src/DeviceXbox.ts +231 -231
- package/packages/driver-xbox/src/__mocks__/Windows.ts +94 -94
- package/packages/driver-xbox/src/index.ts +1 -1
- package/packages/driver-xbox/src/interfaces.ts +138 -138
- package/packages/driver-xbox/src/keymap.ts +96 -96
- package/packages/driver-xbox/src/utils.ts +23 -23
- package/packages/epg/IMPLEMENTATION.md +228 -228
- package/packages/epg/MockGenerator.md +102 -102
- package/packages/epg/README.md +585 -585
- package/packages/epg/src/v2/Cell.tsx +222 -222
- package/packages/epg/src/v2/CellsManager.ts +1 -1
- package/packages/epg/src/v2/DataManager.ts +372 -372
- package/packages/epg/src/v2/DatePicker.tsx +110 -110
- package/packages/epg/src/v2/DateToast/DateToast.scss +28 -28
- package/packages/epg/src/v2/DateToast/DateToast.styles.1080.scss +2 -2
- package/packages/epg/src/v2/DateToast/DateToast.styles.scss +2 -2
- package/packages/epg/src/v2/DateToast/DateToast.tsx +90 -90
- package/packages/epg/src/v2/DateToast/_sizes.1080.scss +7 -7
- package/packages/epg/src/v2/DateToast/_sizes.scss +7 -7
- package/packages/epg/src/v2/DateToast/index.tsx +1 -1
- package/packages/epg/src/v2/DateToast/styles.ts +1 -1
- package/packages/epg/src/v2/Day.tsx +33 -33
- package/packages/epg/src/v2/Epg.tsx +462 -462
- package/packages/epg/src/v2/Header.tsx +41 -41
- package/packages/epg/src/v2/IdleController.ts +25 -25
- package/packages/epg/src/v2/InputEvents.ts +301 -301
- package/packages/epg/src/v2/MockGenerator/config.1080.ts +2 -2
- package/packages/epg/src/v2/MockGenerator/config.ts +2 -2
- package/packages/epg/src/v2/MockGenerator/generator.ts +174 -174
- package/packages/epg/src/v2/MockGenerator/index.ts +2 -2
- package/packages/epg/src/v2/MockGenerator/mocks/data.ts +102 -102
- package/packages/epg/src/v2/MockGenerator/types.ts +25 -25
- package/packages/epg/src/v2/MockGenerator/utils.ts +28 -28
- package/packages/epg/src/v2/MouseNavigation/MouseNavigation.tsx +88 -88
- package/packages/epg/src/v2/MouseNavigation/MouseNavigationFallback.ts +4 -4
- package/packages/epg/src/v2/MouseNavigation/index.tizen.tv.ts +1 -1
- package/packages/epg/src/v2/MouseNavigation/index.ts +1 -1
- package/packages/epg/src/v2/MouseNavigation/index.web.ts +1 -1
- package/packages/epg/src/v2/MouseNavigation/index.webos.tv.ts +1 -1
- package/packages/epg/src/v2/NowLine.tsx +66 -66
- package/packages/epg/src/v2/Program.tsx +58 -58
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.scss +67 -67
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.1080.scss +3 -3
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.1080.scss +2 -2
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.scss +2 -2
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.scss +3 -3
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.tsx +149 -149
- package/packages/epg/src/v2/ProgramInfo/_animated.scss +8 -8
- package/packages/epg/src/v2/ProgramInfo/_mixins.scss +5 -5
- package/packages/epg/src/v2/ProgramInfo/_sizes.1080.scss +21 -21
- package/packages/epg/src/v2/ProgramInfo/_sizes.scss +21 -21
- package/packages/epg/src/v2/ProgramInfo/index.ts +1 -1
- package/packages/epg/src/v2/ProgramInfo/rtl.scss +7 -7
- package/packages/epg/src/v2/ProgramInfo/sizes.1080.ts +3 -3
- package/packages/epg/src/v2/ProgramInfo/sizes.ts +3 -3
- package/packages/epg/src/v2/ProgramInfo/styles.ts +1 -1
- package/packages/epg/src/v2/ProgramInfo/utils.ts +28 -28
- package/packages/epg/src/v2/Row.tsx +134 -134
- package/packages/epg/src/v2/RowsManager.ts +1 -1
- package/packages/epg/src/v2/TimeManager.ts +58 -58
- package/packages/epg/src/v2/Timeline.ts +1 -1
- package/packages/epg/src/v2/TimelineSection.tsx +50 -50
- package/packages/epg/src/v2/basic/CellsManager.tsx +300 -300
- package/packages/epg/src/v2/basic/RowsManager.tsx +503 -503
- package/packages/epg/src/v2/basic/Timeline.tsx +88 -88
- package/packages/epg/src/v2/index.ts +1 -1
- package/packages/epg/src/v2/interface.ts +1519 -1519
- package/packages/epg/src/v2/sizes.1080.ts +2 -2
- package/packages/epg/src/v2/sizes.ts +2 -2
- package/packages/epg/src/v2/styles/Basic/Basic.scss +116 -116
- package/packages/epg/src/v2/styles/Basic/index.ts +1 -1
- package/packages/epg/src/v2/styles/Whitelabel/index.ts +1 -1
- package/packages/epg/src/v2/utils.ts +40 -40
- package/packages/events-manager/src/EventsManager.ts +1 -1
- package/packages/events-manager/src/index.ts +2 -2
- package/packages/floating-focus/README.md +64 -64
- package/packages/floating-focus/src/FloatingFocus.ts +106 -106
- package/packages/floating-focus/src/Horizontal.tsx +20 -20
- package/packages/floating-focus/src/Vertical.tsx +20 -20
- package/packages/floating-focus/src/index.ts +4 -4
- package/packages/floating-focus/src/types.ts +20 -20
- package/packages/floating-focus/src/utils.ts +43 -43
- package/packages/focus/README.md +348 -348
- package/packages/focus/src/IFocusable.ts +5 -5
- package/packages/focus/src/Layout/Base.tsx +166 -166
- package/packages/focus/src/Layout/Horizontal.ts +15 -15
- package/packages/focus/src/Layout/Matrix.tsx +357 -357
- package/packages/focus/src/Layout/Vertical.ts +12 -12
- package/packages/focus/src/Layout/constants.ts +10 -10
- package/packages/focus/src/Layout/isRtl.ts +12 -12
- package/packages/focus/src/Layout/types.ts +7 -7
- package/packages/focus/src/candidate.ts +106 -106
- package/packages/focus/src/focusFirstExisting.ts +19 -19
- package/packages/focus/src/hasFocus.ts +36 -36
- package/packages/focus/src/index.ts +16 -16
- package/packages/focus/src/refocusAfterHashChange.ts +19 -19
- package/packages/focus/src/safeFocus.ts +15 -15
- package/packages/gallup/README.md +27 -27
- package/packages/gallup/src/Gallup.ts +80 -80
- package/packages/gallup/src/GallupMock.ts +7 -7
- package/packages/gallup/src/__external__/SpringStreams.d.ts +39 -39
- package/packages/gallup/src/__mocks__/SpringStreams.js +18 -18
- package/packages/gallup/src/index.ts +1 -1
- package/packages/grid/BasicGrid/README.md +78 -78
- package/packages/grid/BasicGrid/index.ts +1 -1
- package/packages/grid/FirstOnlyGrid/README.md +43 -43
- package/packages/grid/FirstOnlyGrid/index.ts +1 -1
- package/packages/grid/FixedToEndGrid/README.md +45 -45
- package/packages/grid/FixedToEndGrid/index.ts +1 -1
- package/packages/grid/Item/index.ts +1 -1
- package/packages/grid/README.md +169 -169
- package/packages/grid/src/Base/Base.tsx +492 -492
- package/packages/grid/src/Base/MouseNavigation/MouseNavigation.tsx +82 -82
- package/packages/grid/src/Base/MouseNavigation/MouseNavigationFallback.ts +4 -4
- package/packages/grid/src/Base/MouseNavigation/index.tizen.tv.ts +1 -1
- package/packages/grid/src/Base/MouseNavigation/index.ts +1 -1
- package/packages/grid/src/Base/MouseNavigation/index.webos.tv.ts +1 -1
- package/packages/grid/src/Base/MouseNavigation/index.webtv.ts +1 -1
- package/packages/grid/src/Base/index.ts +1 -1
- package/packages/grid/src/Base/interface.ts +47 -47
- package/packages/grid/src/BasicGrid/BasicGrid.tsx +137 -137
- package/packages/grid/src/BasicGrid/config.ts +13 -13
- package/packages/grid/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -54
- package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +112 -112
- package/packages/grid/src/FirstOnlyGrid/config.ts +13 -13
- package/packages/grid/src/FirstOnlyGrid/controller.ts +10 -10
- package/packages/grid/src/FixedToEndGrid/FixedToEndGrid.tsx +112 -112
- package/packages/grid/src/FixedToEndGrid/config.ts +13 -13
- package/packages/grid/src/FixedToEndGrid/controller.ts +36 -36
- package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +555 -555
- package/packages/grid/src/UnifiedGridController/index.ts +2 -2
- package/packages/grid/src/UnifiedGridController/interface.ts +92 -92
- package/packages/grid/src/animate.animated.ts +1 -1
- package/packages/grid/src/animate.ts +1 -1
- package/packages/grid/src/interface.ts +30 -30
- package/packages/grid/src/mocks/index.tsx +41 -41
- package/packages/grid/src/types.ts +69 -69
- package/packages/grid/src/utils.ts +69 -69
- package/packages/i18n/README.md +460 -460
- package/packages/i18n/src/I18n.ts +246 -246
- package/packages/i18n/src/Translation.tsx +36 -36
- package/packages/i18n/src/addResourceBundle.ts +73 -73
- package/packages/i18n/src/direction.ts +33 -33
- package/packages/i18n/src/index.ts +4 -4
- package/packages/i18n/src/isRtl.ts +3 -3
- package/packages/i18n/src/middlewares/i18next/Context/Context.ts +25 -25
- package/packages/i18n/src/middlewares/i18next/Context/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Interpolation/Interpolation.ts +95 -95
- package/packages/i18n/src/middlewares/i18next/Interpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Nesting/Nesting.ts +38 -38
- package/packages/i18n/src/middlewares/i18next/Nesting/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Plurals/Plurals.ts +123 -123
- package/packages/i18n/src/middlewares/i18next/Plurals/Resolvers.ts +124 -124
- package/packages/i18n/src/middlewares/i18next/Plurals/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Plurals/types.ts +6 -6
- package/packages/i18n/src/middlewares/icu/DateInterpolation/DateInterpolation.ts +64 -64
- package/packages/i18n/src/middlewares/icu/DateInterpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/Interpolation/Interpolation.ts +39 -39
- package/packages/i18n/src/middlewares/icu/Interpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/NumberInterpolation.ts +41 -41
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/Plurals/Plurals.ts +65 -65
- package/packages/i18n/src/middlewares/icu/Plurals/Resolvers.ts +130 -130
- package/packages/i18n/src/middlewares/icu/Plurals/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/Plurals/types.ts +15 -15
- package/packages/i18n/src/middlewares/icu/Select/Select.ts +36 -36
- package/packages/i18n/src/middlewares/icu/Select/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/TimeInterpolation.ts +65 -65
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/shared/hasVariable.ts +5 -5
- package/packages/i18n/src/middlewares/icu/shared/matchSwitchCase.ts +80 -80
- package/packages/i18n/src/middlewares/icu/shared/unwrap.ts +1 -1
- package/packages/i18n/src/pluralsCommon/PluralsHelper.ts +54 -54
- package/packages/i18n/src/pluralsCommon/ResolverByLanguage.ts +129 -129
- package/packages/i18n/src/t.tsx +6 -6
- package/packages/i18n/src/typedTranslate.ts +31 -31
- package/packages/i18n/src/types.ts +66 -66
- package/packages/i18n/src/utils.ts +76 -76
- package/packages/icon/README.md +107 -107
- package/packages/icon/src/Icon.tsx +71 -71
- package/packages/icon/src/index.ts +1 -1
- package/packages/ime/README.md +72 -72
- package/packages/ime/src/IKeyboard.ts +6 -6
- package/packages/ime/src/IKeyboardEvent.ts +7 -7
- package/packages/ime/src/ImeManager.ts +33 -33
- package/packages/ime/src/SystemKeyboard/SystemKeyboard.ts +33 -33
- package/packages/ime/src/SystemKeyboard/SystemKeyboardBase.ts +98 -98
- package/packages/ime/src/SystemKeyboard/TizenSystemKeyboard.ts +66 -66
- package/packages/ime/src/SystemKeyboard/WebosSystemKeyboard.ts +74 -74
- package/packages/ime/src/SystemKeyboard/index.tizen.tv.ts +1 -1
- package/packages/ime/src/SystemKeyboard/index.ts +1 -1
- package/packages/ime/src/SystemKeyboard/index.webos.tv.ts +1 -1
- package/packages/ime/src/index.ts +3 -3
- package/packages/input/README.md +65 -65
- package/packages/input/__mocks__/MockKeyboard.ts +40 -40
- package/packages/input/src/Input.scss +9 -9
- package/packages/input/src/Input.tsx +267 -267
- package/packages/input/src/index.ts +1 -1
- package/packages/input/src/utils.ts +71 -71
- package/packages/interactable/README.md +38 -38
- package/packages/interactable/src/Interactable.tsx +33 -33
- package/packages/interactable/src/index.ts +1 -1
- package/packages/interactable/src/interface.ts +7 -7
- package/packages/ipify/README.md +30 -30
- package/packages/ipify/src/index.ts +1 -1
- package/packages/ipify/src/ipify.ts +41 -41
- package/packages/jsx/README.md +388 -388
- package/packages/jsx/src/Component.ts +68 -68
- package/packages/jsx/src/createRef.ts +5 -5
- package/packages/jsx/src/forwardRef.ts +8 -8
- package/packages/jsx/src/index.ts +31 -31
- package/packages/jsx/src/jsx-runtime.ts +5 -5
- package/packages/jsx/src/manipulation/attachNode.ts +30 -30
- package/packages/jsx/src/manipulation/attachNodeBefore.ts +44 -44
- package/packages/jsx/src/manipulation/clearNode.ts +14 -14
- package/packages/jsx/src/manipulation/detachNode.ts +26 -26
- package/packages/jsx/src/manipulation/index.ts +7 -7
- package/packages/jsx/src/manipulation/removeNode.ts +18 -18
- package/packages/jsx/src/manipulation/replaceNode.ts +42 -42
- package/packages/jsx/src/manipulation/swapNodes.ts +53 -53
- package/packages/jsx/src/mount/guards.ts +26 -26
- package/packages/jsx/src/mount/handleLifecycle.ts +71 -71
- package/packages/jsx/src/mount/index.ts +1 -1
- package/packages/jsx/src/mount/lifecycle.ts +38 -38
- package/packages/jsx/src/mount/lifecycleHelpers.ts +29 -29
- package/packages/jsx/src/mount/mount.ts +141 -141
- package/packages/jsx/src/mount/namespaces.ts +7 -7
- package/packages/jsx/src/mount/props.ts +121 -121
- package/packages/jsx/src/nodeUtils.ts +69 -69
- package/packages/jsx/src/setText.ts +15 -15
- package/packages/jsx/src/test-utils/MountedComponent.ts +50 -50
- package/packages/jsx/src/test-utils/README.md +72 -72
- package/packages/jsx/src/test-utils/click.ts +7 -7
- package/packages/jsx/src/test-utils/enter.ts +4 -4
- package/packages/jsx/src/test-utils/index.ts +6 -6
- package/packages/jsx/src/test-utils/keydown.ts +27 -27
- package/packages/jsx/src/test-utils/keyup.ts +27 -27
- package/packages/jsx/src/test-utils/shallow.ts +33 -33
- package/packages/jsx/src/test-utils/spec-utils.ts +6 -6
- package/packages/jsx/src/textNode.ts +9 -9
- package/packages/jsx/src/types.ts +128 -128
- package/packages/jsx/src/utils.ts +35 -35
- package/packages/jsx/src/virtualDOM.ts +121 -121
- package/packages/key-sequence/README.md +44 -44
- package/packages/key-sequence/src/KeySequence.ts +56 -56
- package/packages/key-sequence/src/arrayEndsWithKeyCombo.ts +22 -22
- package/packages/key-sequence/src/index.ts +1 -1
- package/packages/key-sequence/src/types.ts +13 -13
- package/packages/keyboard/README.md +237 -237
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.scss +140 -140
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.1080.scss +3 -3
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.scss +3 -3
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.tsx +235 -235
- package/packages/keyboard/src/AndroidKeyboard/_animated.scss +7 -7
- package/packages/keyboard/src/AndroidKeyboard/_sizes.1080.scss +15 -15
- package/packages/keyboard/src/AndroidKeyboard/_sizes.scss +15 -15
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_left.svg +6 -6
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_right.svg +6 -6
- package/packages/keyboard/src/AndroidKeyboard/icons/key_backspace.svg +12 -12
- package/packages/keyboard/src/AndroidKeyboard/index.ts +1 -1
- package/packages/keyboard/src/AndroidKeyboard/makeLayout.ts +19 -19
- package/packages/keyboard/src/Backdrop/Backdrop.scss +17 -17
- package/packages/keyboard/src/Backdrop/Backdrop.styles.1080.scss +2 -2
- package/packages/keyboard/src/Backdrop/Backdrop.styles.scss +2 -2
- package/packages/keyboard/src/Backdrop/Backdrop.tsx +31 -31
- package/packages/keyboard/src/Backdrop/_sizes.1080.scss +2 -2
- package/packages/keyboard/src/Backdrop/_sizes.scss +2 -2
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.scss +73 -73
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.tsx +155 -155
- package/packages/keyboard/src/DefaultKeyboard/_sizes.1080.scss +12 -12
- package/packages/keyboard/src/DefaultKeyboard/_sizes.scss +12 -12
- package/packages/keyboard/src/DefaultKeyboard/index.ts +1 -1
- package/packages/keyboard/src/KeyboardBase.tsx +344 -344
- package/packages/keyboard/src/MobiKeyboard/Keyboard.scss +180 -180
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.1080.scss +3 -3
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.scss +3 -3
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/MobiKeyboard/Keyboard.tsx +278 -278
- package/packages/keyboard/src/MobiKeyboard/_animated.scss +7 -7
- package/packages/keyboard/src/MobiKeyboard/_sizes.1080.scss +10 -10
- package/packages/keyboard/src/MobiKeyboard/_sizes.scss +10 -10
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_left.svg +6 -6
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_right.svg +6 -6
- package/packages/keyboard/src/MobiKeyboard/icons/key_backspace.svg +12 -12
- package/packages/keyboard/src/MobiKeyboard/icons/key_space.svg +6 -6
- package/packages/keyboard/src/MobiKeyboard/index.ts +1 -1
- package/packages/keyboard/src/MobiKeyboard/utils.ts +19 -19
- package/packages/keyboard/src/QwertyKeyboardBase/QwertyKeyboardBase.tsx +54 -54
- package/packages/keyboard/src/ShiftMode.ts +25 -25
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +168 -168
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +353 -353
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -7
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.scss +7 -7
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/index.ts +1 -1
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +81 -81
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +32 -32
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +32 -32
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_left.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_right.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_backspace.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_language.svg +20 -20
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift_active.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/index.ts +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +28 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/hebrew.ts +28 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +15 -14
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/latin.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/special.ts +28 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/types.ts +28 -28
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.scss +105 -105
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.tsx +161 -161
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -7
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.scss +7 -7
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/index.ts +1 -1
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.scss +62 -62
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.1080.scss +29 -29
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.scss +29 -29
- package/packages/keyboard/src/WhitelabelNumericKeyboard/icons/key_backspace.svg +9 -9
- package/packages/keyboard/src/WhitelabelNumericKeyboard/index.ts +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/layout.ts +14 -14
- package/packages/keyboard/src/hwKeyboardEventToChar.ts +11 -11
- package/packages/keyboard/src/types/index.ts +11 -11
- package/packages/keyboard/src/utils/caret.ts +48 -48
- package/packages/keyboard/src/utils/generateFocusMatrixFromStringMatrix.ts +12 -12
- package/packages/keyboard/src/utils/input.ts +40 -40
- package/packages/l10n/README.md +120 -120
- package/packages/l10n/interface.ts +1 -1
- package/packages/l10n/locales/cs.ts +4 -4
- package/packages/l10n/locales/en-001.ts +4 -4
- package/packages/l10n/locales/en-us.ts +4 -4
- package/packages/l10n/src/Locale.tsx +44 -44
- package/packages/l10n/src/date/common.ts +165 -165
- package/packages/l10n/src/date/cs.ts +89 -89
- package/packages/l10n/src/date/de.ts +97 -97
- package/packages/l10n/src/date/en-001.ts +76 -76
- package/packages/l10n/src/date/en-common.ts +55 -55
- package/packages/l10n/src/date/en-us.ts +83 -83
- package/packages/l10n/src/date/es.ts +71 -71
- package/packages/l10n/src/date/fr.ts +94 -94
- package/packages/l10n/src/date/he.ts +101 -101
- package/packages/l10n/src/date/iso.ts +63 -63
- package/packages/l10n/src/date/types.ts +56 -56
- package/packages/l10n/src/index.ts +2 -2
- package/packages/l10n/src/l10n.ts +112 -112
- package/packages/l10n/src/types.ts +22 -22
- package/packages/list/AttachDetachItem/README.md +128 -128
- package/packages/list/AttachDetachItem/index.ts +3 -3
- package/packages/list/BasicList/README.md +71 -71
- package/packages/list/BasicList/index.ts +1 -1
- package/packages/list/CenteredList/README.md +42 -42
- package/packages/list/CenteredList/index.ts +1 -1
- package/packages/list/EdgeOffsetList/README.md +58 -58
- package/packages/list/EdgeOffsetList/index.ts +1 -1
- package/packages/list/FirstOnlyList/README.md +39 -39
- package/packages/list/FirstOnlyList/index.ts +1 -1
- package/packages/list/FirstOnlyVariedList/README.md +105 -105
- package/packages/list/FirstOnlyVariedList/index.ts +1 -1
- package/packages/list/FixedToEndList/README.md +42 -42
- package/packages/list/FixedToEndList/index.ts +1 -1
- package/packages/list/Item/index.ts +1 -1
- package/packages/list/README.md +193 -193
- package/packages/list/src/AttachDetachItem/AttachDetachItem.tsx +96 -96
- package/packages/list/src/AttachDetachItem/prepareAttachDetachItemData.ts +13 -13
- package/packages/list/src/Base/Base.tsx +392 -392
- package/packages/list/src/Base/MouseNavigation/MouseNavigation.tsx +82 -82
- package/packages/list/src/Base/MouseNavigation/MouseNavigationFallback.ts +4 -4
- package/packages/list/src/Base/MouseNavigation/index.tizen.tv.ts +1 -1
- package/packages/list/src/Base/MouseNavigation/index.ts +1 -1
- package/packages/list/src/Base/MouseNavigation/index.webos.tv.ts +1 -1
- package/packages/list/src/Base/MouseNavigation/index.webtv.ts +1 -1
- package/packages/list/src/Base/index.ts +1 -1
- package/packages/list/src/Base/interface.ts +39 -39
- package/packages/list/src/BasicList/BasicList.tsx +178 -178
- package/packages/list/src/BasicList/config.ts +13 -13
- package/packages/list/src/CenteredList/CenteredList.tsx +116 -116
- package/packages/list/src/CenteredList/config.ts +13 -13
- package/packages/list/src/CenteredList/controller.ts +46 -46
- package/packages/list/src/CenteredList/interface.ts +10 -10
- package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +173 -173
- package/packages/list/src/EdgeOffsetList/config.ts +13 -13
- package/packages/list/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -54
- package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +122 -122
- package/packages/list/src/FirstOnlyList/config.ts +13 -13
- package/packages/list/src/FirstOnlyList/controller.ts +11 -11
- package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +132 -132
- package/packages/list/src/FirstOnlyVariedList/config.ts +13 -13
- package/packages/list/src/FixedToEndList/FixedToEndList.tsx +125 -125
- package/packages/list/src/FixedToEndList/config.ts +13 -13
- package/packages/list/src/FixedToEndList/controller.ts +44 -44
- package/packages/list/src/UnifiedListController/UnifiedListController.ts +258 -258
- package/packages/list/src/UnifiedListController/UnifiedListControllerBase.ts +241 -241
- package/packages/list/src/UnifiedListController/UnifiedVariedListController.ts +241 -241
- package/packages/list/src/UnifiedListController/interface.ts +81 -81
- package/packages/list/src/__test__/utils.spec.ts +59 -59
- package/packages/list/src/animate.animated.ts +1 -1
- package/packages/list/src/animate.ts +1 -1
- package/packages/list/src/index.ts +1 -1
- package/packages/list/src/interface.ts +48 -48
- package/packages/list/src/mocks/index.tsx +55 -55
- package/packages/list/src/types.ts +132 -132
- package/packages/list/src/utils.ts +142 -142
- package/packages/list/utils/index.ts +1 -1
- package/packages/logger/README.md +117 -117
- package/packages/logger/src/LoggerManager.ts +60 -60
- package/packages/logger/src/LoggerService.ts +43 -43
- package/packages/logger/src/__mocks__/LoggerBase.ts +13 -13
- package/packages/logger/src/index.ts +3 -3
- package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +51 -51
- package/packages/logger/src/loggers/ConsoleLogger/README.md +39 -39
- package/packages/logger/src/loggers/ConsoleLogger/index.ts +1 -1
- package/packages/logger/src/loggers/LoggerBase/LoggerBase.ts +67 -67
- package/packages/logger/src/loggers/LoggerBase/README.md +69 -69
- package/packages/logger/src/loggers/LoggerBase/index.ts +1 -1
- package/packages/logger/src/loggers/SentryLogger/README.md +98 -98
- package/packages/logger/src/loggers/SentryLogger/Sentry.ts +2 -2
- package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +179 -179
- package/packages/logger/src/loggers/SentryLogger/index.ts +2 -2
- package/packages/logger/src/loggers/SentryLogger/mock.ts +6 -6
- package/packages/logger/src/loggers/index.ts +2 -2
- package/packages/logger/src/types.ts +46 -46
- package/packages/logger/src/utils/deviceInfo.ts +25 -25
- package/packages/logger/src/utils/index.ts +1 -1
- package/packages/lottie-animations/README.md +217 -217
- package/packages/lottie-animations/src/LottieAnimation.tsx +125 -125
- package/packages/lottie-animations/src/index.ts +7 -7
- package/packages/menu/README.md +90 -90
- package/packages/menu/WhitelabelMenu/index.ts +1 -1
- package/packages/menu/WhitelabelMenu/interface.ts +2 -2
- package/packages/menu/WhitelabelMenu/styles.ts +2 -2
- package/packages/menu/interface.ts +3 -3
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +211 -211
- package/packages/menu/src/MenuAndContentContainer/index.ts +1 -1
- package/packages/menu/src/MenuAndContentContainer/interface.ts +164 -164
- package/packages/menu/src/MenuAndContentContainer/service.ts +5 -5
- package/packages/menu/src/WhitelabelMenu/SideMenu.scss +41 -41
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.1080.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.1080.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenu.tsx +248 -248
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.scss +56 -56
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.1080.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.1080.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.tsx +78 -78
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_animated.scss +12 -12
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.1080.scss +17 -17
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.scss +17 -17
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/index.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/interface.ts +49 -49
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/rtl.scss +12 -12
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.1080.ts +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.ts +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/styles.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/VisualController.animated.ts +48 -48
- package/packages/menu/src/WhitelabelMenu/VisualController.ts +20 -20
- package/packages/menu/src/WhitelabelMenu/VisualControllerBase.ts +71 -71
- package/packages/menu/src/WhitelabelMenu/_animated.scss +39 -39
- package/packages/menu/src/WhitelabelMenu/_sizes.1080.scss +14 -14
- package/packages/menu/src/WhitelabelMenu/_sizes.scss +14 -14
- package/packages/menu/src/WhitelabelMenu/constants.animated.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/constants.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/index.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/interface.ts +14 -14
- package/packages/menu/src/WhitelabelMenu/rtl.scss +22 -22
- package/packages/menu/src/WhitelabelMenu/sizes.1080.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/sizes.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/styles.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/utils.ts +34 -34
- package/packages/menu/src/index.ts +2 -2
- package/packages/modal-service/README.md +50 -50
- package/packages/modal-service/src/IModal.ts +3 -3
- package/packages/modal-service/src/ModalService.scss +7 -7
- package/packages/modal-service/src/ModalService.styles.1080.scss +2 -2
- package/packages/modal-service/src/ModalService.styles.scss +2 -2
- package/packages/modal-service/src/ModalService.tsx +102 -102
- package/packages/modal-service/src/_sizes.1080.scss +2 -2
- package/packages/modal-service/src/_sizes.scss +2 -2
- package/packages/modal-service/src/index.ts +2 -2
- package/packages/mouse-navigation/README.md +105 -105
- package/packages/mouse-navigation/src/ArrowNavigation/Arrow.tsx +58 -58
- package/packages/mouse-navigation/src/ArrowNavigation/ArrowNavigation.tsx +95 -95
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/Arrow.spec.tsx +35 -35
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/ArrowNavigation.spec.tsx +45 -45
- package/packages/mouse-navigation/src/ArrowNavigation/index.tsx +1 -1
- package/packages/mouse-navigation/src/MouseElementWrapper.tsx +70 -70
- package/packages/mouse-navigation/src/MouseNavigation.tsx +157 -157
- package/packages/mouse-navigation/src/MouseNavigationInterface.ts +8 -8
- package/packages/mouse-navigation/src/index.ts +3 -3
- package/packages/numeric-zapper/README.md +153 -153
- package/packages/numeric-zapper/src/NumericZapper.scss +20 -20
- package/packages/numeric-zapper/src/NumericZapper.styles.1080.scss +2 -2
- package/packages/numeric-zapper/src/NumericZapper.styles.scss +2 -2
- package/packages/numeric-zapper/src/NumericZapper.tsx +257 -257
- package/packages/numeric-zapper/src/ZapperAllower.ts +15 -15
- package/packages/numeric-zapper/src/ZapperService.tsx +8 -8
- package/packages/numeric-zapper/src/_sizes.1080.scss +7 -7
- package/packages/numeric-zapper/src/_sizes.scss +7 -7
- package/packages/numeric-zapper/src/index.ts +4 -4
- package/packages/numeric-zapper/src/interface.ts +1 -1
- package/packages/numeric-zapper/src/styles.ts +1 -1
- package/packages/perf-utils/README.md +7 -7
- package/packages/perf-utils/src/array/filter.ts +1 -1
- package/packages/perf-utils/src/array/find.ts +1 -1
- package/packages/perf-utils/src/array/findIndex.ts +1 -1
- package/packages/perf-utils/src/array/forEach.ts +1 -1
- package/packages/perf-utils/src/array/includes.ts +1 -1
- package/packages/perf-utils/src/array/includesNaN.ts +1 -1
- package/packages/perf-utils/src/array/index.ts +1 -1
- package/packages/perf-utils/src/array/map.ts +1 -1
- package/packages/picker/README.md +70 -70
- package/packages/picker/src/DatePicker.tsx +55 -55
- package/packages/picker/src/ModalPicker/Checkbox.tsx +38 -38
- package/packages/picker/src/ModalPicker/PickerItem.tsx +86 -86
- package/packages/picker/src/ModalPicker/PickerModal.tsx +98 -98
- package/packages/picker/src/ModalPicker/index.ts +1 -1
- package/packages/picker/src/ModalPicker/modalPicker.tsx +48 -48
- package/packages/picker/src/Picker.tsx +127 -127
- package/packages/picker/src/index.ts +3 -3
- package/packages/picker/src/types.ts +25 -25
- package/packages/pin-input/README.md +55 -55
- package/packages/pin-input/src/PinInput.scss +5 -5
- package/packages/pin-input/src/PinInput.tsx +169 -169
- package/packages/pin-input/src/index.ts +1 -1
- package/packages/player-ui/README.md +207 -207
- package/packages/player-ui/src/BackwardButton.tsx +41 -41
- package/packages/player-ui/src/CurrentTime.tsx +56 -56
- package/packages/player-ui/src/Duration.tsx +60 -60
- package/packages/player-ui/src/ForwardButton.tsx +41 -41
- package/packages/player-ui/src/PauseButton.tsx +65 -65
- package/packages/player-ui/src/PlayButton.tsx +57 -57
- package/packages/player-ui/src/PlayPauseButton.tsx +63 -63
- package/packages/player-ui/src/PlayerInteractable.tsx +67 -67
- package/packages/player-ui/src/PlayerTime.tsx +57 -57
- package/packages/player-ui/src/PlayerUI.tsx +267 -267
- package/packages/player-ui/src/RemainingTime.tsx +74 -74
- package/packages/player-ui/src/Seekbar.tsx +276 -276
- package/packages/player-ui/src/Seeking.ts +163 -163
- package/packages/player-ui/src/StopButton.tsx +35 -35
- package/packages/player-ui/src/Subtitles.tsx +151 -151
- package/packages/player-ui/src/index.ts +15 -15
- package/packages/player-ui/src/mocks.ts +65 -65
- package/packages/player-ui/src/timeUtils.ts +142 -142
- package/packages/player-ui/src/types.ts +48 -48
- package/packages/progress-bar/README.md +31 -31
- package/packages/progress-bar/src/ProgressBar.tsx +41 -41
- package/packages/progress-bar/src/index.ts +1 -1
- package/packages/progress-bar/src/interface.ts +14 -14
- package/packages/qr-code/README.md +79 -79
- package/packages/qr-code/src/QRCode.tsx +39 -39
- package/packages/qr-code/src/index.ts +2 -2
- package/packages/qr-code/src/qrGenerator/__external__/constants.ts +23 -23
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.d.ts +31 -31
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.js +618 -618
- package/packages/qr-code/src/qrGenerator/generateQr.ts +7 -7
- package/packages/qr-code/src/qrGenerator/index.ts +3 -3
- package/packages/router/README.md +163 -163
- package/packages/router/src/Route.tsx +166 -166
- package/packages/router/src/Router.tsx +220 -220
- package/packages/router/src/focusActiveRoute.ts +5 -5
- package/packages/router/src/history.ts +31 -31
- package/packages/router/src/index.ts +6 -6
- package/packages/router/src/types.ts +13 -13
- package/packages/router/src/utils.ts +37 -37
- package/packages/runtime-config/README.md +37 -37
- package/packages/runtime-config/src/Config.ts +44 -44
- package/packages/runtime-config/src/index.ts +1 -1
- package/packages/sass-utils/README.md +197 -197
- package/packages/sass-utils/src/box-shadow.scss +5 -5
- package/packages/sass-utils/src/ellipsis.scss +15 -15
- package/packages/sass-utils/src/linear-gradient.scss +48 -48
- package/packages/sass-utils/src/prefix-property.scss +7 -7
- package/packages/sass-utils/src/prefix-value.scss +6 -6
- package/packages/sass-utils/src/prefix.scss +6 -6
- package/packages/sass-utils/src/scale.1080.scss +5 -5
- package/packages/sass-utils/src/scale.720.scss +5 -5
- package/packages/sass-utils/src/transform.scss +5 -5
- package/packages/sass-utils/src/transition.scss +6 -6
- package/packages/scheduler/README.md +55 -55
- package/packages/scheduler/src/Scheduler.ts +43 -43
- package/packages/scheduler/src/Task.ts +72 -72
- package/packages/scheduler/src/index.ts +4 -4
- package/packages/scheduler/src/timeProvider.ts +3 -3
- package/packages/scroll-text/README.md +77 -77
- package/packages/scroll-text/src/Base.tsx +146 -146
- package/packages/scroll-text/src/ScrollText.animated.tsx +80 -80
- package/packages/scroll-text/src/ScrollText.tsx +53 -53
- package/packages/scroll-text/src/ScrollTextBaseClass.tsx +86 -86
- package/packages/scroll-text/src/index.ts +1 -1
- package/packages/scroller/README.md +77 -77
- package/packages/scroller/src/Scroller.tsx +51 -51
- package/packages/scroller/src/index.ts +1 -1
- package/packages/splash/AnimatedSplash.ts +1 -1
- package/packages/splash/AnimatedSplashAnimated.ts +1 -1
- package/packages/splash/AnimatedSplashBasic.ts +1 -1
- package/packages/splash/AutomaticSplashAnimated.ts +1 -1
- package/packages/splash/AutomaticSplashBasic.ts +1 -1
- package/packages/splash/README.md +93 -93
- package/packages/splash/StaticSplash.ts +1 -1
- package/packages/splash/StaticSplashAnimated.ts +1 -1
- package/packages/splash/StaticSplashBasic.ts +1 -1
- package/packages/splash/src/AnimatedSplash.animated.tsx +78 -78
- package/packages/splash/src/AnimatedSplash.basic.tsx +37 -37
- package/packages/splash/src/AutomaticSplash.animated.tsx +20 -20
- package/packages/splash/src/AutomaticSplash.basic.tsx +20 -20
- package/packages/splash/src/Splash.scss +8 -8
- package/packages/splash/src/StaticSplash.animated.tsx +48 -48
- package/packages/splash/src/StaticSplash.basic.tsx +26 -26
- package/packages/splash/src/index.animated.ts +1 -1
- package/packages/splash/src/index.ts +1 -1
- package/packages/splash/src/styles.ts +1 -1
- package/packages/splash/src/types.ts +20 -20
- package/packages/storage/README.md +61 -61
- package/packages/storage/src/CookieStorage/CookieStorage.ts +57 -57
- package/packages/storage/src/CookieStorage/index.ts +1 -1
- package/packages/storage/src/LocalStorage/LocalStorage.ts +58 -58
- package/packages/storage/src/LocalStorage/index.ts +1 -1
- package/packages/storage/src/index.ts +2 -2
- package/packages/storage/src/shared.ts +41 -41
- package/packages/storage/src/types.ts +33 -33
- package/packages/throbber/README.md +53 -53
- package/packages/throbber/src/Throbber.scss +52 -52
- package/packages/throbber/src/Throbber.tsx +19 -19
- package/packages/throbber/src/ThrobberService.tsx +55 -55
- package/packages/throbber/src/controlsHandling.ts +14 -14
- package/packages/throbber/src/index.ts +2 -2
- package/packages/time/README.md +116 -116
- package/packages/time/src/Time.ts +267 -267
- package/packages/time/src/adapters/24iMediaTimeApi.ts +47 -47
- package/packages/time/src/adapters/worldTimeApi.ts +74 -74
- package/packages/time/src/constants.ts +14 -14
- package/packages/time/src/index.ts +1 -1
- package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +43 -43
- package/packages/time/src/services/24iMediaTimeApi/index.ts +6 -6
- package/packages/time/src/services/worldTimeApi/index.ts +7 -7
- package/packages/time/src/services/worldTimeApi/types.ts +75 -75
- package/packages/time/src/services/worldTimeApi/worldTimeApi.ts +77 -77
- package/packages/time/src/types.ts +39 -39
- package/packages/time/src/utils.ts +79 -79
- package/packages/toast/README.md +116 -116
- package/packages/toast/src/Toast/IVisualController.ts +7 -7
- package/packages/toast/src/Toast/Toast.scss +22 -22
- package/packages/toast/src/Toast/Toast.styles.1080.scss +2 -2
- package/packages/toast/src/Toast/Toast.styles.scss +2 -2
- package/packages/toast/src/Toast/Toast.tsx +83 -83
- package/packages/toast/src/Toast/VisualController.animated.ts +20 -20
- package/packages/toast/src/Toast/VisualController.ts +9 -9
- package/packages/toast/src/Toast/_sizes.1080.scss +8 -8
- package/packages/toast/src/Toast/_sizes.scss +8 -8
- package/packages/toast/src/Toast/index.ts +2 -2
- package/packages/toast/src/Toast/styles.ts +1 -1
- package/packages/toast/src/ToastService.scss +8 -8
- package/packages/toast/src/ToastService.styles.1080.scss +2 -2
- package/packages/toast/src/ToastService.styles.scss +2 -2
- package/packages/toast/src/ToastService.tsx +59 -59
- package/packages/toast/src/_sizes.1080.scss +2 -2
- package/packages/toast/src/_sizes.scss +2 -2
- package/packages/toast/src/index.ts +4 -4
- package/packages/toast/src/types.ts +4 -4
- package/packages/types-bigscreen-jsx/README.md +12 -12
- package/packages/types-bigscreen-jsx/global.d.ts +0 -0
- package/packages/types-bigscreen-jsx/index.d.ts +32 -32
- package/packages/types-bigscreen-jsx/src/copyTypes.js +14 -14
- package/packages/utils/README.md +363 -363
- package/packages/utils/src/addClass.ts +9 -9
- package/packages/utils/src/counter.ts +49 -49
- package/packages/utils/src/debounce.ts +54 -54
- package/packages/utils/src/displayToggler.scss +3 -3
- package/packages/utils/src/displayToggler.ts +38 -38
- package/packages/utils/src/elementUtils.ts +105 -105
- package/packages/utils/src/forceReflow.ts +14 -14
- package/packages/utils/src/generateUuid.ts +19 -19
- package/packages/utils/src/index.ts +43 -43
- package/packages/utils/src/keyPress/index.ts +6 -6
- package/packages/utils/src/keyPress/keyPressSimulator.ts +74 -74
- package/packages/utils/src/keyPress/simulateKeyPress.ts +25 -25
- package/packages/utils/src/memoryInfo.ts +21 -21
- package/packages/utils/src/nTimes.ts +9 -9
- package/packages/utils/src/noop.ts +1 -1
- package/packages/utils/src/offsetPosition.ts +56 -56
- package/packages/utils/src/removeClass.ts +9 -9
- package/packages/utils/src/scaledImage.ts +24 -24
- package/packages/utils/src/sizes.1080.ts +1 -1
- package/packages/utils/src/sizes.ts +1 -1
- package/packages/utils/src/stopEvent.ts +10 -10
- package/packages/utils/src/textUtils.ts +57 -57
- package/packages/utils/src/timeConstants.ts +11 -11
- package/packages/utils/src/timers/createInterval.ts +19 -19
- package/packages/utils/src/timers/createTimeout.ts +22 -22
- package/packages/utils/src/timers/index.ts +4 -4
- package/packages/utils/src/timers/runAsync.ts +3 -3
- package/packages/utils/src/timers/types.ts +9 -9
- package/packages/utils/src/wait.ts +3 -3
- package/packages/utils/src/xhr/__mocks__/xhr.ts +29 -29
- package/packages/utils/src/xhr/index.ts +11 -11
- package/packages/utils/src/xhr/xhrSend.ts +141 -141
- package/packages/utils/src/xhr/xhrSendRetry.ts +79 -79
- package/packages/volume-control/README.md +79 -79
- package/packages/volume-control/src/IVolumeControlUI.ts +26 -26
- package/packages/volume-control/src/VolumeControlService.tsx +110 -110
- package/packages/volume-control/src/VolumeControlUI/VisualController.animated.ts +28 -28
- package/packages/volume-control/src/VolumeControlUI/VisualController.ts +3 -3
- package/packages/volume-control/src/VolumeControlUI/VisualControllerBase.ts +26 -26
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.scss +18 -18
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.animated.scss +2 -2
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.scss +1 -1
- package/packages/volume-control/src/VolumeControlUI/VolumeControlUI.tsx +80 -80
- package/packages/volume-control/src/VolumeControlUI/_animated.scss +8 -8
- package/packages/volume-control/src/VolumeControlUI/index.ts +1 -1
- package/packages/volume-control/src/__mocks__/VolumeControlUIMock.tsx +22 -22
- package/packages/volume-control/src/index.ts +2 -2
- package/packages/zapping/README.md +87 -87
- package/packages/zapping/src/ChannelZapping.ts +143 -143
- package/packages/zapping/src/Zapping.tsx +115 -115
- package/packages/zapping/src/index.ts +1 -1
- package/packages/zapping/src/interface.ts +1 -1
- package/utils/create-export-maps/index.ts +3 -3
- package/utils/create-export-maps/src/__tests__/createExportMaps.spec.ts +50 -50
- package/utils/create-export-maps/src/createExportMaps.ts +61 -61
- package/utils/create-package/README.md +39 -39
- package/utils/create-package/src/createPackage.ts +72 -72
- package/utils/create-package/src/index.ts +3 -3
- package/utils/create-package/src/questionnaire/questions.ts +19 -19
- package/utils/create-package/src/settings/Settings.ts +5 -5
- package/utils/create-package/src/types.ts +4 -4
- package/utils/create-package/templates/typescript/README.md +8 -8
- package/utils/create-package/templates/typescript/exports.json +6 -6
- package/utils/release/release.ts +156 -154
- package/utils/run-scripts/index.ts +3 -3
- package/utils/run-scripts/src/__tests__/runScripts.spec.ts +45 -45
- package/utils/run-scripts/src/runScripts.ts +20 -20
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
/*************************************************************************
|
|
2
|
-
* ADOBE CONFIDENTIAL
|
|
3
|
-
* ___________________
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2020 Adobe
|
|
6
|
-
* All Rights Reserved.
|
|
7
|
-
*
|
|
8
|
-
* NOTICE: All information contained herein is, and remains
|
|
9
|
-
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
-
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
-
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
-
* property laws, including trade secret and copyright laws.
|
|
13
|
-
* Dissemination of this information or reproduction of this material
|
|
14
|
-
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
-
* from Adobe.
|
|
16
|
-
**************************************************************************/
|
|
17
|
-
/*
|
|
18
|
-
* MediaSDK - 2.2.2 - 2020-06-24
|
|
19
|
-
* Copyright (c) 2020 Adobe. All Rights Reserved.
|
|
20
|
-
*
|
|
21
|
-
* Copyright for external libraries used in Media SDK
|
|
22
|
-
* JavaScript MD5 1.0.1
|
|
23
|
-
* https://github.com/blueimp/JavaScript-MD5
|
|
24
|
-
*
|
|
25
|
-
* Copyright 2011, Sebastian Tschan
|
|
26
|
-
* https://blueimp.net
|
|
27
|
-
*
|
|
28
|
-
* Licensed under the MIT license:
|
|
29
|
-
* http://www.opensource.org/licenses/MIT
|
|
30
|
-
*
|
|
31
|
-
* Based on
|
|
32
|
-
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
|
33
|
-
* Digest Algorithm, as defined in RFC 1321.
|
|
34
|
-
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
|
|
35
|
-
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
36
|
-
* Distributed under the BSD License
|
|
37
|
-
* See http://pajhome.org.uk/crypt/md5 for more info.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* umdjs (commonjsStrict.js)
|
|
41
|
-
* Copyright (c) the UMD contributors
|
|
42
|
-
* Licensed under the MIT license:
|
|
43
|
-
* https://github.com/umdjs/umd/blob/master/LICENSE.md
|
|
44
|
-
*/
|
|
45
|
-
(function (root, factory) {
|
|
46
|
-
if (typeof define === 'function' && define.amd) {
|
|
47
|
-
define(['exports'], factory);
|
|
48
|
-
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
|
|
49
|
-
factory(exports);
|
|
50
|
-
} else {
|
|
51
|
-
factory(root.ADB = {});
|
|
52
|
-
}
|
|
53
|
-
}(typeof self !== 'undefined' ? self : this, function (exports) {
|
|
54
|
-
var lib = {};
|
|
55
|
-
(function () {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
// Heartbeat core
|
|
59
|
-
!function(a){if(void 0===b)var b={};if(void 0===c)var c={};if(void 0===d)var d={};if(d.radio||(d.radio={}),d.plugin||(d.plugin={}),void 0===e)var e={};e.clock||(e.clock={}),function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b);return(a>>16)+(b>>16)+(c>>16)<<16|65535&c}function c(a,b){return a<<b|a>>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<<c%32,a[14+(c+64>>>9<<4)]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d<a.length;d+=16)i=m,j=n,k=o,l=p,m=e(m,n,o,p,a[d],7,-680876936),p=e(p,m,n,o,a[d+1],12,-389564586),o=e(o,p,m,n,a[d+2],17,606105819),n=e(n,o,p,m,a[d+3],22,-1044525330),m=e(m,n,o,p,a[d+4],7,-176418897),p=e(p,m,n,o,a[d+5],12,1200080426),o=e(o,p,m,n,a[d+6],17,-1473231341),n=e(n,o,p,m,a[d+7],22,-45705983),m=e(m,n,o,p,a[d+8],7,1770035416),p=e(p,m,n,o,a[d+9],12,-1958414417),o=e(o,p,m,n,a[d+10],17,-42063),n=e(n,o,p,m,a[d+11],22,-1990404162),m=e(m,n,o,p,a[d+12],7,1804603682),p=e(p,m,n,o,a[d+13],12,-40341101),o=e(o,p,m,n,a[d+14],17,-1502002290),n=e(n,o,p,m,a[d+15],22,1236535329),m=f(m,n,o,p,a[d+1],5,-165796510),p=f(p,m,n,o,a[d+6],9,-1069501632),o=f(o,p,m,n,a[d+11],14,643717713),n=f(n,o,p,m,a[d],20,-373897302),m=f(m,n,o,p,a[d+5],5,-701558691),p=f(p,m,n,o,a[d+10],9,38016083),o=f(o,p,m,n,a[d+15],14,-660478335),n=f(n,o,p,m,a[d+4],20,-405537848),m=f(m,n,o,p,a[d+9],5,568446438),p=f(p,m,n,o,a[d+14],9,-1019803690),o=f(o,p,m,n,a[d+3],14,-187363961),n=f(n,o,p,m,a[d+8],20,1163531501),m=f(m,n,o,p,a[d+13],5,-1444681467),p=f(p,m,n,o,a[d+2],9,-51403784),o=f(o,p,m,n,a[d+7],14,1735328473),n=f(n,o,p,m,a[d+12],20,-1926607734),m=g(m,n,o,p,a[d+5],4,-378558),p=g(p,m,n,o,a[d+8],11,-2022574463),o=g(o,p,m,n,a[d+11],16,1839030562),n=g(n,o,p,m,a[d+14],23,-35309556),m=g(m,n,o,p,a[d+1],4,-1530992060),p=g(p,m,n,o,a[d+4],11,1272893353),o=g(o,p,m,n,a[d+7],16,-155497632),n=g(n,o,p,m,a[d+10],23,-1094730640),m=g(m,n,o,p,a[d+13],4,681279174),p=g(p,m,n,o,a[d],11,-358537222),o=g(o,p,m,n,a[d+3],16,-722521979),n=g(n,o,p,m,a[d+6],23,76029189),m=g(m,n,o,p,a[d+9],4,-640364487),p=g(p,m,n,o,a[d+12],11,-421815835),o=g(o,p,m,n,a[d+15],16,530742520),n=g(n,o,p,m,a[d+2],23,-995338651),m=h(m,n,o,p,a[d],6,-198630844),p=h(p,m,n,o,a[d+7],10,1126891415),o=h(o,p,m,n,a[d+14],15,-1416354905),n=h(n,o,p,m,a[d+5],21,-57434055),m=h(m,n,o,p,a[d+12],6,1700485571),p=h(p,m,n,o,a[d+3],10,-1894986606),o=h(o,p,m,n,a[d+10],15,-1051523),n=h(n,o,p,m,a[d+1],21,-2054922799),m=h(m,n,o,p,a[d+8],6,1873313359),p=h(p,m,n,o,a[d+15],10,-30611744),o=h(o,p,m,n,a[d+6],15,-1560198380),n=h(n,o,p,m,a[d+13],21,1309151649),m=h(m,n,o,p,a[d+4],6,-145523070),p=h(p,m,n,o,a[d+11],10,-1120210379),o=h(o,p,m,n,a[d+2],15,718787259),n=h(n,o,p,m,a[d+9],21,-343485551),m=b(m,i),n=b(n,j),o=b(o,k),p=b(p,l);return[m,n,o,p]}function j(a){var b,c="";for(b=0;b<32*a.length;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b<c.length;b+=1)c[b]=0;for(b=0;b<8*a.length;b+=8)c[b>>5]|=(255&a.charCodeAt(b/8))<<b%32;return c}function l(a){return j(i(k(a),8*a.length))}function m(a,b){var c,d,e=k(a),f=[],g=[];for(f[15]=g[15]=void 0,e.length>16&&(e=i(e,8*a.length)),c=0;c<16;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c<a.length;c+=1)b=a.charCodeAt(c),e+=d.charAt(b>>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}a.md5=t}(b),function(a){"use strict";var b={};b.startsWith=function(a,b){return 0==a.indexOf(b)},a.StringUtils=b}(b),function(a){"use strict";var b={};b.clone=function(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},b.merge=function(a,c){var d=b.clone(a);for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);return d},b.append=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},a.ObjectUtils=b}(b),function(a){"use strict";function b(a){if(null==a)return!0;for(var b=0;b<a.length;++b)if(isNaN(a[b]))return!1;return!0}function c(a,c){if("string"!=typeof a||"string"!=typeof c)return NaN;var d=a.split("."),e=c.split(".");if(!b(d)||!b(e))return NaN;for(var f=Math.max(d.length,e.length),g=0;g<f;++g){var h=void 0!=d[g]?d[g]:"0",i=void 0!=e[g]?e[g]:"0";if(h=Number(h),i=Number(i),h>i)return 1;if(h<i)return-1}return 0}var d={};d.isGreaterThan=function(a,b){return c(a,b)>0},d.isGreaterThanEqual=function(a,b){return c(a,b)>=0},d.isLessThan=function(a,b){return c(a,b)<0},d.isLessThanEqual=function(a,b){return c(a,b)<=0},d.isSame=function(a,b){return 0===c(a,b)},d.isDifferent=function(a,b){return 0!==c(a,b)},a.VersionUtils=d}(b),function(a){"use strict";function b(a,b,c){this.fn=a,this.ctx=b,this.params=c}b.prototype.run=function(){this.params?this.fn.apply(this.ctx,this.params):this.fn.apply(this.ctx)},a.radio.Command=b}(d),function(a){"use strict";function b(a,b){this._queue=[],this._lastTs=0,this._isSuspended=void 0!==a&&a,this._delay=void 0!==b?b:0}b.prototype.addCommand=function(a){this._queue.push(a),this._drain()},b.prototype.cancelAllCommands=function(){this._queue=[]},b.prototype.isEmpty=function(){return 0===this._queue.length},b.prototype.suspend=function(){this._isSuspended=!0},b.prototype.resume=function(){this._isSuspended=!1,this._drain()},b.prototype.flush=function(){this._isSuspended=!1;for(var a=0;a<this._queue.length;a++){this._queue[a].run()}this._queue=[]},b.prototype._drain=function(){if(!this._isSuspended&&!this._drainInProgress){this._drainInProgress=!0;var a=this;!function b(){var c=a._queue.shift();c?a._runCommand(c,function(){a._isSuspended||b()}):a._drainInProgress=!1}()}},b.prototype._runCommand=function(a,b){function c(){a.run(),null!=b&&b.call(d)}var d=this;if(0==this._lastTs)c();else{var e=(new Date).getTime(),f=e-this._lastTs;this._lastTs=e,f<this._delay?setTimeout(c,this._delay-f):c()}},a.radio.CommandQueue=b}(d),function(a){"use strict";function b(a,b){if(this._name=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._listeners={},this._requests={},this._commands={},this._isShutDown=!1}function c(a,c){if(a===c)return!0;for(var d=(a||"").split(b.SEPARATOR),e=(c||"").split(b.SEPARATOR),f=!0,g=0;g<d.length;g++)f=f&&(d[g]===b.WILDCARD||d[g]===e[g]);return f}b.WILDCARD="*",b.SEPARATOR=":",b.prototype.toString=function(){return"<channel: "+this._name+">"},b.prototype.shutdown=function(){this._isShutDown||(this._logger.debug(d,"#shutdown > Shutting down"),this.off(),this._requests={},this._commands={},this._isShutDown=!0)},b.prototype.on=function(a,b,c){this._isShutDown||(this._listeners[a]||(this._listeners[a]=[]),this._listeners[a].push({fn:b,ctx:c}))},b.prototype.off=function(a,b,c){if(!this._isShutDown){if(b="function"==typeof b?b:null,!a&&null==b&&!c)return void(this._listeners={});if(a)this._removeListener(a,b,c);else for(a in this._listeners)this._listeners.hasOwnProperty(a)&&this._removeListener(a,b,c)}},b.prototype.trigger=function(a){if(!this._isShutDown)for(var b in this._listeners)if(this._listeners.hasOwnProperty(b)&&c(b,a.name))for(var d=this._listeners[b].slice(0),e=0;e<d.length;e++){var f=d[e];f.fn.call(f.ctx,a)}},b.prototype.comply=function(a,b,c){this._isShutDown||(this._commands[a]={cmd:b,ctx:c})},b.prototype.command=function(a,b){if(!this._isShutDown){var c=this._commands[a];if(!c)return void this._logger.warn(d,"#command > No command handler for: "+a);c.cmd.call(c.ctx,b)}},b.prototype.reply=function(a,b,c){this._isShutDown||(this._requests[a]={fn:b,ctx:c})},b.prototype.request=function(a){if(!this._isShutDown){var b=this._requests[a];return b?b.fn.call(b.ctx):(this._logger.warn(d,"#request > No request handler for: "+a),null)}},b.prototype._removeListener=function(a,b,c){b="function"==typeof b?b:null;var d=this._listeners[a];if(d){if(!d.length||null==b&&!c)return void delete this._listeners[a];for(var e=0;e<d.length;e++){var f=d[e];null!==b&&b!==f.fn||c&&c!==f.ctx||this._listeners[a].splice(e,1)}}};var d="radio::Channel";a.radio.Channel=b}(d),function(a){"use strict";function b(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._channels={}}var c=a.radio.Channel;b.prototype.channel=function(a){return this._channels[a]||(this._channels[a]=new c(a,this._logger)),this._channels[a]},b.prototype.shutdown=function(){for(var a in this._channels)this._channels.hasOwnProperty(a)&&this._channels[a].shutdown()},a.radio.Radio=b}(d),function(a){"use strict";function b(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a}a.extend=b}(d),function(a){"use strict";function b(){}b.prototype.write=function(a){throw new Error("Implementation error: Method must be overridden.")},a.ILogWriter=b}(d),function(a){"use strict";function b(){}b.prototype.write=function(a){window.console&&window.console.log&&window.console.log(a)},a.LogWriter=b}(d),function(a){"use strict";function b(){}b.prototype.setLogWriter=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getLogWriter=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getEnabled=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.enable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.disable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.debug=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.info=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.warn=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.error=function(a,b){throw new Error("Implementation error: Method must be overridden.")},a.ILogger=b}(d),function(a){"use strict";function b(){this._logWriter=new d}function c(a){return a<10?"00"+a:a<100?"0"+a:""+a}var d=a.LogWriter;b.prototype.setLogWriter=function(a){if(!a)throw new Error("Reference to the ILogWriter object cannot be NULL");this._logWriter=a,this._enabled=!1},b.prototype.getLogWriter=function(){return this._logWriter},b.prototype.getEnabled=function(){return this._enabled},b.prototype.enable=function(){this._enabled=!0},b.prototype.disable=function(){this._enabled=!1},b.prototype.debug=function(a,b){this._log(a,f,b)},b.prototype.info=function(a,b){this._log(a,e,b)},b.prototype.warn=function(a,b){this._log(a,g,b)},b.prototype.error=function(a,b){this._log(a,h,b)},b.prototype._log=function(a,b,d){if(b==h||this._enabled){var e="",f=new Date;e+="["+f.toTimeString()+"."+c(f.getMilliseconds())+"] ["+b+"] ",e+="["+a+"] "+d,this._logWriter.write(e)}};var e="INFO",f="DEBUG",g="WARN",h="ERROR";a.Logger=b}(d),function(a){"use strict";function b(a,b){this._pluginName=a,this._eventName=b}var c=a.radio.Channel;b.prototype.getPluginName=function(){return this._pluginName},b.prototype.getEventName=function(){return this._eventName},b.prototype.getName=function(){return this._pluginName+c.SEPARATOR+this._eventName},a.Trigger=b}(d),function(a){"use strict";function b(a,b){this.name=a,this.data=b}b.SUCCESS="success",b.ERROR="error",b.createFromTrigger=function(a){return new b(a.getName())},a.Event=b}(d),function(a){"use strict";function b(){this._events={}}b.prototype.addEventListener=function(a,b,c){a&&b&&(c=c||window,this._events[a]=this._events[a]||[],this._events[a].push({cb:b,ctx:c}))},b.prototype.removeEventListener=function(a,b,c){if(a&&b){c=c||window;var d,e,f=!1;for(e in this._events)if(a===e){f=!0;break}if(f){for(d=this._events[e].length-1;d>=0;d--){var g=this._events[e][d];b===g.cb&&c===g.ctx&&this._events[e].splice(d,1)}this._events[e].length||delete this._events[e]}}},b.prototype.dispatchEvent=function(a){if(a.name){var b,c;for(b in this._events)if(this._events.hasOwnProperty(b)&&a.name===b){var d=this._events[b],e=d.slice(0),f=e.length;for(c=0;c<f;c++)e[c].cb.call(e[c].ctx,a);break}}},b.prototype.removeAllListeners=function(a){if(a){var b,c;for(c in this._events)if(this._events.hasOwnProperty(c)){for(b=this._events[c].length-1;b>=0;b--){var d=this._events[c][b];d.ctx===a&&this._events[c].splice(b,1)}this._events[c].length||delete this._events[c]}}else this._events={}},a.EventDispatcher=b}(d),function(a){"use strict";function b(){}function c(a,b){this.url=a||null,this.method=b,this._xmlhttp=null}function d(){d.__super__.constructor.call(this),this._connection=null}var e=a.Event,f=a.EventDispatcher;b.GET="GET",d.RESPONSE="response",d.INSTANCE="instance",a.extend(d,f),d.prototype.close=function(){this.removeAllListeners(null)},d.prototype.load=function(a){a&&a.method&&a.url&&(a._xmlhttp=this._createCORSRequest(a),a._xmlhttp?a._xmlhttp.send():this._loadImage(a))},d.prototype._createCORSRequest=function(a){var b=null;if(void 0!==window.XMLHttpRequest){var c=new window.XMLHttpRequest;"withCredentials"in c&&(b=c,b.open(a.method,a.url,!0))}if(null==b&&void 0!==window.XDomainRequest&&(b=new window.XDomainRequest,b.open(a.method,a.url)),b){var f={};f[d.INSTANCE]=this;var g=this;b.onload=function(){if(b.status&&parseInt(b.status,10)>=400)return this.onerror();f[d.RESPONSE]=b.responseText,g.dispatchEvent(new e(e.SUCCESS,f))},b.onerror=function(){g.dispatchEvent(new e(e.ERROR,f))}}return b},d.prototype._loadImage=function(a){this._connection||(this._connection=new Image,this._connection.alt=""),this._connection.src=a.url;var b={};b[d.RESPONSE]="",b[d.INSTANCE]=this,this.dispatchEvent(new e(e.SUCCESS,b))},a.URLRequestMethod=b,a.URLRequest=c,a.URLLoader=d}(d),function(a){"use strict";var b="2.2.2.230",c="96e624",d={};d.getVersion=function(){return"js-"+b+"-"+c},d.getMajor=function(){return d.getNumberAtPosition(0)},d.getMinor=function(){return d.getNumberAtPosition(1)},d.getMicro=function(){return d.getNumberAtPosition(2)},d.getPatch=function(){return d.getNumberAtPosition(3)},d.getBuild=function(){return c},d.getApiLevel=function(){return 4},d.getNumberAtPosition=function(a){return b.split(".")[a]},a.Version=d}(c),function(a){"use strict";function b(a,b){this._message=a,this._details=b}b.prototype.getMessage=function(){return this._message},b.prototype.getDetails=function(){return this._details},a.ErrorInfo=b}(c),function(a){"use strict";function b(){this.debugLogging=!1}a.HeartbeatConfig=b}(c),function(a){"use strict";function b(){}b.prototype.onError=function(a){},a.HeartbeatDelegate=b}(c),function(a){"use strict";function b(){}b.prototype.configure=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.bootstrap=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.setup=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.destroy=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.enable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.disable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getName=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.isInitialized=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.resolveData=function(a){throw new Error("Implementation error: Method must be overridden.")},a.plugin.IPlugin=b}(d),function(a){"use strict";function b(a,b,c,d){this.trigger=a,this.action=c,this.plugin=b,this._paramMappings={},this.mergeParams(d)}var c=a.plugin.ParamMapping;b.prototype.mergeParams=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b];this._paramMappings[c.getKeyName()]=c}},b.prototype.getParams=function(){var a=[];for(var b in this._paramMappings)this._paramMappings.hasOwnProperty(b)&&a.push(this._paramMappings[b]);return a},b.prototype.addParam=function(a){this._paramMappings[a.getKeyName()]=a},b.prototype.removeParam=function(a,b){var d=new c(a,b);this._paramMappings.hasOwnProperty(d.getKeyName())&&delete this._paramMappings[d.getKeyName()]},a.plugin.Behaviour=b}(d),function(a){"use strict";function b(a,b,d){this._pluginName=a,this._key=b,this._paramName=d||a+c.SEPARATOR+b}var c=a.radio.Channel;b.prototype.getPluginName=function(){return this._pluginName},b.prototype.getKey=function(){return this._key},b.prototype.getKeyName=function(){return this._pluginName+c.SEPARATOR+this._key},b.prototype.getParamName=function(){return this._paramName},a.plugin.ParamMapping=b}(d),function(a){"use strict";function b(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._plugins={},this._behaviours={},this._radio=new d(this._logger),this._dataChannel=this._radio.channel(g),this._ctrlChannel=this._radio.channel(h)}var c=a.Event,d=a.radio.Radio,e=a.radio.Channel,f=a.plugin.Behaviour;b.ERROR="error",b.prototype.addPlugin=function(a){var b=a.getName();this._plugins[b]&&this._logger.warn(i,"#addPlugin > Replacing plugin: "+b),this._plugins[b]=a,a.bootstrap(this)},b.prototype.setupPlugins=function(){for(var a in this._plugins)this._plugins.hasOwnProperty(a)&&this._plugins[a].setup()},b.prototype.pluginExists=function(a){return!!this._plugins[a]},b.prototype.isPluginInitialized=function(a){return this._plugins[a]&&this._plugins[a].isInitialized()},b.prototype.on=function(a,b,c,d){this._dataChannel.on(a+e.SEPARATOR+b,c,d)},b.prototype.off=function(a,b,c,d){var f=a&&b?a+e.SEPARATOR+b:null;this._dataChannel.off(f,c,d)},b.prototype.trigger=function(a){var b=a.name,c=this._behaviours[b];if(c){var d,e,f,g,h,i={},j={};for(d=0;d<c.length;d++)if(f=c[d],g=f.getParams())for(e=0;e<g.length;e++)h=g[e],i[h.getPluginName()]=i[h.getPluginName()]||[],h.key in i[h.getPluginName()]||i[h.getPluginName()].push(h.getKey());for(var k in i)i.hasOwnProperty(k)&&(j[k]=this.request(k,i[k]));for(d=0;d<c.length;d++){f=c[d];var l={_behaviour:f,_eventData:a.data||{}};if(g=f.getParams()){for(e=0;e<g.length;e++)h=g[e],l[h.getParamName()]=j[h.getPluginName()]?j[h.getPluginName()][h.getKey()]:null;this.command(f.plugin.getName(),f.action,l)}}}this._dataChannel.trigger(a)},b.prototype.request=function(a,b){var c=this._plugins[a];return c&&b&&0!=b.length?c.resolveData(b):null},b.prototype.raise=function(a){this._errorInfo=a;var d=new c(b.ERROR,a);this._ctrlChannel.trigger(d)},b.prototype.getErrorInfo=function(){return this._errorInfo},b.prototype.destroy=function(){this._radio.shutdown();for(var a in this._plugins)this._plugins.hasOwnProperty(a)&&this._plugins[a].destroy()},b.prototype.comply=function(a,b,c){this._dataChannel.comply(a.getName()+e.SEPARATOR+b,c,a)},b.prototype.command=function(a,b,c){this._dataChannel.command(a+e.SEPARATOR+b,c)},b.prototype.registerBehaviour=function(a,b,c,d){var e=a.getName(),g=new f(a,b,c,d);this._behaviours[e]=this._behaviours[e]||[],this._behaviours[e].push(g)};var g="data_channel",h="ctrl_channel",i="plugin::PluginManager";a.plugin.PluginManager=b}(d),function(a,b){"use strict";function c(a){this._name=a,this._isInitialized=!1,this._isDestroyed=!1,this._isEnabled=!0,this._dataResolver={},this._logTag="plugin::"+this.getName(),this._logger=new d}var d=a.Logger,e=a.Trigger,f=a.Event,g=b.ErrorInfo;c.INITIALIZED="initialized",c.prototype.configure=function(a){},c.prototype.bootstrap=function(a){this._pluginManager=a,this._isDestroyed&&this._pluginManager.raise(new g("Invalid state.","Plugin already destroyed."))},c.prototype.setup=function(){this._trigger(c.INITIALIZED),this._isInitialized=!0},c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._teardown())},c.prototype.enable=function(){this._isEnabled=!0,this._enabled()},c.prototype.disable=function(){this._isEnabled=!1,this._disabled()},c.prototype.getName=function(){return this._name},c.prototype.getLogger=function(){return this._logger},c.prototype.isInitialized=function(){return this._isInitialized},c.prototype.resolveData=function(a){if(!this._isEnabled||!this._isInitialized)return this._logger.warn(this._logTag,"Unable to retrieve plugin data. Plugin: "+this._name+". Enabled: "+this._isEnabled+". Initialized: "+this._isInitialized+"."),null;if("function"==typeof this._dataResolver)return this._dataResolver.call(this,a);var b=null;if(a)for(var c=0;c<a.length;c++){var d=a[c];this._dataResolver.hasOwnProperty(d)&&(b=b||{},"function"==typeof this._dataResolver[d]?b[d]=this._dataResolver[d].call(this):b[d]=this._dataResolver[d])}return b},c.prototype.toString=function(){return"<plugin: "+this._name+">"},c.prototype._enabled=function(){},c.prototype._disabled=function(){},c.prototype._teardown=function(){},c.prototype._canProcess=function(){return this._isEnabled?!this._isDestroyed||(this._logger.error(this._logTag,"Plugin destroyed."),!1):(this._logger.error(this._logTag,"Plugin disabled."),!1)},c.prototype._trigger=function(a,b){var c=f.createFromTrigger(new e(this.getName(),a));c.data=b,this._pluginManager.trigger(c)},a.plugin.BasePlugin=c}(d,c),function(a){"use strict";function b(a,b,c){this.name=a,this.interval=b,this.isActive=!1,this.repeatCount=void 0!==c?c:e,this._nextTickTimestamp=0,this.reset()}function c(a,b){if(!a)throw new Error("Reference to the ClockService object cannot be NULL");if(this._service=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._isDestroyed=!1,this._timers={};var c=this;this._clock=window.setInterval(function(){c._onTick()},1e3*f)}b.prototype.reset=function(){this.tick=0,this._createdTimestamp=(new Date).getTime(),this._updateNextTickTimestamp()},b.prototype.shouldTick=function(){return(new Date).getTime()>this._nextTickTimestamp-g/2&&(this.tick++,this._updateNextTickTimestamp(),!0)},b.prototype._updateNextTickTimestamp=function(){var a=(new Date).getTime();this._nextTickTimestamp=a+1e3*this.interval-1},c.prototype.createTimer=function(a,c,d){this._timers[a]=new b(a,c,d)},c.prototype.destroyTimer=function(a){delete this._timers[a]},c.prototype.resumeTimer=function(a,b){b=void 0!==b&&b,this._logger.debug(d,"#resumeTimer(name="+a+", reset="+b+")");var c=this._timers[a];c&&(c.isActive=!0,b&&c.reset())},c.prototype.pauseTimer=function(a,b){b=void 0!==b&&b,this._logger.debug(d,"#pauseTimer(name="+a+", reset="+b+")");var c=this._timers[a];c&&(c.isActive=!1,b&&c.reset())},c.prototype.isTimerPaused=function(a){var b=this._timers[a];return!!b&&!b.isActive},c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._timers={},window.clearInterval(this._clock))},c.prototype._onTick=function(){for(var a in this._timers)if(this._timers.hasOwnProperty(a)){var b=this._timers[a];b.isActive&&b.shouldTick()&&(b.interval>1&&this._logger.debug(d,"#_onTick() > "+b.name+"("+b.tick+" | "+b.repeatCount+")"),0!=b.repeatCount?(this._service.onTick(b.name,b.interval,b.tick),b.repeatCount!=e&&b.repeatCount--):this.destroyTimer(b.name))}};var d="service.clock::TimerManager",e=-1,f=.25,g=1e3*f;a.clock.TimerDescriptor=b,a.clock.TimerManager=c}(e),function(a,b,c){"use strict";function d(a){if(d.__super__.constructor.call(this,h),!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._timerManager=new e(this,this._logger),this._setupDataResolver()}var e=c.clock.TimerManager,f=b.StringUtils,g=a.plugin.BasePlugin;a.extend(d,g),d.prototype.bootstrap=function(a){d.__super__.bootstrap.call(this,a),this._pluginManager.comply(this,i,this._cmdCreate),this._pluginManager.comply(this,k,this._cmdResume),this._pluginManager.comply(this,j,this._cmdPause),this._pluginManager.comply(this,l,this._cmdDestroy)},d.prototype._teardown=function(){this._timerManager.destroy()},d.prototype._cmdCreate=function(a){var b=a[o]||s;this._timerManager.createTimer(a[m],a[n],b)},d.prototype._cmdPause=function(a){this._timerManager.pauseTimer(a[m],!!a[q])},d.prototype._cmdResume=function(a){this._timerManager.resumeTimer(a[m],!!a[q])},d.prototype._cmdDestroy=function(a){this._timerManager.destroyTimer(a[m])},d.prototype.onTick=function(a,b,c){a+=".tick";var d={};d[m]=a,d[n]=b,d[p]=c,this._trigger(a,d)},d.prototype._setupDataResolver=function(){var a={},b=this._timerManager;a[r]=function(a){return b.isTimerPaused(a)},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];if(c=c||{},f.startsWith(e,r)){var g=e.split(r+".");g.length>0&&(c[e]=a[r].call(this,g[1]))}}return c}};var h="service.clock",i="create",j="pause",k="resume",l="destroy",m="name",n="interval",o="repeat_count",p="tick",q="reset",r="is_paused",s=-1;c.clock.ClockService=d}(d,b,e),function(a,b,c){"use strict";function d(a,b){if(this._logger=new e,this._pluginManager=new f(this._logger),this._pluginManager.addPlugin(new g(this._logger)),b)for(var c=0;c<b.length;c++)this._pluginManager.addPlugin(b[c]);this._pluginManager.setupPlugins(),this._isDestroyed=!1}var e=a.Logger,f=a.plugin.PluginManager,g=b.clock.ClockService;d.prototype.configure=function(a){if(!a)throw new Error("Configuration object cannot be NULL.");a.debugLogging?this._logger.enable():this._logger.disable(),this._isDestroyed&&this._logger.error(h,"Instance is destroyed.")},d.prototype.destroy=function(){this._isDestroyed||(this._pluginManager.destroy(),this._isDestroyed=!0)};var h="Heartbeat";c.Heartbeat=d}(d,e,c),a.ADB||(a.ADB={}),a.ADB.core||(a.ADB.core=d),a.ADB.va||(a.ADB.va=c),a.ADB.va.utils||(a.ADB.va.utils=b),a.ADB.va.plugins||(a.ADB.va.plugins={})}(this);
|
|
60
|
-
|
|
61
|
-
// VideoPlayerPlugin
|
|
62
|
-
!function(a){if(void 0===b)var b={};!function(a){"use strict";var b={};b.ASSET_TYPE_VOD="vod",b.ASSET_TYPE_LIVE="live",b.ASSET_TYPE_LINEAR="linear",a.AssetType=b}(b),function(a){"use strict";function b(){this.playerName=null,this.name=null,this.position=null,this.startTime=null}b.prototype.toString=function(){return"playerName="+this.playerName+", name="+this.name+", position="+this.position+", startTime="+this.startTime},a.AdBreakInfo=b}(b),function(a){"use strict";function b(){this.id=null,this.name=null,this.length=null,this.position=null,this.granularTracking=!0}b.prototype.toString=function(){return"id="+this.id+", name="+this.name+", length="+this.length+", position="+this.position+", granularTracking="+this.granularTracking},a.AdInfo=b}(b),function(a){"use strict";function b(){this.name=null,this.length=null,this.position=null,this.startTime=null}b.prototype.toString=function(){return"name="+this.name+", length="+this.length+", position="+this.position+", startTime="+this.startTime},a.ChapterInfo=b}(b),function(a){"use strict";function b(){this.bitrate=null,this.fps=null,this.droppedFrames=null,this.startupTime=null}b.prototype.toString=function(){return"bitrate="+this.bitrate+", fps="+this.fps+", droppedFrames="+this.droppedFrames+", startupTime="+this.startupTime},a.QoSInfo=b}(b),function(a){"use strict";function b(){this.playerName=null,this.id=null,this.name=null,this.length=null,this.playhead=null,this.mediaType=null,this.streamType=null,this.resumed=!1}b.prototype.toString=function(){return"playerName="+this.playerName+", id="+this.id+", name="+this.name+", length="+this.length+", playhead="+this.playhead+", mediaType="+this.mediaType+", streamType="+this.streamType+", resumed="+this.resumed},a.VideoInfo=b}(b),function(a){"use strict";function b(){this.debugLogging=!1}a.VideoPlayerPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.getVideoInfo=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getAdBreakInfo=function(){return null},b.prototype.getAdInfo=function(){return null},b.prototype.getChapterInfo=function(){return null},b.prototype.getQoSInfo=function(){return null},a.VideoPlayerPluginDelegate=b}(b),function(a,b){"use strict";function c(a){if(c.__super__.constructor.call(this,h),!a)throw new Error("PlayerPlugin delegate cannot be NULL.");this._delegate=a,this._isTrackingSessionActive=!1,this._isTrackingSessionStarted=!1,this._setupDataResolver()}var d=a.plugin.ParamMapping,e=a.Trigger,f=a.plugin.BasePlugin,g=b.VideoPlayerPluginConfig;a.extend(c,f),c.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof g))throw new Error("Expected config data to be instance of VideoPlayerPluginConfig.");a.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure(debugLogging="+a.debugLogging+")")},c.prototype.bootstrap=function(a){c.__super__.bootstrap.call(this,a),this._registerCommands(),this._registerBehaviours()},c.prototype._cmdVideoIdleStart=function(a){this._logger.info(this._logTag,"#_cmdVideoIdleStart()"),this._videoIdle=!0},c.prototype._cmdVideoIdleResume=function(a){this._logger.info(this._logTag,"#_cmdVideoIdleResume()"),this._videoIdle&&(this._trigger(p),this._trigger(q),a.isInAd&&(this._trigger(x),this._isTrackingAdBreak=!0),a.isInAd&&(this._trigger(z),this._isTrackingAd=!0),a.isInChapter&&this._trigger(G),this._trigger(u)),this._videoIdle=!1},c.prototype.trackSessionStart=function(){if(this._logger.info(this._logTag,"#trackSessionStart()"),this._canProcess()){if(!this._isTrackingSessionActive)return void this._logger.warn(this._logTag,"#trackSessionStart() > No active tracking session.");if(this._isTrackingSessionStarted)return void this._logger.info(this._logTag,"#trackSessionStart() > Tracking session already started.");this._trigger(p),this._isTrackingSessionStarted=!0;var a=this._dataResolver(["video.resumed"]);a.hasOwnProperty("video.resumed")&&a["video.resumed"]&&this._trigger(q)}},c.prototype.trackVideoLoad=function(){this._logger.info(this._logTag,"#trackVideoLoad()"),this._canProcess()&&(this._isTrackingAdBreak=!1,this._isTrackingAd=!1,this._contentStarted=!1,this._isPaused=!0,this._isBuffering=!1,this._isSeeking=!1,this._playheadTimer=null,this._previousPlayhead=-1,this._stalledPlayheadCount=0,this._playheadStalled=!1,this._videoIdle=!1,this._trigger(m),this._isTrackingSessionActive=!0,this._isTrackingSessionStarted=!1)},c.prototype.trackVideoUnload=function(){if(this._logger.info(this._logTag,"#trackVideoUnload()"),this._canProcess()){if(!this._isTrackingSessionActive)return void this._logger.warn(this._logTag,"#trackVideoUnload() > No active tracking session.");this._stopPlayheadTimer(),this._trigger(n),this._isTrackingSessionActive=!1,this._isTrackingSessionStarted=!1,this._contentStarted=!1}},c.prototype.beginReporting=function(){this._logger.info(this._logTag,"#beginReporting()"),this._canProcess()&&this._startSessionIfNeeded("beginReporting")&&this._trigger(N)},c.prototype.trackPlay=function(){this._logger.info(this._logTag,"#trackPlay()"),this._canProcess()&&this._startSessionIfNeeded("trackPlay")&&this._allowPlayerStateChange()&&(this._isPaused=!1,this._trigger(u),this._startPlayheadTimer())},c.prototype.trackPause=function(){if(this._logger.info(this._logTag,"#trackPause()"),this._canProcess()&&this._startSessionIfNeeded("trackPause")&&this._allowPlayerStateChange()){this._stopPlayheadTimer();var a={};a[P]=!1,this._isPaused=!0,this._trigger(v,a)}},c.prototype.trackBufferStart=function(){this._logger.info(this._logTag,"#trackBufferStart()"),this._canProcess()&&this._startSessionIfNeeded("trackBufferStart")&&this._allowPlayerStateChange()&&(this._stopPlayheadTimer(),this._isBuffering=!0,this._trigger(C))},c.prototype.trackBufferComplete=function(){this._logger.info(this._logTag,"#trackBufferComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackBufferComplete")&&this._allowPlayerStateChange()&&(this._isBuffering=!1,this._trigger(D),this._startPlayheadTimer())},c.prototype.trackSeekStart=function(){this._logger.info(this._logTag,"#trackSeekStart()"),this._canProcess()&&this._startSessionIfNeeded("trackSeekStart")&&this._allowPlayerStateChange()&&(this._stopPlayheadTimer(),this._isSeeking=!0,this._trigger(E))},c.prototype.trackSeekComplete=function(){this._logger.info(this._logTag,"#trackSeekComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackSeekComplete")&&this._allowPlayerStateChange()&&(this._isSeeking=!1,this._trigger(F),this._startPlayheadTimer())},c.prototype.trackComplete=function(a,b){if(this._logger.info(this._logTag,"#trackComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackComplete")){if(this._stopPlayheadTimer(),this._videoIdle)return this._logger.info(this._logTag,"#trackComplete() > Video session is already in Idle State."),void(a&&a());var c={};c[O]=a,b=void 0===b||!!b,b?this._trigger(r,c):(this._trigger(s),this._trigger(o,c))}},c.prototype.trackTimedMetadata=function(a){this._logger.info(this._logTag,"#trackComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackTimedMetadata")&&this._trigger(t,a)},c.prototype.trackChapterStart=function(){this._logger.info(this._logTag,"#trackChapterStart()"),this._canProcess()&&this._startSessionIfNeeded("#trackChapterStart")&&this._trigger(G)},c.prototype.trackChapterComplete=function(){this._logger.info(this._logTag,"#trackChapterComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackChapterComplete")&&this._trigger(H)},c.prototype.trackChapterSkip=function(){this._logger.info(this._logTag,"#trackChapterSkip()"),this._canProcess()&&this._startSessionIfNeeded("trackChapterSkip")&&this._trigger(I)},c.prototype.trackAdBreakStart=function(){this._logger.info(this._logTag,"#trackAdBreakStart()"),this._canProcess()&&this._startSessionIfNeeded("trackAdBreakStart")&&(this._trigger(x),this._isTrackingAdBreak=!0)},c.prototype.trackAdBreakComplete=function(){this._logger.info(this._logTag,"#trackAdBreakComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackAdBreakComplete")&&(this._trigger(y),this._isTrackingAdBreak=!1)},c.prototype.trackAdStart=function(){this._logger.info(this._logTag,"#trackAdStart()"),this._canProcess()&&this._startSessionIfNeeded("trackAdStart")&&(this._trigger(z),this._isTrackingAd=!0)},c.prototype.trackAdComplete=function(){this._logger.info(this._logTag,"#trackAdComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackAdComplete")&&(this._trigger(A),this._isTrackingAd=!1)},c.prototype.trackAdSkip=function(){this._logger.info(this._logTag,"#trackAdSkip()"),this._canProcess()&&this._startSessionIfNeeded("trackAdSkip")&&(this._trigger(B),this._isTrackingAd=!1)},c.prototype.trackBitrateChange=function(){this._logger.info(this._logTag,"#trackBitrateChange()"),this._canProcess()&&this._startSessionIfNeeded("trackBitrateChange")&&this._trigger(J)},c.prototype.trackVideoPlayerError=function(a){if(this._logger.info(this._logTag,"#trackVideoPlayerError(errorId="+a+")"),this._startSessionIfNeeded("trackVideoPlayerError")){var b={};b[Q]=l,b[R]=a,this._trigger(K,b)}},c.prototype.trackApplicationError=function(a){if(this._logger.info(this._logTag,"#trackApplicationError(errorId="+a+")"),this._startSessionIfNeeded("trackApplicationError")){var b={};b[Q]=k,b[R]=a,this._trigger(K,b)}},c.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleVideoIdleStart",this._cmdVideoIdleStart),this._pluginManager.comply(this,"handleVideoIdleResume",this._cmdVideoIdleResume)},c.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new e(j,L),this,"handleVideoIdleStart"),this._pluginManager.registerBehaviour(new e(j,M),this,"handleVideoIdleResume",[new d(i,"ad.isInAdBreak","isInAdBreak"),new d(i,"ad.isInAd","isInAd"),new d(i,"chapter.isInChapter","isInChapter")])},c.prototype._setupDataResolver=function(){function a(){return g.video?g.video:(g.video=h._delegate.getVideoInfo(),h._logger.info(h._logTag,"Data from delegate > VideoInfo: "+g.video),g.video)}function b(){return g.ad?g.ad:(g.ad=h._delegate.getAdInfo(),h._logger.info(h._logTag,"Data from delegate > AdInfo: "+g.ad),g.ad)}function c(){return g.pod?g.pod:(g.pod=h._delegate.getAdBreakInfo(),h._logger.info(h._logTag,"Data from delegate > AdBreakInfo: "+g.pod),g.pod)}function d(){return g.chapter?g.chapter:(g.chapter=h._delegate.getChapterInfo(),h._logger.info(h._logTag,"Data from delegate > ChapterInfo: "+g.chapter),g.chapter)}function e(){return g.qos?g.qos:(g.qos=h._delegate.getQoSInfo(),h._logger.info(h._logTag,"Data from delegate > QoSInfo: "+g.qos),g.qos)}var f={},g={},h=this;f["video.id"]=function(){var b=a(),c=b?b.id:null;return h._logger.debug(h._logTag,"Resolving video.id: "+c),c},f["video.name"]=function(){var b=a(),c=b?b.name:null;return h._logger.debug(h._logTag,"Resolving video.name: "+c),c},f["video.length"]=function(){var b=a(),c=b?b.length:NaN;return h._logger.debug(h._logTag,"Resolving video.length: "+c),c},f["video.playerName"]=function(){var b=a(),c=b?b.playerName:null;return h._logger.debug(h._logTag,"Resolving video.playerName: "+c),c},f["video.mediaType"]=function(){var b=a(),c=b?b.mediaType:null;return h._logger.debug(h._logTag,"Resolving video.mediaType: "+c),c},f["video.streamType"]=function(){var b=a(),c=b?b.streamType:null;return h._logger.debug(h._logTag,"Resolving video.streamType: "+c),c},f["video.playhead"]=function(){var b=a(),c=b?b.playhead:NaN;return h._logger.debug(h._logTag,"Resolving video.playhead: "+c),c},f["video.resumed"]=function(){var b=a(),c=!!b&&b.resumed;return h._logger.debug(h._logTag,"Resolving video.resumed: "+c),c},f["video.playheadStalled"]=function(){return this._playheadStalled},f["pod.name"]=function(){var a=c(),b=a?a.name:null;return h._logger.debug(h._logTag,"Resolving pod.name: "+b),b},f["pod.playerName"]=function(){var a=c(),b=a?a.playerName:null;return h._logger.debug(h._logTag,"Resolving pod.playerName: "+b),b},f["pod.position"]=function(){var a=c(),b=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving pod.position: "+b),b},f["pod.startTime"]=function(){var a=c(),b=a?a.startTime:NaN;return h._logger.debug(h._logTag,"Resolving pod.startTime: "+b),b},f["ad.isInAd"]=function(){var a=b(),c=null!=a;return h._logger.debug(h._logTag,"Resolving ad.isInAd: "+c),c},f["ad.isInAdBreak"]=function(){var a=c(),b=null!=a;return h._logger.debug(h._logTag,"Resolving ad.isInAdBreak: "+b),b},f["ad.id"]=function(){var a=b(),c=a?a.id:null;return h._logger.debug(h._logTag,"Resolving ad.id: "+c),c},f["ad.name"]=function(){var a=b(),c=a?a.name:null;return h._logger.debug(h._logTag,"Resolving ad.name: "+c),c},f["ad.length"]=function(){var a=b(),c=a?a.length:NaN;return h._logger.debug(h._logTag,"Resolving ad.length: "+c),c},f["ad.position"]=function(){var a=b(),c=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving ad.position: "+c),c},f["ad.granularTracking"]=function(){var a=b(),c=!!a&&a.granularTracking;return h._logger.debug(h._logTag,"Resolving ad.granularTracking: "+c),c},f["ad.trackingInterval"]=function(){var a=T;return h._logger.debug(h._logTag,"Resolving ad.trackingInterval: "+a),a},f["chapter.isInChapter"]=function(){var a=d(),b=null!=a;return h._logger.debug(h._logTag,"Resolving chapter.isInChapter: "+b),b},f["chapter.name"]=function(){var a=d(),b=a?a.name:null;return h._logger.debug(h._logTag,"Resolving chapter.name: "+b),b},f["chapter.length"]=function(){var a=d(),b=a?a.length:NaN;return h._logger.debug(h._logTag,"Resolving chapter.length: "+b),b},f["chapter.position"]=function(){var a=d(),b=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving chapter.position: "+b),b},f["chapter.startTime"]=function(){var a=d(),b=a?a.startTime:NaN;return h._logger.debug(h._logTag,"Resolving chapter.startTime: "+b),b},f["qos.bitrate"]=function(){var a=e(),b=a?a.bitrate:NaN;return h._logger.debug(h._logTag,"Resolving qos.bitrate: "+b),b},f["qos.fps"]=function(){var a=e(),b=a?a.fps:NaN;return h._logger.debug(h._logTag,"Resolving qos.fps: "+b),b},f["qos.droppedFrames"]=function(){var a=e(),b=a?a.droppedFrames:NaN;return h._logger.debug(h._logTag,"Resolving qos.droppedFrames: "+b),b},f["qos.startupTime"]=function(){var a=e(),b=a?1e3*a.startupTime:NaN;return h._logger.debug(h._logTag,"Resolving qos.startupTime: "+b),b},this._dataResolver=function(a){if(!a||0==a.length)return null;g={};for(var b=null,c=0;c<a.length;c++){var d=a[c];b=b||{},b[d]=f.hasOwnProperty(d)?f[d].call(this):null}return b}},c.prototype._trackPlayheadStall=function(){this._canProcess()&&(this._playheadStalled||(this._logger.info(this._logTag,"#_trackPlayheadStall()"),this._stalledPlayheadCount=0,this._playheadStalled=!0,this._trigger(v)))},c.prototype._trackExitStall=function(){this._canProcess()&&(this._stalledPlayheadCount=0,!this._playheadStalled||this._isPaused||this._isSeeking||this._isBuffering||(this._logger.info(this._logTag,"#_trackExitStall()"),this._playheadStalled=!1,this._trigger(u)))},c.prototype._startPlayheadTimer=function(){var a=this;this._playheadTimer||this._isPaused||this._isSeeking||this._isBuffering||(this._playheadTimer=setInterval(function(){if(a._canProcess()){var b=a._dataResolver(["ad.isInAd","video.playhead"]);if(a._isTrackingAdBreak)a._playheadStalled&&a._trackExitStall();else{var c=b["video.playhead"];c!=a._previousPlayhead?a._trackExitStall():a._previousPlayhead>=0&&c==a._previousPlayhead&&++a._stalledPlayheadCount==U&&a._trackPlayheadStall(),c!=a._previousPlayhead&&c>0&&!a._contentStarted&&(a._isPaused||a._isBuffering||a._isSeeking||(a._logger.info(a._logTag,"#_playheadTimer playhead progress to: "+c),a._trigger(w),a._contentStarted=!0)),a._previousPlayhead=c}}},S))},c.prototype._stopPlayheadTimer=function(){this._playheadTimer&&(clearInterval(this._playheadTimer),this._playheadTimer=null),this._trackExitStall()},c.prototype._startSessionIfNeeded=function(a){return this._isTrackingSessionActive?(this._isTrackingSessionStarted||(this._logger.info(this._logTag,"#"+a+"() > Tracking session auto-start."),this.trackSessionStart()),!0):(this._logger.warn(this._logTag,"#"+a+"() > No active tracking session."),!1)},c.prototype._allowPlayerStateChange=function(){return!(this._isTrackingAdBreak&&!this._isTrackingAd)||(this._logger.info(this._logTag,"_allowPlayerStateChange Player plugin does not allow player state changes when in Adbreak and not in Ad."),!1)};var h="player",i=h,j="adobe-heartbeat",k="sourceErrorExternal",l="sourceErrorSDK",m="video_load",n="video_unload",o="video_session_end",p="video_start",q="video_resume",r="video_complete",s="video_skip",t="timed_metadata",u="play",v="pause",w="content_start",x="adbreak_start",y="adbreak_complete",z="ad_start",A="ad_complete",B="ad_skip",C="buffer_start",D="buffer_complete",E="seek_start",F="seek_complete",G="chapter_start",H="chapter_complete",I="chapter_skip",J="bitrate_change",K="track_error",L="video_idle_start",M="video_idle_resume",N="video_begin_reporting",O="callback",P="filter_report",Q="source",R="error_id",S=1001,T=1,U=2;b.VideoPlayerPlugin=c}(a.ADB.core,b),a.ADB.va.plugins.videoplayer||(a.ADB.va.plugins.videoplayer=b)}(this);
|
|
63
|
-
|
|
64
|
-
// AdobeHeartbeatPlugin
|
|
65
|
-
!function(a){if(void 0===b)var b={};b.clock||(b.clock={}),b.context||(b.context={}),b.filter||(b.filter={}),b.model||(b.model={}),b.network||(b.network={}),function(a,b){"use strict";function c(a,b,c,d,e){if(!b)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=b,!a)throw new Error("Reference to the pluginManager object cannot be NULL");if(this._pluginManager=a,!e)throw new Error("Reference to the logger object cannot be NULL");this._logTag="ah::Timer."+c,this._logger=e,this._isDestroyed=!1,this._createTimer(c,d),this._installHandlers()}var d=a.Event;c.KEY_NAME="name",c.KEY_INTERVAL="interval",c.KEY_RESET="reset",c.prototype.resume=function(a){this._logger.debug(this._logTag,"Starting timer: "+this._name);var b={};b[c.KEY_NAME]=e+"."+this._name,b[c.KEY_RESET]=a,this._pluginManager.command(f,i,b)},c.prototype.pause=function(a){this._logger.debug(this._logTag,"Stopping timer: "+this._name);var b={};b[c.KEY_NAME]=e+"."+this._name,b[c.KEY_RESET]=a,this._pluginManager.command(f,h,b)},c.prototype.destroy=function(){if(!this._isDestroyed){this._isDestroyed=!0,this._uninstallHandlers();var a={};a[c.KEY_NAME]=e+"."+this._name,this._pluginManager.command(f,j,a)}},c.prototype.setInterval=function(a){var b=k+"."+e+"."+this._name,c=this._pluginManager.request(f,[b])[b];this.pause(!0),this._createTimer(this._name,a),c||this.resume(!0)},c.prototype._cmdResume=function(a){var b=!1;null!=a&&a.hasOwnProperty(c.KEY_RESET)&&(b=a[c.KEY_RESET]),this.resume(b)},c.prototype._cmdPause=function(a){var b=!1;null!=a&&a.hasOwnProperty(c.KEY_RESET)&&(b=a[c.KEY_RESET]),this.pause(b)},c.prototype._onTick=function(a,b){this._channel.trigger(new d("clock:"+this._name+".tick",b))},c.prototype._installHandlers=function(){this._channel.comply("clock:"+this._name+".resume",this._cmdResume,this),this._channel.comply("clock:"+this._name+".pause",this._cmdPause,this),this._pluginManager.on(f,e+"."+this._name+".tick",this._onTick,this)},c.prototype._uninstallHandlers=function(){this._channel.off(null,null,this),this._pluginManager.off(null,null,null,this)},c.prototype._createTimer=function(a,b){this._name=a,this._interval=b;var d={};d[c.KEY_NAME]=e+"."+this._name,d[c.KEY_INTERVAL]=this._interval,this._pluginManager.command(f,g,d)};var e="heartbeat",f="service.clock",g="create",h="pause",i="resume",j="destroy",k="is_paused";b.clock.Timer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,f,h,d)}var d=a.Event,e=b.clock.Timer;a.extend(c,e),c.prototype._onCheckStatusComplete=function(a){var b=a.data[l];if(this._logger.debug(this._logTag,"#_onCheckStatusComplete(interval="+b+")"),b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed.");b>g?(this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Interval value too large: "+b),this.setInterval(g)):(this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval changed to: "+b),this.setInterval(b))}else this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Invalid interval value."),this.setInterval(h)},c.prototype._getSettings=function(a){this._logger.debug(this._logTag,"#_getSettings()"),this._channel.trigger(new d(i))},c.prototype._installHandlers=function(){c.__super__._installHandlers.call(this),this._channel.on(j,this._getSettings,this),this._channel.on(k,this._onCheckStatusComplete,this),this._channel.reply(l,function(){return this._interval},this)};var f="check_status",g=600,h=180,i="clock:check_status.tick",j="clock:check_status.get_settings",k="net:check_status_complete",l="check_status_interval";b.clock.CheckStatusTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d),this._doNotOverrideInterval=!1}var d=b.clock.Timer;a.extend(c,d),c.prototype._onCheckStatusComplete=function(a){var b=a.data[g];if(this._logger.debug(this._logTag,"#_onCheckStatusComplete(interval="+b+")"),this._doNotOverrideInterval)this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed. (doNotOverrideInterval = true)");else if(b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed.");this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval changed to: "+b),this.setInterval(b)}else this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Invalid interval value."),this.setInterval(f)},c.prototype._onUpdateReportingInterval=function(a){var b=a.data[g];if(this._doNotOverrideInterval=!!a.data[h],this._logger.debug(this._logTag,"#_onUpdateReportingInterval(interval="+b+", doNotOverrideInterval="+this._doNotOverrideInterval+")"),b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onUpdateReportingInterval() > Interval value not changed.");this._logger.debug(this._logTag,"#_onUpdateReportingInterval() > Interval changed to: "+b),this.setInterval(b)}else this._logger.warn(this._logTag,"#_onUpdateReportingInterval() > Invalid interval value."),this.setInterval(f)},c.prototype._installHandlers=function(){c.__super__._installHandlers.call(this),this._channel.on(j,this._onCheckStatusComplete,this),this._channel.on(i,this._onUpdateReportingInterval,this),this._channel.reply(g,function(){return this._interval},this)};var e="reporting",f=10,g="reporting_interval",h="do_not_override_interval",i="reporting:update_interval",j="net:check_status_complete";b.clock.ReportingTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d)}var d=b.clock.Timer;a.extend(c,d);var e="idle",f=1800;b.clock.IdleTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d)}var d=b.clock.Timer;a.extend(c,d);var e="flush_filter",f=.25;b.clock.FlushFilterTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,c){if(!a)throw new Error("Reference to the pluginManager object cannot be NULL");if(!b)throw new Error("Reference to the channel object cannot be NULL");if(!c)throw new Error("Reference to the logger object cannot be NULL");this._isDestroyed=!1,this._reportingTimer=new f(a,b,c),this._checkStatusTimer=new d(a,b,c),this._flushFilterTimer=new e(a,b,c),this._idleTimer=new g(a,b,c)}var d=b.clock.CheckStatusTimer,e=b.clock.FlushFilterTimer,f=b.clock.ReportingTimer,g=b.clock.IdleTimer;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._reportingTimer.destroy(),this._checkStatusTimer.destroy(),this._flushFilterTimer.destroy(),this._idleTimer.destroy())},b.clock.Clock=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){this.value=a,this.hint=b}function d(a){this.realm=a,this.data={}}c.HINT_SHORT="short",d.prototype.setField=function(a,b,d){this.data[a]=new c(b,d)},d.prototype._createAccessor=function(a,b,c){var d=this;return function(){return arguments.length&&(d[a]=arguments[0],d.setField(b,arguments[0],c)),d[a]}},b.model.Dao=d,b.model.DaoField=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"asset"),this.adId=this._createAccessor("_adId","ad_id",null),this.sid=this._createAccessor("_sid","ad_sid",null),this.resolver=this._createAccessor("_resolver","resolver",null),this.podId=this._createAccessor("_podId","pod_id",null),this.podPosition=this._createAccessor("_podPosition","pod_position",null),this.podOffset=this._createAccessor("_podOffset","pod_offset",null),this.podName=this._createAccessor("_podName","pod_name",null),this.adLength=this._createAccessor("_adLength","ad_length",null),this.adName=this._createAccessor("_adName","ad_name",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.adId(a.adId()),this.sid(a.sid()),this.resolver(a.resolver()),this.podId(a.podId()),this.podPosition(a.podPosition()),this.podOffset(a.podOffset()),this.podName(a.podName()),this.adLength(a.adLength()),this.adName(a.adName())}else this.adId(""),this.sid(""),this.resolver(""),this.podId(""),this.podPosition(""),this.podOffset(0),this.podName(""),this.adLength(0),this.adName("")}var d=b.model.Dao;a.extend(c,d),b.model.AdDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"sc"),this.reportSuiteId=this._createAccessor("_reportSuiteId","rsid",null),this.trackingServer=this._createAccessor("_trackingServer","tracking_server",null),this.ssl=this._createAccessor("_ssl","ssl",e.HINT_SHORT),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.reportSuiteId(a.reportSuiteId()),this.trackingServer(a.trackingServer()),this.ssl(a.ssl())}else this.reportSuiteId(""),this.trackingServer(""),this.ssl(0)}var d=b.model.Dao,e=b.model.DaoField;a.extend(c,d),b.model.AdobeAnalyticsDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.id=this._createAccessor("_id","chapter_id",null),this.sid=this._createAccessor("_sid","chapter_sid",null),this.name=this._createAccessor("_name","chapter_name",null),this.position=this._createAccessor("_position","chapter_pos",null),this.length=this._createAccessor("_length","chapter_length",null),this.offset=this._createAccessor("_offset","chapter_offset",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.id(a.id()),this.sid(a.sid()),this.name(a.name()),this.position(a.position()),this.length(a.length()),this.offset(a.offset())}else this.id(""),this.sid(""),this.name(""),this.position(0),this.length(0),this.offset(0)}var d=b.model.Dao;a.extend(c,d),b.model.ChapterDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"asset"),this.type=this._createAccessor("_type","type",null),this.videoId=this._createAccessor("_videoId","video_id",null),this.publisher=this._createAccessor("_publisher","publisher",null),this.adData=this._createAccessor("_adData","ad_data",null),this.chapterData=this._createAccessor("_chapterData","chapter_data",null),this.length=this._createAccessor("_length","length",null),this.name=this._createAccessor("_name","name",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type()),this.name(a.name()),this.videoId(a.videoId()),this.publisher(a.publisher()),this.length(a.length());var b=a.adData()?new e(a.adData()):null;this.adData(b);var d=a.chapterData()?new f(a.chapterData()):null;this.chapterData(d)}else this.type(""),this.name(""),this.videoId(""),this.publisher(""),this.length(0),this.adData(null),this.chapterData(null)}var d=b.model.Dao,e=b.model.AdDao,f=b.model.ChapterDao;a.extend(c,d),c.TYPE_AD="ad",c.TYPE_MAIN_CONTENT="main",b.model.AssetDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"event"),this.type=this._createAccessor("_type","type",null),this.duration=this._createAccessor("_duration","duration",null),this.playhead=this._createAccessor("_playhead","playhead",null),this.id=this._createAccessor("_id","id",null),this.source=this._createAccessor("_source","source",null),this.ts=this._createAccessor("_ts","ts",null),this.prevTs=this._createAccessor("_prevTs","prev_ts",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type()),this.duration(a.duration()),this.playhead(a.playhead()),this.id(a.id()),this.source(a.source()),this.ts(a.ts()),this.prevTs(a.prevTs())}else this.type(""),this.duration(0),this.playhead(0),this.id(""),this.source(""),this.ts(0),this.prevTs(-1)}var d=b.model.Dao;a.extend(c,d),c.EVENT_TYPE_AA_START="aa_start",c.EVENT_TYPE_AA_AD_START="aa_ad_start",c.EVENT_TYPE_START="start",c.EVENT_TYPE_RESUME="resume",c.EVENT_TYPE_CHAPTER_START="chapter_start",c.EVENT_TYPE_CHAPTER_COMPLETE="chapter_complete",c.EVENT_TYPE_CHAPTER_SKIP="chapter_skip",c.EVENT_TYPE_PLAY="play",c.EVENT_TYPE_PAUSE="pause",c.EVENT_TYPE_STALL="stall",c.EVENT_TYPE_BUFFER="buffer",c.EVENT_TYPE_BITRATE_CHANGE="bitrate_change",c.EVENT_TYPE_ERROR="error",c.EVENT_TYPE_COMPLETE="complete",c.EVENT_TYPE_SKIP="skip",c.EVENT_TYPE_END="end",b.model.EventDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.bitrate=this._createAccessor("_bitrate","bitrate",null),this.fps=this._createAccessor("_fps","fps",null),this.droppedFrames=this._createAccessor("_droppedFrames","dropped_frames",null),this.startupTime=this._createAccessor("_startup_time","startup_time",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.bitrate(a.bitrate()),this.fps(a.fps()),this.droppedFrames(a.droppedFrames()),this.startupTime(a.startupTime()),this.isStartupTimeOverridden=a.isStartupTimeOverridden}else this.bitrate(0),this.fps(0),this.droppedFrames(0),this.startupTime(0),this.isStartupTimeOverridden=!1}var d=b.model.Dao;a.extend(c,d),b.model.QoSDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"sp"),this.ovp=this._createAccessor("_ovp","ovp",null),this.sdk=this._createAccessor("_sdk","sdk",null),this.channel=this._createAccessor("_channel","channel",null),this.playerName=this._createAccessor("_playerName","player_name",null),this.libVersion=this._createAccessor("_libVersion","hb_version",null),this.apiLevel=this._createAccessor("_apiLevel","hb_api_lvl",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.ovp(a.ovp()),this.sdk(a.sdk()),this.channel(a.channel()),this.playerName(a.playerName()),this.libVersion(a.libVersion()),this.apiLevel(a.apiLevel())}else this.ovp(e),this.sdk(e),this.channel(e),this.playerName(""),this.libVersion(""),this.apiLevel(0)}var d=b.model.Dao;a.extend(c,d);var e="unknown";b.model.ServiceProviderDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"event"),this.sessionId=this._createAccessor("_sessionId","sid",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.sessionId(a.sessionId())}else this.sessionId(null)}var d=b.model.Dao;a.extend(c,d),b.model.SessionDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.type=this._createAccessor("_type","type",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type())}else this.type(null)}var d=b.model.Dao;a.extend(c,d),b.model.StreamDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"user"),this.analyticsVisitorId=this._createAccessor("_analyticsVisitorId","aid",null),this.marketingCloudVisitorId=this._createAccessor("_marketingCloudVisitorId","mid",null),this.visitorId=this._createAccessor("_visitorId","id",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.analyticsVisitorId(a.analyticsVisitorId()),this.marketingCloudVisitorId(a.marketingCloudVisitorId()),this.visitorId(a.visitorId())}else this.analyticsVisitorId(null),this.marketingCloudVisitorId(null),this.visitorId(null)}var d=b.model.Dao;a.extend(c,d),b.model.UserDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"aam"),this.audienceManagerBlob=this._createAccessor("_audienceManagerBlob","blob",null),this.audienceManagerLocationHint=this._createAccessor("_audienceManagerLocationHint","loc_hint",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.audienceManagerBlob(a.audienceManagerBlob()),this.audienceManagerLocationHint(a.audienceManagerLocationHint())}else this.audienceManagerBlob(null),this.audienceManagerLocationHint(null)}var d=b.model.Dao;a.extend(c,d),b.model.AudienceManagerDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,c,i,j){this.eventData=new e,this.eventData.type(b),this.eventData.duration(0),this.eventData.ts((new Date).getTime()),this.eventData.playhead(c),this.assetData=new f(a._assetData),this.streamData=new g(a._streamData),this.qosData=new h(a._qosData),this.cuserData=d.clone(a._cuserData),this.meta=i,this.callback=j,this.filterReport=!0}var d=a.ObjectUtils,e=b.model.EventDao,f=b.model.AssetDao,g=b.model.StreamDao,h=b.model.QoSDao;b.model.TrackItem=c}(a.ADB.va.utils,b),function(a,b){"use strict";function c(a,b,c,i,j,k){this.adobeAnalyticsData=a,this.userData=b,this.aamData=c,this.serviceProviderData=i,this.sessionData=j,this.eventData=new e(k.eventData),this.assetData=new f(k.assetData),this.streamData=new g(k.streamData),this.qosData=new h(k.qosData),this.cuserData=d.clone(k.cuserData),this.meta=d.clone(k.meta),this.callback=k.callback,this.filterReport=k.filterReport}var d=a.ObjectUtils,e=b.model.EventDao,f=b.model.AssetDao,g=b.model.StreamDao,h=b.model.QoSDao;b.model.CUserDao;b.model.Report=c}(a.ADB.va.utils,b),function(a){"use strict";function b(){}b.prototype.serializeReport=function(a){},b.prototype.serializeDao=function(a){},b.prototype.serializeMap=function(a){},b.prototype.serializeNumber=function(a,b,c,d){},b.prototype.serializeString=function(a,b,c,d){},a.model.ISerializer=b}(b),function(a,b){"use strict";function c(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a}var d=b.model.Dao,e=b.model.DaoField,f=b.model.ISerializer;a.extend(c,f),c.prototype.serializeReport=function(a){var b=[];return b.push(this.serializeDao(a.adobeAnalyticsData)),b.push(this.serializeDao(a.userData)),b.push(this.serializeDao(a.aamData)),b.push(this.serializeMap(a.cuserData,"cuser")),b.push(this.serializeDao(a.serviceProviderData)),b.push(this.serializeDao(a.sessionData)),b.push(this.serializeDao(a.eventData)),b.push(this.serializeDao(a.assetData)),b.push(this.serializeDao(a.streamData)),b.push(this.serializeDao(a.qosData)),b.push(this.serializeMap(a.meta,"meta")),{serializedOutput:b.filter(function(a){return!!a}).join("&"),callback:a.callback}},c.prototype.serializeDao=function(a){return this._processDao(a).filter(function(a){return!!a}).join("&")},c.prototype.serializeMap=function(a,b){var c=[],d=b||"meta";for(var e in a)a.hasOwnProperty(e)&&a[e]&&c.push("s:"+d+":"+e+"="+window.encodeURIComponent(a[e]));return c.join("&")},c.prototype.serializeNumber=function(a,b,c,d){var f=h;return null==b||isNaN(b)?null:(d===e.HINT_SHORT&&(f=i),f+":"+c+":"+a+"="+Math.floor(b))},c.prototype.serializeString=function(a,b,c,d){return b?j+":"+c+":"+a+"="+window.encodeURIComponent(b):null},c.prototype._processDao=function(a){var b=[];for(var c in a.data)if(a.data.hasOwnProperty(c)){var e=a.data[c],f=e.value,h=e.hint,i=null,j=a.realm;if(null==f)continue;"number"==typeof f?i=this.serializeNumber(c,f,j,h):"string"==typeof f?i=this.serializeString(c,f,j,h):f instanceof d?i=this.serializeDao(f):this._logger.warn(g,"#_processDao() > Unable to serialize DAO. Field: "+c+". Value: "+f+"."),i&&b.push(i)}return b};var g="ah::QuerystringSerializer",h="l",i="h",j="s";b.model.QuerystringSerializer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(!a)throw new Error("Reference to the data object cannot be NULL");if(this._data=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b}c.prototype.parse=function(){var a,b,c,j,k,l;if(window.DOMParser){l=(new window.DOMParser).parseFromString(this._data,"text/xml")}else l=new window.ActiveXObject("Microsoft.XMLDOM"),l.async=!1,l.loadXML(this._data);var m;m=parseInt(l.getElementsByTagName("trackingInterval")[0].childNodes[0].nodeValue,10),m&&(a=m),m=parseInt(l.getElementsByTagName("setupCheckInterval")[0].childNodes[0].nodeValue,10),m&&(b=m),m=parseInt(l.getElementsByTagName("trackExternalErrors")[0].childNodes[0].nodeValue,10),m&&(c=1==m),l.getElementsByTagName("trackingDisabled")[0]&&(m=parseInt(l.getElementsByTagName("trackingDisabled")[0].childNodes[0].nodeValue,10),j=1==m),l.getElementsByTagName("nielsenEnabled")[0]?(m=parseInt(l.getElementsByTagName("nielsenEnabled")[0].childNodes[0].nodeValue,10),k=1==m):k=!0;var n={};return n[e]=a,n[f]=b,n[g]=c,n[i]=j,n[h]=k,this._logger.debug(d,"#parse() > Obtained configuration settings."),n};var d="ah::SettingsParser",e="reporting_interval",f="check_status_interval",g="track_external_errors",h="nielsen_enabled",i="tracking_disabled";b.network.SettingsParser=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(this._trackingServer=null,this._checkStatusServer=null,this._publisher=null,this._isConfigured=!1,this._isDestroyed=!1,this._beginReporting=!1,this._sendingRequest=!1,this._requestsQueue=[],this._quietMode=!1,this._prevReportSent=null,!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._serializer=new i(b),this._installEventListeners()}var d=a.Event,e=a.URLRequestMethod,f=a.URLRequest,g=a.URLLoader,h=b.network.SettingsParser,i=b.model.QuerystringSerializer;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(j,"#destroy()"),this._uninstallEventListeners())},c.prototype._onApiConfig=function(a){var b=a.data;this._logger.debug(j,"#_onApiConfig(sb_server="+b[k]+", check_status_server="+b[l]+", publisher="+b[m]+", quiet_mode="+b[n]+", ssl="+b[o]+")"),this._trackingServer=this._updateRequestProtocol(b[k],b[o]),this._checkStatusServer=this._updateRequestProtocol(b[l],b[o]),this._publisher=b[m],this._quietMode=b[n],this._isConfigured=!0},c.prototype._onBeginReporting=function(a){this._logger.debug(j,"#_onBeginReporting()"),this._beginReporting=!0,this._sendNextRequest(),this._onClockCheckStatusTick()},c.prototype._onFilterReportAvailable=function(a){var b=a.data;if(!this._isConfigured)return void this._logger.warn(j,"#_onFilterReportAvailable() > Unable to send request: not configured.");var c=b[p];if(this._prevReportSent&&this._prevReportSent.eventData&&c.eventData&&this._prevReportSent.eventData.playhead==c.eventData.playhead&&this._prevReportSent.eventData.ts==c.eventData.ts&&this._prevReportSent.eventData.prevTs==c.eventData.prevTs&&this._prevReportSent.eventData.type==c.eventData.type)return void this._logger.debug(j,"#_onFilterReportAvailable() > Duplicate heartbeat report not sent for URL:\n"+e);this._prevReportSent=c;var d=this._serializer.serializeReport(c),e=this._trackingServer+"/?"+d.serializedOutput;this._processRequest(e,d.callback)},c.prototype._processRequest=function(a,b){this._requestsQueue.push({url:a,callback:b}),this._sendNextRequest()},c.prototype._sendNextRequest=function(){if(!this._beginReporting)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we have not started reporting.");if(this._sendingRequest)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we are currently sending a request.");var a=this._requestsQueue.shift();if(!a)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we have no requests to send.");this._sendingRequest=!0,this._logger.debug(j,"#_sendNextRequest() > "+a.url);var b=this,c=new g,h=function(){c.close(),a.callback&&a.callback.call(null),b._sendingRequest=!1,b._sendNextRequest()},i=function(a){h()},k=function(a){b._logger.warn(j,"#_onFilterReportAvailable() > Failed to send heartbeat report."),h()};if(!this._quietMode){c.addEventListener(d.SUCCESS,i,this),c.addEventListener(d.ERROR,k,this);var l=new f(a.url,e.GET);c.load(l)}},c.prototype._onClockCheckStatusTick=function(a){function b(a){if(a.data)try{var b=new h(a.data.response,i._logger),c=b.parse();c?i._channel.trigger(new d(u,c)):i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to parse the config. settings.")}catch(a){i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to parse the config. settings.")}n.close()}function c(a){i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to obtain the config. settings."),n.close()}if(!this._isConfigured)return void this._logger.warn(j,"#_onClockCheckStatusTick() > Unable to send request: not configured.");if(!this._publisher)return void this._logger.warn(j,"#_onClockCheckStatusTick() > Publisher is NULL.");if(!this._beginReporting)return void this._logger.debug(j,"#_onClockCheckStatusTick() > Exiting as we have not started reporting.");var i=this,k=this._publisher.replace(/[^a-zA-Z0-9]+/,"-").toLocaleLowerCase(),l=this._checkStatusServer+k+".xml?r="+(new Date).getTime(),m=new f(l,e.GET),n=new g;n.addEventListener(d.SUCCESS,b,this),n.addEventListener(d.ERROR,c,this),this._logger.debug(j,"#_onClockCheckStatusTick() > Get new settings from: "+l),n.load(m)},c.prototype._updateRequestProtocol=function(a,b){var c=a;return 0===c.indexOf("http://")?c=c.slice(7):0===c.indexOf("https://")&&(c=c.slice(8)),b?"https://"+c:"http://"+c},c.prototype._installEventListeners=function(){this._channel.on(q,this._onApiConfig,this),this._channel.on(r,this._onBeginReporting,this),this._channel.on(s,this._onFilterReportAvailable,this),this._channel.on(t,this._onClockCheckStatusTick,this)},c.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)};var j="ah::Network",k="tracking_server",l="check_status_server",m="publisher",n="quiet_mode",o="ssl",p="report",q="api:config",r="api:video_begin_reporting",s="filter:data_available",t="clock:check_status.tick",u="net:check_status_complete";b.network.Network=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._isDestroyed=!1,this._isBufferingInProgress=!1,this._reportBuffer={},this._tsHistory={},this._workQueue=new i,this._installEventListeners()}function d(a){var b=[];return a&&a.forEach(function(a){a.eventData.type()==k.EVENT_TYPE_PAUSE||a.eventData.type()==k.EVENT_TYPE_STALL||a.eventData.type()==k.EVENT_TYPE_BUFFER?(!a.filterReport||a.eventData.duration()>u)&&b.push(a):b.push(a)}),b}function e(a){var b=-1,c=-1,d=[];return a.forEach(function(a){a.eventData.type()==k.EVENT_TYPE_START?a.assetData.type()==l.TYPE_MAIN_CONTENT?-1==b?b=d.push(a)-1:(a.eventData.prevTs(-1),d[b]=a):-1==c?c=d.push(a)-1:(a.eventData.prevTs(-1),d[c]=a):d.push(a)}),d}function f(a){var b=[];return a.forEach(function(c){if(c.eventData.type()==k.EVENT_TYPE_PLAY){if(c.eventData.duration()>t)b.push(c);else if(0==c.eventData.duration()&&c.assetData.type()==l.TYPE_MAIN_CONTENT){var d=g(a);d.indexOf(c)==d.length-1&&b.push(c)}}else b.push(c)}),b}function g(a){var b=[];return a.forEach(function(a){a.eventData.type()!=k.EVENT_TYPE_PLAY&&a.eventData.type()!=k.EVENT_TYPE_BUFFER&&a.eventData.type()!=k.EVENT_TYPE_START||b.push(a)}),b}var h=a.radio.Command,i=a.radio.CommandQueue,j=a.Event,k=b.model.EventDao,l=b.model.AssetDao;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(w,"#destroy()"),this._uninstallEventListeners(),this.clear())},c.prototype.clear=function(){this._logger.debug(w,"#clear()"),this._workQueue.cancelAllCommands(),this._reportBuffer={},this._tsHistory={},this._isBufferingInProgress=!1},c.prototype.flush=function(){this._workQueue.addCommand(new h(this._flushBufferReport,this))},c.prototype._bufferReport=function(a){if(!this._isDestroyed){var b=a[q];if(b){var c=b.sessionData.sessionId();this._reportBuffer[c]=this._reportBuffer[c]||[],this._reportBuffer[c].push(b)}if(!this._isBufferingInProgress){this._isBufferingInProgress=!0;var d={};d[p]=!0,d[r]=1,this._channel.command(s,d)}}},c.prototype._flushBufferReport=function(){function a(a){if(a)for(var c=0;c<a.length;c++){var d=a[c],e=d.sessionData.sessionId();b._tsHistory[e]=b._tsHistory[e]||{};var f=d.eventData.type()+"."+(d.assetData.type()==l.TYPE_AD?d.assetData.adData().adId():d.assetData.videoId());b._tsHistory[e].hasOwnProperty(f)&&d.eventData.prevTs(b._tsHistory[e][f]),b._tsHistory[e][f]=d.eventData.ts()}}if(!this._isDestroyed){var b=this;for(var c in this._reportBuffer)if(this._reportBuffer.hasOwnProperty(c)){var g=f(e(d(this._reportBuffer[c])));a(g);for(var h=0;h<g.length;h++){var i=g[h],k={};k[q]=i,this._channel.trigger(new j(n,k))}}this._reportBuffer={};var m=this._channel.request(v),o=this._tsHistory[m]||{};this._tsHistory={},this._tsHistory[m]=o,this._isBufferingInProgress=!1}},c.prototype._onContextReportAvailable=function(a){var b=a.data;this._workQueue.addCommand(new h(this._bufferReport,this,[b]))},c.prototype._onClockFlushFilterTick=function(a){this.flush()},c.prototype._installEventListeners=function(){this._channel.on(m,this._onContextReportAvailable,this),this._channel.on(o,this._onClockFlushFilterTick,this)},c.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)};var m="context:report_available",n="filter:data_available",o="clock:flush_filter.tick",p="reset",q="report",r="repeat_count",s="clock:flush_filter.resume",t=250,u=250,v="session_id",w="ah::ReportFilter";b.filter.ReportFilter=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){this._onFail={fn:a,ctx:b}}var d=a.ErrorInfo;c.prototype.validateFields=function(a,b){if(!a)return this._fail("Data cannot be null");if(b)for(var c=0;c<b.length;c++){var d=b[c];switch(d){case"videoId":if(!a.hasOwnProperty("videoId"))return this._fail("The ID for the main video must be specified.");if("string"!=typeof a.videoId)return this._fail("The ID for the main video must be a String.");if(""===a.videoId)return this._fail("The ID for the main video cannot be an empty string.");break;case"streamType":if(!a.hasOwnProperty("streamType"))return this._fail("The stream type for the main video must be specified.");if("string"!=typeof a.streamType)return this._fail("The stream type for the main video must be a String.");if(""===a.streamType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"videoLength":if(!a.hasOwnProperty("videoLength"))return this._fail("The length of the main video must be specified.");if("number"!=typeof a.videoLength)return this._fail("The length of the main video must be a Number.");if(isNaN(a.videoLength))return this._fail("The length of the main video cannot be NaN.");break;case"playhead":if(!a.hasOwnProperty("playhead"))return this._fail("The playhead for the main video must be specified.");if("number"!=typeof a.playhead)return this._fail("The playhead for the main video must be a Number.");if(isNaN(a.playhead))return this._fail("The playhead for the main video cannot be NaN.");break;case"playerName":if(!a.hasOwnProperty("playerName"))return this._fail("The player name for the main video must be specified.");if("string"!=typeof a.playerName)return this._fail("The player name for the main video must be a String.");if(""===a.playerName)return this._fail("The player name for the main video cannot be an empty string.");break;case"rsid":if(!a.hasOwnProperty("rsid"))return this._fail("account (rsid) is required and has to be set in the AppMeasurement instance.");if("string"!=typeof a.rsid)return this._fail("account (rsid) of the AppMeasurement instance must be a String.");if(""===a.rsid)return this._fail("account (rsid) of the AppMeasurement instance cannot be an empty string.");break;case"trackingServer":if(!a.hasOwnProperty("trackingServer"))return this._fail("trackingServer is required and has to be set in the AppMeasurement instance.");if("string"!=typeof a.trackingServer)return this._fail("trackingServer of the AppMeasurement instance must be a String.");if(""===a.trackingServer)return this._fail("trackingServer of the AppMeasurement instance cannot be an empty string.");break;case"podPlayerName":if(!a.hasOwnProperty("podPlayerName"))return this._fail("The player name for the ad-break must be specified.");if("string"!=typeof a.podPlayerName)return this._fail("The player name for the ad-break must be a String.");if(""===a.podPlayerName)return this._fail("The player name for the ad-break cannot be an empty string.");break;case"podPosition":if(!a.hasOwnProperty("podPosition"))return this._fail("Position (index) of the ad-break must be specified.");if("number"!=typeof a.podPosition)return this._fail("Position (index) of the ad-break must be a Number.");if(isNaN(a.podPosition))return this._fail("Position (index) of the ad-break cannot be NaN.");break;case"adId":if(!a.hasOwnProperty("adId"))return this._fail("The ad ID must be specified.");if("string"!=typeof a.adId)return this._fail("The ad ID must be a String.");if(""===a.adId)return this._fail("The ad ID cannot be an empty string.");break;case"adPosition":if(!a.hasOwnProperty("adPosition"))return this._fail("Position (index) of the ad must be specified.");if("number"!=typeof a.adPosition)return this._fail("Position (index) of the ad must be a Number.");if(isNaN(a.adPosition))return this._fail("Position (index) of the ad cannot be NaN.");break;case"chapterPosition":if(!a.hasOwnProperty("chapterPosition"))return this._fail("Position (index) of the chapter must be specified.");if("number"!=typeof a.chapterPosition)return this._fail("Position (index) of the chapter must be a Number.");if(isNaN(a.chapterPosition))return this._fail("Position (index) of the chapter cannot be NaN.");break;case"chapterOffset":if(!a.hasOwnProperty("chapterOffset"))return this._fail("Chapter start-time (offset) must be specified.");if("number"!=typeof a.chapterOffset)return this._fail("Chapter start-time (offset) must be a Number.");if(isNaN(a.chapterOffset))return this._fail("Chapter start-time (offset) cannot be NaN.");break;case"chapterLength":if(!a.hasOwnProperty("chapterLength"))return this._fail("The length of the chapter must be specified.");if("number"!=typeof a.chapterLength)return this._fail("The length of the chapter must be a Number.");if(isNaN(a.chapterLength))return this._fail("The length of the chapter cannot be NaN.");break;default:return this._fail("Unable to validate unknown parameter: "+d)}}return!0},c.prototype._fail=function(a){var b=new d("Invalid input data",a);return this._onFail.fn&&this._onFail.fn.call(this._onFail.ctx,b),!1},b.context.InputDataValidator=c}(a.ADB.va,b),function(a,b){"use strict";function c(a,b){if(!b)throw new Error("Reference to the logger object cannot be NULL");if(this._logger=b,!a)throw new Error("Reference to the context object cannot be NULL");this._context=a}var d=b.model.Report;c.prototype.createReportForItem=function(a){return this._logger.debug(e,"Creating report for item: "+a.eventData.type()),new d(this._context._adobeAnalyticsData,this._context._userData,this._context._aamData,this._context._serviceProviderData,this._context._sessionData,a)};var e="ah::ReportFactory";b.context.ReportFactory=c}(a.ADB.core,b),function(a,b,c,d){"use strict";function e(a,b){if(!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._lastInBandItem=null,this._stashedLastInBandItem=null,this._stashedMainMetadata=null,this._autoComputedStartupTime=0,this._reportingInterval=ma,this._assetData=null,this._streamData=null,this._qosData=null,this._sessionData=null,this._cuserData=null,this._adobeAnalyticsData=new j,this._serviceProviderData=new k,this._userData=new l,this._aamData=new m,this._isTrackingSessionActive=!1,this._isVideoComplete=!1,this._isDestroyed=!1,this._doNotOverrideEventDuration=!1,this._reportFactory=new u(this,this._logger),this._inputDataValidator=new v(function(a){this._logger.error(w,a.getMessage()+" | "+a.getDetails()),this._channel.trigger(new h(y,a))},this),this._trackExternalErrors=!0,this._installEventListeners()}var f=c.md5,g=c.ObjectUtils,h=a.Event,i=d.model.SessionDao,j=d.model.AdobeAnalyticsDao,k=d.model.ServiceProviderDao,l=d.model.UserDao,m=d.model.AudienceManagerDao,n=d.model.EventDao,o=d.model.AssetDao,p=d.model.StreamDao,q=d.model.QoSDao,r=d.model.AdDao,s=d.model.ChapterDao,t=d.model.TrackItem,u=d.context.ReportFactory,v=d.context.InputDataValidator;e.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(w,"#destroy()"),this._uninstallEventListeners())},e.prototype._onApiAnalyticsStart=function(a){this._logger.debug(w,"#_onApiAnalyticsStart()");var b=a.data;if(this._checkCall("_onApiAnalyticsStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._userData.visitorId(b.vid),this._userData.analyticsVisitorId(b.aid),this._userData.marketingCloudVisitorId(b.mid),this._aamData.audienceManagerBlob(b.blob),this._aamData.audienceManagerLocationHint(b.loc_hint),b.customerIDs&&(this._cuserData=b.customerIDs),this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_AA_START,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._cuserData=null,this._sendHit(c)}},e.prototype._onApiAnalyticsAdStart=function(a){this._logger.debug(w,"#_onApiAnalyticsAdStart()");var b=a.data;if(this._checkCall("_onApiAnalyticsAdStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_AA_AD_START,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiVideoLoad=function(a){var b=a.data;this._logger.debug(w,"#_onApiVideoLoad(rsid="+b.rsid+", aa_trackingServer="+b.trackingServer+")"),this._resetInternalState(),this._inputDataValidator.validateFields(b,["rsid","trackingServer"])&&(this._sessionData.sessionId(this._generateSessionId()),this._isTrackingSessionActive=!0)},e.prototype._onApiVideoUnload=function(a){if(this._logger.debug(w,"#_onApiVideoUnload()"),!this._isTrackingSessionActive)return void this._logger.debug(w,"#_onApiVideoUnload() > No active tracking session.");this._isTrackingSessionActive=!1},e.prototype._onApiVideoStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiVideoStart(id="+b.videoId+", name="+b.videoName+", length="+b.videoLength+", type="+b.streamType+", playerName="+b.playerName+")"),this._checkCall("_onApiVideoStart")&&this._inputDataValidator.validateFields(b,["videoId","streamType","videoLength","playhead","playerName"])){this._lastInBandItem=null,this._stashedLastInBandItem=null,this._adobeAnalyticsData.reportSuiteId(b.rsid),this._adobeAnalyticsData.trackingServer(b.trackingServer),this._adobeAnalyticsData.ssl(Number(b.useSsl)),this._serviceProviderData.ovp(b.ovp),this._serviceProviderData.sdk(b.sdk),this._serviceProviderData.channel(b.channel),this._serviceProviderData.libVersion(b.version),this._serviceProviderData.apiLevel(b.apiLvl),this._serviceProviderData.playerName(b.playerName),this._assetData.adData(null),this._assetData.chapterData(null),this._assetData.videoId(b.videoId),this._assetData.length(b.videoLength),this._assetData.type(o.TYPE_MAIN_CONTENT),this._assetData.publisher(b.publisher),this._assetData.name(b.videoName),this._streamData.type(b.streamType),this._updateQoSInfo(b);var c=b.metaNielsen?g.merge(b.metaVideo,b.metaNielsen):b.metaVideo,d=new t(this,n.EVENT_TYPE_START,b.playhead,c,b._eventData[E]);this._sendHit(d)}},e.prototype._onApiVideoResume=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiVideoResume(id="+b.videoId+", name="+b.videoName+", length="+b.videoLength+", type="+b.streamType+", playerName="+b.playerName+")"),this._checkCall("_onApiVideoResume")&&this._inputDataValidator.validateFields(b,["videoId","streamType","videoLength","playhead","playerName"])){this._assetData.videoId(b.videoId),this._assetData.length(b.videoLength),this._assetData.type(o.TYPE_MAIN_CONTENT),this._assetData.name(b.videoName),this._streamData.type(b.streamType);var c=new t(this,n.EVENT_TYPE_RESUME,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiVideoSessionEnd=function(a){this._logger.debug(w,"#_onApiVideoSessionEnd()");var b=a.data;if(this._checkCall("_onApiVideoSessionEnd")&&this._inputDataValidator.validateFields(b,["playhead"])){var c=new t(this,n.EVENT_TYPE_END,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c)}},e.prototype._onApiVideoComplete=function(a){this._logger.debug(w,"#_onApiVideoComplete()");var b=a.data;if(this._checkCall("_onApiVideoComplete")){var c=new t(this,n.EVENT_TYPE_COMPLETE,this._assetData.length(),null,b._eventData[E]);this._sendHit(c),this._isVideoComplete=!0}},e.prototype._onApiVideoSkip=function(a){this._logger.debug(w,"#_onApiVideoSkip()");var b=a.data;if(this._checkCall("_onApiVideoSkip")){var c=new t(this,n.EVENT_TYPE_SKIP,b.playhead,null,b._eventData[E]);this._sendHit(c),this._isVideoComplete=!0}},e.prototype._onApiPlay=function(a){this._logger.debug(w,"#_onApiPlay()");var b=a.data;if(this._checkCall("_onApiPlay")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_PLAY,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiPause=function(a){this._logger.debug(w,"#_onApiPause()");var b=a.data;if(this._checkCall("_onApiPause")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=b.playheadStalled?n.EVENT_TYPE_STALL:n.EVENT_TYPE_PAUSE,d=new t(this,c,b.playhead,null,b._eventData[E]);b._eventData.hasOwnProperty(F)&&(d.filterReport=b._eventData[F]),this._sendHit(d)}},e.prototype._onApiBufferStart=function(a){this._logger.debug(w,"#_onApiBufferStart()");var b=a.data;if(this._checkCall("_onApiBufferStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_BUFFER,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiAdBreakStart=function(a){this._logger.debug(w,"#_onApiAdBreakStart()");var b=a.data;this._checkCall("_onApiAdBreakStart")&&this._inputDataValidator.validateFields(b,["playhead"])&&(this._flushLastInbandItem(b),this._updateLastInbandItemToBuffering())},e.prototype._onApiAdBreakComplete=function(a){this._logger.debug(w,"#_onApiAdBreakComplete()");var b=a.data;this._checkCall("_onApiAdBreakComplete")&&this._inputDataValidator.validateFields(b,["playhead"])&&(this._flushLastInbandItem(b),this._restoreLastInbandItem())},e.prototype._onApiAdStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiAdStart(id="+b.adId+", player_name="+b.podPlayerName+", parent_name="+this._assetData.videoId()+", pod_pos="+b.adPosition+")"),this._checkCall("_onApiAdStart")&&this._inputDataValidator.validateFields(b,["playhead","podPosition","podPlayerName","adId","adPosition"])){var c=new r;c.adId(b.adId),c.adName(b.adName),c.adLength(b.adLength),c.resolver(b.podPlayerName),c.podId(f(this._assetData.videoId())+"_"+b.podPosition),c.podPosition(b.adPosition+""),c.podName(b.podName),c.podOffset(b.podSecond),c.sid(this._generateSessionId()),this._assetData.adData(c),this._assetData.type(o.TYPE_AD),this._updateQoSInfo(b);var d=g.merge(b.metaVideo,b.metaAd);d=b.metaNielsen?g.merge(d,b.metaNielsen):d,d=b.metaAdNielsen?g.merge(d,b.metaAdNielsen):d;var e=new t(this,n.EVENT_TYPE_START,b.playhead,d,b._eventData[E]);this._sendHit(e),this._restoreLastInbandItem();if(!!b.adGranularTracking){var h=b.adTrackingInterval?b.adTrackingInterval:this._reportingInterval;this._updateReportingInterval(h,!0)}}},e.prototype._onApiAdComplete=function(a){this._logger.debug(w,"#_onApiAdComplete()");var b=a.data;if(this._checkCall("_onApiAdComplete")&&this._inputDataValidator.validateFields(b,["playhead"])){if(this._assetData.type()!=o.TYPE_AD)return void this._logger.warn(w,"#_onApiAdComplete() > Ignoring the ad complete event, because we are no longer in an ad.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_COMPLETE,b.playhead,null,b._eventData[E]);this._sendHit(c),this._updateLastInbandItemToBuffering(),this._assetData.adData(null),this._assetData.type(o.TYPE_MAIN_CONTENT),this._updateReportingInterval(this._reportingInterval,!1)}},e.prototype._onApiAdSkip=function(a){this._logger.debug(w,"#_onApiAdSkip()");var b=a.data;if(this._checkCall("_onApiAdSkip")&&this._inputDataValidator.validateFields(b,["playhead"])){if(this._assetData.type()!=o.TYPE_AD)return void this._logger.warn(w,"#_onApiAdSkip() > Ignoring the ad skip event, because we are no longer in an ad.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_SKIP,b.playhead,null,b._eventData[E]);this._sendHit(c),this._updateLastInbandItemToBuffering(),this._assetData.adData(null),this._assetData.type(o.TYPE_MAIN_CONTENT),this._updateReportingInterval(this._reportingInterval,!1)}},e.prototype._onApiChapterStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiChapterStart(name="+b.chapterName+", length="+b.chapterLength+", position="+b.chapterPosition+", chapter_offset="+b.chapterOffset+")"),this._checkCall("_onApiChapterStart")&&this._inputDataValidator.validateFields(b,["playhead","chapterPosition","chapterOffset","chapterLength"])){var c=new s;c.id(f(this._assetData.videoId())+"_"+b.chapterPosition),c.name(b.chapterName),c.length(b.chapterLength),c.position(b.chapterPosition),c.offset(b.chapterOffset),c.sid(this._generateSessionId()),this._assetData.chapterData(c),this._updateQoSInfo(b);var d=g.merge(b.metaVideo,b.metaChapter),e=new t(this,n.EVENT_TYPE_CHAPTER_START,b.playhead,d,b._eventData[E]);e.assetData.adData(null),e.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(e)}},e.prototype._onApiChapterComplete=function(a){this._logger.debug(w,"#_onApiChapterComplete()");var b=a.data;if(this._checkCall("_onApiChapterComplete")&&this._inputDataValidator.validateFields(b,["playhead"])){if(!this._assetData.chapterData())return void this._logger.warn(w,"#_onApiChapterComplete() > Ignoring the chapter complete event, because we are no longer in a chapter.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_CHAPTER_COMPLETE,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c),this._assetData.chapterData(null)}},e.prototype._onApiChapterSkip=function(a){this._logger.debug(w,"#_onApiChapterSkip()");var b=a.data;if(this._checkCall("_onApiChapterSkip")&&this._inputDataValidator.validateFields(b,["playhead"])){if(!this._assetData.chapterData())return void this._logger.warn(w,"#_onApiChapterSkip() > Ignoring the chapter skip event, because we are no longer in a chapter.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_CHAPTER_SKIP,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c),this._assetData.chapterData(null)}},e.prototype._onApiBitrateChange=function(a){this._logger.debug(w,"#_onApiBitrateChange()");var b=a.data;if(this._checkCall("_onApiBitrateChange")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_BITRATE_CHANGE,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiTrackError=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiTrackError(source="+b._eventData.source+", err_id="+b._eventData.error_id+")"),!this._isTrackingSessionActive)return void this._logger.warn(w,"#_onApiTrackError() > No active tracking session.");if(this._trackExternalErrors||b._eventData.source===x){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_ERROR,0,null,b._eventData[E]);c.eventData.id(b._eventData.error_id),c.eventData.source(b._eventData.source),this._sendHit(c)}},e.prototype._onApiTrackInternalError=function(a){var b=a.data;this._logger.debug(w,"#_onApiTrackInternalError(source="+b.source+", err_id="+b.error_id+")"),this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_ERROR,0);c.eventData.id(b.error_id),c.eventData.source(b.source),this._sendHit(c)},e.prototype._onApiQuantumEnd=function(a){this._logger.debug(w,"#_onApiQuantumEnd(interval="+this._channel.request(B)+")");var b=a.data;if(this._checkCall("_onApiQuantumEnd")&&this._inputDataValidator.validateFields(b,["playhead"])){var c=this._lastInBandItem;if(c){this._updateQoSInfo(b);var d=new t(this,c.eventData.type(),b.playhead,c.meta,c.callback);d.filterReport=c.filterReport,this._sendHit(d,!0)}}},e.prototype._onNetworkCheckStatusComplete=function(a){var b=a.data;this._trackExternalErrors=b[I],this._reportingInterval=b[J],this._reportingInterval||(this._reportingInterval=ma),this._logger.debug(w,"#_onNetworkCheckStatusComplete(track_ext_err="+this._trackExternalErrors+")")},e.prototype._onResetSessionId=function(a){var b=this._generateSessionId();this._sessionData=new i,this._sessionData.sessionId(b),this._logger.debug(w,"#_resetSessionId(new sessionId="+b+")")},e.prototype._installEventListeners=function(){this._channel.on(L,this._onApiAnalyticsStart,this),this._channel.on(M,this._onApiAnalyticsAdStart,this),this._channel.on(N,this._onApiVideoLoad,this),this._channel.on(O,this._onApiVideoUnload,this),this._channel.on(P,this._onApiVideoStart,this),this._channel.on(Q,this._onApiVideoComplete,this),this._channel.on(R,this._onApiVideoSkip,this),this._channel.on(S,this._onApiVideoResume,this),this._channel.on(T,this._onApiVideoSessionEnd,this),this._channel.on(U,this._onApiAdBreakStart,this),this._channel.on(V,this._onApiAdBreakComplete,this),this._channel.on(W,this._onApiAdStart,this),this._channel.on(X,this._onApiAdComplete,this),this._channel.on(Y,this._onApiAdSkip,this),this._channel.on(Z,this._onApiPlay,this),this._channel.on($,this._onApiPause,this),this._channel.on(_,this._onApiBufferStart,this),this._channel.on(aa,this._onApiChapterStart,this),this._channel.on(ba,this._onApiChapterComplete,this),this._channel.on(ca,this._onApiChapterSkip,this),this._channel.on(fa,this._onApiBitrateChange,this),this._channel.on(da,this._onApiTrackError,this),this._channel.on(ea,this._onApiTrackInternalError,this),this._channel.on(ga,this._onApiQuantumEnd,this),this._channel.on(ia,this._onNetworkCheckStatusComplete,this),this._channel.on(D,this._onResetSessionId,this),this._channel.reply(C,function(){return this._sessionData&&this._sessionData.sessionId()?this._sessionData.sessionId():null},this)},e.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)},e.prototype._resetInternalState=function(){this._logger.debug(w,"#_resetInternalState()"),this._isTrackingSessionActive=!1,this._isVideoComplete=!1,this._autoComputedStartupTime=0,this._lastInBandItem=null,this._stashedLastInBandItem=null,this._streamData=new p,this._qosData=new q,this._sessionData=new i,this._assetData=new o,this._cuserData=null},e.prototype._generateSessionId=function(){return""+(new Date).getTime()+Math.floor(1e9*Math.random())},e.prototype._updateQoSInfo=function(a){this._qosData.bitrate(a.bitrate||0),this._qosData.fps(a.fps||0),this._qosData.droppedFrames(a.droppedFrames||0),null==a.startupTime||isNaN(a.startupTime)?(this._qosData.startupTime(this._autoComputedStartupTime),this._qosData.isStartupTimeOverridden=!1):(this._qosData.startupTime(a.startupTime),this._qosData.isStartupTimeOverridden=!0)},e.prototype._checkCall=function(a){return this._isTrackingSessionActive?!this._isVideoComplete||"_onApiVideoSessionEnd"===a||(this._logger.warn(w,"#"+a+"() > The video content already completed."),!1):(this._logger.warn(w,"#"+a+"() > No active tracking session."),!1)},e.prototype._updateReportingInterval=function(a,b){var c={};c[K]=!!b,c[J]=a,this._channel.trigger(new h(ja,c))},e.prototype._updateLastInBandItem=function(a){var b=this._lastInBandItem,c=(new Date).getTime(),d=b.assetData.type()===o.TYPE_AD||a.assetData.type()===o.TYPE_AD,e=1e3*Math.abs(a.eventData.playhead()-b.eventData.playhead()),f=Math.abs(c-b.eventData.ts()),g=Math.abs(e-f),h=f;h>ka?(this._logger.warn(w," Resetting duration in lastInBandItem["+b.assetData.type()+":"+b.eventData.type()+"] call to 0 as calculated duration ("+h+")exceeds 10mins"),h=0):b.eventData.type()==n.EVENT_TYPE_PLAY&&!d&&!this._doNotOverrideEventDuration&&g>la&&(h=Math.min(e,f),this._logger.warn(w," Resetting duration in lastInBandItem["+b.assetData.type()+":"+b.eventData.type()+"] call to "+h+" as calculated error delta ("+g+")exceeds 2sec")),this._doNotOverrideEventDuration=!1,b.eventData.duration(h),b.eventData.ts(c),b.eventData.playhead(a.eventData.playhead()),b.qosData.startupTime(a.qosData.startupTime()),b.qosData.isStartupTimeOverridden=a.qosData.isStartupTimeOverridden},e.prototype._updateLastInbandItemToBuffering=function(){this._stashedLastInBandItem=this._lastInBandItem;var a=0;null!=this._lastInBandItem&&(this._lastInBandItem.assetData.type()==o.TYPE_MAIN_CONTENT&&this._lastInBandItem.eventData.type()==n.EVENT_TYPE_START&&(this._stashedMainMetadata=this._lastInBandItem.meta),a=this._lastInBandItem.eventData.playhead());var b=new t(this,n.EVENT_TYPE_BUFFER,a,null,null);b.assetData.adData(null),b.assetData.type(o.TYPE_MAIN_CONTENT),this._lastInBandItem=b},e.prototype._restoreLastInbandItem=function(){if(null!=this._stashedLastInBandItem){var a=null;this._stashedLastInBandItem.eventData.type()==n.EVENT_TYPE_START&&(this._lastInBandItem.assetData.type()==o.TYPE_AD?a=this._lastInBandItem.meta:(a=this._stashedMainMetadata,this._stashedMainMetadata=null));var b=new t(this,this._stashedLastInBandItem.eventData.type(),this._stashedLastInBandItem.eventData.playhead(),a,this._stashedLastInBandItem.callback);b.filterReport=this._stashedLastInBandItem.filterReport,this._lastInBandItem=b,this._stashedLastInBandItem=null}},e.prototype._flushLastInbandItem=function(a){if(this._lastInBandItem){this._updateQoSInfo(a);var b=new t(this,this._lastInBandItem.eventData.type(),a.playhead,this._lastInBandItem.meta,this._lastInBandItem.callback);this._sendHit(b,!0)}},e.prototype._createAndSendReport=function(a){var b=this._reportFactory.createReportForItem(a);b.qosData.isStartupTimeOverridden||b.qosData.startupTime(this._autoComputedStartupTime);var c={};if(c[G]=b,this._channel.trigger(new h(ha,c)),b.eventData.type()==n.EVENT_TYPE_START||b.eventData.type()==n.EVENT_TYPE_PLAY||b.eventData.type()==n.EVENT_TYPE_PAUSE||b.eventData.type()==n.EVENT_TYPE_STALL||b.eventData.type()==n.EVENT_TYPE_BUFFER){var d={};d[H]=!0,this._channel.command(z,d)}},e.prototype._sendHit=function(a,b){switch(a.eventData.type()){case n.EVENT_TYPE_START:case n.EVENT_TYPE_PLAY:case n.EVENT_TYPE_PAUSE:case n.EVENT_TYPE_STALL:case n.EVENT_TYPE_BUFFER:this._lastInBandItem?(this._updateLastInBandItem(a),this._lastInBandItem.eventData.type()==n.EVENT_TYPE_START&&this._lastInBandItem.assetData.type()==o.TYPE_MAIN_CONTENT&&(this._autoComputedStartupTime+=this._lastInBandItem.eventData.duration()),this._createAndSendReport(this._lastInBandItem),b&&this._lastInBandItem.eventData.type()==a.eventData.type()||this._createAndSendReport(a)):this._createAndSendReport(a),this._lastInBandItem=a;break;case n.EVENT_TYPE_COMPLETE:case n.EVENT_TYPE_SKIP:if(this._lastInBandItem&&(this._updateLastInBandItem(a),this._createAndSendReport(this._lastInBandItem)),a.eventData.type()!==n.EVENT_TYPE_SKIP&&this._createAndSendReport(a),a.assetData.type()==o.TYPE_MAIN_CONTENT){this._lastInBandItem=null,this._stashedLastInBandItem=null;var c={};c[H]=!0,this._channel.command(A,c)}else a.assetData.type()==o.TYPE_AD&&(this._lastInBandItem.assetData.adData(null),this._lastInBandItem.assetData.type(o.TYPE_MAIN_CONTENT),this._doNotOverrideEventDuration=!0);break;case n.EVENT_TYPE_CHAPTER_START:case n.EVENT_TYPE_CHAPTER_COMPLETE:case n.EVENT_TYPE_CHAPTER_SKIP:this._lastInBandItem&&(this._updateLastInBandItem(a),this._createAndSendReport(this._lastInBandItem)),a.eventData.type()!==n.EVENT_TYPE_CHAPTER_SKIP&&this._createAndSendReport(a),this._lastInBandItem&&(this._lastInBandItem.assetData.chapterData(a.eventData.type()==n.EVENT_TYPE_CHAPTER_START?new s(a.assetData.chapterData()):null),this._lastInBandItem.eventData.duration(0),this._createAndSendReport(this._lastInBandItem));break;default:this._createAndSendReport(a)}};var w="ah::Context",x="sourceErrorSDK",y="error",z="clock:reporting.resume",A="clock:reporting.pause",B="reporting_interval",C="session_id",D="reset_session_id",E="callback",F="filter_report",G="report",H="reset",I="track_external_errors",J="reporting_interval",K="do_not_override_interval",L="api:aa_start",M="api:aa_ad_start",N="api:video_load",O="api:video_unload",P="api:video_start",Q="api:video_complete",R="api:video_skip",S="api:video_resume",T="api:video_session_end",U="api:adbreak_start",V="api:adbreak_complete",W="api:ad_start",X="api:ad_complete",Y="api:ad_skip",Z="api:play",$="api:pause",_="api:buffer_start",aa="api:chapter_start",ba="api:chapter_complete",ca="api:chapter_skip",da="api:track_error",ea="api:track_internal_error",fa="api:bitrate_change",ga="api:quantum_end",ha="context:report_available",ia="net:check_status_complete",ja="reporting:update_interval",ka=6e5,la=2e3,ma=10;d.context.Context=e}(a.ADB.core,a.ADB.va,a.ADB.va.utils,b),function(a){"use strict";function b(a,b){this.trackingServer=a,this.publisher=b,this.ssl=!1,this.ovp=c,this.sdk=c,this.quietMode=!1,this.debugLogging=!1,this.__isPrimetime=!1,this.__psdkVersion=null}var c="unknown";a.AdobeHeartbeatPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.onError=function(a){},b.prototype.onTrackingDisabled=function(){},a.AdobeHeartbeatPluginDelegate=b}(b),function(a,b,c){"use strict";function d(a){d.__super__.constructor.call(this,q),this._radio=new i(this._logger),this._channel=this._radio.channel(y),this._delegate=a,this._context=new l(this._channel,this._logger),this._filter=new m(this._channel,this._logger),this._network=new n(this._channel,this._logger),this._setupDataResolver()}var e=a.Event,f=a.Trigger,g=a.plugin.BasePlugin,h=a.plugin.ParamMapping,i=a.radio.Radio,j=b.ErrorInfo,k=b.Version,l=c.context.Context,m=c.filter.ReportFilter,n=c.network.Network,o=c.clock.Clock,p=c.AdobeHeartbeatPluginConfig;a.extend(d,g),d.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof p))throw new Error("Expected config data to be instance of AdobeHeartbeatPluginConfig.");this._config=a,this._config.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure({trackingServer="+this._config.trackingServer+", publisher="+this._config.publisher+", quietMode="+this._config.quietMode+", ssl="+this._config.ssl+"})");var b=this._config.trackingServer+"/settings/",c={};c[ja]=this._config.trackingServer,c[ka]=b,c[la]=this._config.publisher,c[ma]=this._config.quietMode,c[na]=this._config.ssl,this._channel.trigger(new e(sa,c)),this._isConfigured=!0},d.prototype.bootstrap=function(a){d.__super__.bootstrap.call(this,a),this._channel.on(z,this._onError,this),this._clock=new o(this._pluginManager,this._channel,this._logger),this._channel.command(Ra),this._channel.trigger(new e(Ya)),this._channel.on(pa,this._onCheckStatusComplete,this),this._registerCommands(),this._registerBehaviours()},d.prototype._teardown=function(){this._logger.debug(this._logTag,"#_teardown()"),this._radio.shutdown(),this._context.destroy(),this._clock.destroy(),this._filter.destroy(),this._network.destroy()},d.prototype._canProcess=function(){return this._isConfigured?this._errorInfo?(this._logger.error(this._logTag,"_canProcess() > Plugin in ERROR state."),!1):d.__super__._canProcess.call(this):(this._logger.error(this._logTag,"_canProcess() > Plugin not configured."),!1)},d.prototype._cmdAnalyticsError=function(a){this._errorInfo||(this._errorInfo=new j("Internal error","AdobeAnalyticsPlugin is in ERROR state."),this._trigger(z,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo))},d.prototype._cmdAnalyticsStart=function(a){this._canProcess()&&this._channel.trigger(new e(qa,a))},d.prototype._cmdAnalyticsAdStart=function(a){this._canProcess()&&this._channel.trigger(new e(ra,a))},d.prototype._cmdVideoLoad=function(a){this._errorInfo=null,this._canProcess()&&(this._isTrackingSessionActive&&this._channel.trigger(new e(ua,a)),this._isTrackingSessionActive=!1,this._isPaused=!0,this._isSeeking=!1,this._isBuffering=!1,this._isVideoIdle=!1,this._filter.clear(),this._channel.trigger(new e(ta,a)),this._isTrackingSessionActive=!0)},d.prototype._cmdVideoUnload=function(a){this._errorInfo=null,this._canProcess()&&(this._channel.trigger(new e(ua,a)),this._filter.flush(),this._runReportingTimer(!1),this._runFlushFilterTimer(!1),this._runIdleTimer(!1),this._isTrackingSessionActive=!1)},d.prototype._cmdBeginReporting=function(a){this._canProcess()&&this._channel.trigger(new e(Pa,{}))},d.prototype._cmdVideoSessionEnd=function(a){this._canProcess()&&this._channel.trigger(new e(za,a))},d.prototype._cmdVideoStart=function(a){this._canProcess()&&(this._channel.trigger(new e(va,a)),this._filter.flush())},d.prototype._cmdVideoComplete=function(a){this._canProcess()&&this._channel.trigger(new e(wa,a))},d.prototype._cmdVideoSkip=function(a){this._canProcess()&&this._channel.trigger(new e(xa,a))},d.prototype._cmdVideoResume=function(a){this._canProcess()&&this._channel.trigger(new e(ya,a))},d.prototype._cmdPlay=function(a){this._canProcess()&&(this._isPaused=!1,this._resumePlaybackIfPossible(a))},d.prototype._cmdPause=function(a){this._canProcess()&&(this._channel.trigger(new e(Ga,a)),this._isPaused=!0,this._runIdleTimer(!0))},d.prototype._cmdAdBreakStart=function(a){this._canProcess()&&this._channel.trigger(new e(Aa,a))},d.prototype._cmdAdBreakComplete=function(a){this._canProcess()&&(this._channel.trigger(new e(Ba,a)),this._resumePlaybackIfPossible(a))},d.prototype._cmdAdStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ca,a)),this._resumePlaybackIfPossible(a))},d.prototype._cmdAdComplete=function(a){this._canProcess()&&this._channel.trigger(new e(Da,a))},d.prototype._cmdAdSkip=function(a){this._canProcess()&&this._channel.trigger(new e(Ea,a))},d.prototype._cmdBufferStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ha,a)),this._isBuffering=!0,this._runIdleTimer(!0))},d.prototype._cmdBufferComplete=function(a){this._canProcess()&&(this._isBuffering=!1,this._isPaused?this._channel.trigger(new e(Ga,a)):this._resumePlaybackIfPossible(a))},d.prototype._cmdSeekStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ga,a)),this._isSeeking=!0,this._runIdleTimer(!0))},d.prototype._cmdSeekComplete=function(a){this._canProcess()&&(this._isSeeking=!1,this._resumePlaybackIfPossible(a))},d.prototype._cmdChapterStart=function(a){this._canProcess()&&this._channel.trigger(new e(Ia,a))},d.prototype._cmdChapterComplete=function(a){this._canProcess()&&this._channel.trigger(new e(Ja,a))},d.prototype._cmdChapterSkip=function(a){this._canProcess()&&this._channel.trigger(new e(Ka,a))},d.prototype._cmdBitrateChange=function(a){this._canProcess()&&this._channel.trigger(new e(Na,a))},d.prototype._cmdTrackError=function(a){this._canProcess()&&this._channel.trigger(new e(La,a))},d.prototype._cmdClockReportingTick=function(a){this._canProcess()&&this._channel.trigger(new e(Oa,a))},d.prototype._onCheckStatusComplete=function(a){if(this._canProcess()){var b=!1;a&&a.data&&a.data[oa]&&(b=a.data[oa]),this._logger.debug(this._logTag,"#_onCheckStatusComplete(trackingDisabled="+b+")"),b&&this._delegate&&this._delegate.onTrackingDisabled()}},d.prototype._cmdIdleTick=function(a){this._canProcess()&&(this._isVideoIdle=!0,this._trigger(aa),this._channel.trigger(new e(za,a)),this._filter.flush(),this._runReportingTimer(!1),this._runFlushFilterTimer(!1),this._runIdleTimer(!1),this._trigger($))},d.prototype._onError=function(a){this._errorInfo=a.data;var b={};b[ha]=Qa,b[ia]=this._errorInfo.getMessage()+"|"+this._errorInfo.getDetails(),this._channel.trigger(new e(Ma,b)),this._runReportingTimer(!1),this._trigger(z,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo)},d.prototype._runIdleTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Wa,b):this._channel.command(Xa,b)},d.prototype._runFlushFilterTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Ua,b):this._channel.command(Va,b)},d.prototype._runReportingTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Sa,b):this._channel.command(Ta,b)},d.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleAnalyticsError",this._cmdAnalyticsError),this._pluginManager.comply(this,"handleAnalyticsStart",this._cmdAnalyticsStart),this._pluginManager.comply(this,"handleAnalyticsAdStart",this._cmdAnalyticsAdStart),this._pluginManager.comply(this,"handleVideoLoad",this._cmdVideoLoad),this._pluginManager.comply(this,"handleVideoUnload",this._cmdVideoUnload),this._pluginManager.comply(this,"handleBeginReporting",this._cmdBeginReporting),this._pluginManager.comply(this,"handleVideoSessionEnd",this._cmdVideoSessionEnd),this._pluginManager.comply(this,"handleVideoStart",this._cmdVideoStart),this._pluginManager.comply(this,"handleVideoComplete",this._cmdVideoComplete),this._pluginManager.comply(this,"handleVideoSkip",this._cmdVideoSkip),this._pluginManager.comply(this,"handleVideoResume",this._cmdVideoResume),this._pluginManager.comply(this,"handlePlay",this._cmdPlay),this._pluginManager.comply(this,"handlePause",this._cmdPause),this._pluginManager.comply(this,"handleAdBreakStart",this._cmdAdBreakStart),this._pluginManager.comply(this,"handleAdBreakComplete",this._cmdAdBreakComplete),this._pluginManager.comply(this,"handleAdStart",this._cmdAdStart),this._pluginManager.comply(this,"handleAdComplete",this._cmdAdComplete),this._pluginManager.comply(this,"handleAdSkip",this._cmdAdSkip),this._pluginManager.comply(this,"handleBufferStart",this._cmdBufferStart),this._pluginManager.comply(this,"handleBufferComplete",this._cmdBufferComplete),this._pluginManager.comply(this,"handleSeekStart",this._cmdSeekStart),this._pluginManager.comply(this,"handleSeekComplete",this._cmdSeekComplete),this._pluginManager.comply(this,"handleChapterStart",this._cmdChapterStart),this._pluginManager.comply(this,"handleChapterComplete",this._cmdChapterComplete),this._pluginManager.comply(this,"handleChapterSkip",this._cmdChapterSkip),this._pluginManager.comply(this,"handleBitrateChange",this._cmdBitrateChange),this._pluginManager.comply(this,"handleTrackError",this._cmdTrackError),this._pluginManager.comply(this,"handleClockReportingTick",this._cmdClockReportingTick),this._pluginManager.comply(this,"handleIdleTick",this._cmdIdleTick)},d.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new f(t,C),this,"handleVideoLoad",[new h(s,"rsid","rsid"),new h(s,"tracking_server","trackingServer")]),this._pluginManager.registerBehaviour(new f(t,D),this,"handleVideoUnload"),this._pluginManager.registerBehaviour(new f(t,ba),this,"handleBeginReporting"),this._pluginManager.registerBehaviour(new f(t,E),this,"handleVideoSessionEnd",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(t,F),this,"handleVideoStart",[new h(t,"video.id","videoId"),new h(t,"video.name","videoName"),new h(t,"video.length","videoLength"),new h(t,"video.playhead","playhead"),new h(t,"video.playerName","playerName"),new h(t,"video.streamType","streamType"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"rsid","rsid"),new h(s,"tracking_server","trackingServer"),new h(s,"channel","channel"),new h(s,"meta.video.*","metaVideo"),new h(s,"ssl","useSsl"),new h(u,"meta","metaNielsen"),new h(r,"publisher","publisher"),new h(r,"sdk","sdk"),new h(r,"ovp","ovp"),new h(r,"version","version"),new h(r,"api_level","apiLvl")]),this._pluginManager.registerBehaviour(new f(t,H),this,"handleVideoComplete",[new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,I),this,"handleVideoSkip",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,G),this,"handleVideoResume",[new h(t,"video.id","videoId"),new h(t,"video.name","videoName"),new h(t,"video.length","videoLength"),new h(t,"video.playhead","playhead"),new h(t,"video.playerName","playerName"),new h(t,"video.streamType","streamType")]),this._pluginManager.registerBehaviour(new f(t,J),this,"handlePlay",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,K),this,"handlePause",[new h(t,"video.playhead","playhead"),new h(t,"video.playheadStalled","playheadStalled"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,M),this,"handleAdBreakStart",[new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,N),this,"handleAdBreakComplete",[new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,O),this,"handleAdStart",[new h(t,"video.playhead","playhead"),new h(t,"ad.id","adId"),new h(t,"ad.name","adName"),new h(t,"ad.length","adLength"),new h(t,"ad.position","adPosition"),new h(t,"ad.granularTracking","adGranularTracking"),new h(t,"ad.trackingInterval","adTrackingInterval"),new h(t,"pod.name","podName"),new h(t,"pod.playerName","podPlayerName"),new h(t,"pod.position","podPosition"),new h(t,"pod.startTime","podSecond"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"meta.video.*","metaVideo"),new h(s,"meta.ad.*","metaAd"),new h(u,"meta","metaNielsen"),new h(u,"metaAd","metaAdNielsen")]),this._pluginManager.registerBehaviour(new f(t,P),this,"handleAdComplete",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Q),this,"handleAdSkip",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,R),this,"handleBufferStart",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,S),this,"handleBufferComplete",[new h(t,"video.playhead","playhead"),new h(t,"video.playheadStalled","playheadStalled"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,T),this,"handleSeekStart",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(t,U),this,"handleSeekComplete",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAd","isInAd"),new h(t,"ad.id","adId"),new h(t,"ad.position","adPosition"),new h(t,"pod.playerName","podPlayerName"),new h(t,"pod.position","podPosition"),new h(t,"chapter.isInChapter","isInChapter"),new h(t,"chapter.position","chapterPosition"),new h(t,"chapter.name","chapterName"),new h(t,"chapter.length","chapterLength"),new h(t,"chapter.startTime","chapterOffset"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,V),this,"handleChapterStart",[new h(t,"video.playhead","playhead"),new h(t,"chapter.position","chapterPosition"),new h(t,"chapter.name","chapterName"),new h(t,"chapter.length","chapterLength"),new h(t,"chapter.startTime","chapterOffset"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"meta.video.*","metaVideo"),new h(s,"meta.chapter.*","metaChapter"),new h(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new f(t,W),this,"handleChapterComplete",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,X),this,"handleChapterSkip",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Y),this,"handleBitrateChange",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Z),this,"handleTrackError"),this._pluginManager.registerBehaviour(new f(v,da),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,L),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(v,fa),this,"handleIdleTick",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(r,aa),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(s,z),this,"handleAnalyticsError"),this._pluginManager.registerBehaviour(new f(s,A),this,"handleAnalyticsStart",[new h(s,"vid","vid"),new h(s,"aid","aid"),new h(s,"mid","mid"),new h(s,"customerIDs","customerIDs"),new h(s,"blob","blob"),new h(s,"loc_hint","loc_hint"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(s,B),this,"handleAnalyticsAdStart",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")])},d.prototype._setupDataResolver=function(){var a={},b=this;a.version=function(){return k.getVersion()},a.api_level=function(){return k.getApiLevel()},a.tracking_server=function(){return b._config?b._config.trackingServer:null},a.publisher=function(){return b._config?b._config.publisher:null},a.quiet_mode=function(){return!!b._config&&b._config.quietMode},a.ovp=function(){return b._config?b._config.ovp:null},a.sdk=function(){return b._config?b._config.sdk:null},a.is_primetime=function(){return!!b._config&&b._config.__isPrimetime},a.psdk_version=function(){return b._config?b._config.__psdkVersion:null},a.session_id=function(){return b._channel.request(w)},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];c=c||{},c[e]=a.hasOwnProperty(e)?a[e].call(this):null}return c}},d.prototype._resumePlaybackIfPossible=function(a){this._errorInfo||this._isPaused||this._isSeeking||this._isBuffering||(this._isVideoIdle?(this._isVideoIdle=!1,this._resumePlaybackFromIdle()):this._channel.trigger(new e(Fa,a)),this._runIdleTimer(!1))},d.prototype._resumePlaybackFromIdle=function(){this._trigger(aa),this._filter.clear(),this._channel.trigger(new e(x)),this._trigger(_),this._runReportingTimer(!0),this._runFlushFilterTimer(!0)};var q="adobe-heartbeat",r=q,s="adobe-analytics",t="player",u="nielsen",v="service.clock",w="session_id",x="reset_session_id",y="heartbeat-channel",z="error",A="aa_start",B="sc_ad_start",C="video_load",D="video_unload",E="video_session_end",F="video_start",G="video_resume",H="video_complete",I="video_skip",J="play",K="pause",L="content_start",M="adbreak_start",N="adbreak_complete",O="ad_start",P="ad_complete",Q="ad_skip",R="buffer_start",S="buffer_complete",T="seek_start",U="seek_complete",V="chapter_start",W="chapter_complete",X="chapter_skip",Y="bitrate_change",Z="track_error",$="video_idle_start",_="video_idle_resume",aa="quantum_close",ba="video_begin_reporting",ca="heartbeat.reporting",da=ca+".tick",ea="heartbeat.idle",fa=ea+".tick",ga="reset",ha="source",ia="error_id",ja="tracking_server",ka="check_status_server",la="publisher",ma="quiet_mode",na="ssl",oa="tracking_disabled",pa="net:check_status_complete",qa="api:aa_start",ra="api:aa_ad_start",sa="api:config",ta="api:video_load",ua="api:video_unload",va="api:video_start",wa="api:video_complete",xa="api:video_skip",ya="api:video_resume",za="api:video_session_end",Aa="api:adbreak_start",Ba="api:adbreak_complete",Ca="api:ad_start",Da="api:ad_complete",Ea="api:ad_skip",Fa="api:play",Ga="api:pause",Ha="api:buffer_start",Ia="api:chapter_start",Ja="api:chapter_complete",Ka="api:chapter_skip",La="api:track_error",Ma="api:track_internal_error",Na="api:bitrate_change",Oa="api:quantum_end",Pa="api:video_begin_reporting",Qa="sourceErrorHeartbeat",Ra="clock:check_status.resume",Sa="clock:reporting.resume",Ta="clock:reporting.pause",Ua="clock:flush_filter.resume",Va="clock:flush_filter.pause",Wa="clock:idle.resume",Xa="clock:idle.pause",Ya="clock:check_status.get_settings";c.AdobeHeartbeatPlugin=d}(a.ADB.core,a.ADB.va,b),a.ADB.va.plugins.ah||(a.ADB.va.plugins.ah=b)}(this);
|
|
66
|
-
|
|
67
|
-
// AdobeAnalyticsPlugin
|
|
68
|
-
!function(a){if(void 0===b)var b={};!function(a,b){"use strict";function c(a,b){this._onFail={fn:a,ctx:b}}var d=a.ErrorInfo;c.prototype.validateFields=function(a,b){if(!a)return this._fail("Data cannot be null");if(b)for(var c=0;c<b.length;c++){var d=b[c];switch(d){case"videoId":if(!a.hasOwnProperty("videoId"))return this._fail("The ID for the main video must be specified.");if("string"!=typeof a.videoId)return this._fail("The ID for the main video must be a String.");if(""===a.videoId)return this._fail("The ID for the main video cannot be an empty string.");break;case"mediaType":if(!a.hasOwnProperty("mediaType"))return this._fail("The media type for the main video must be specified.");if("string"!=typeof a.mediaType)return this._fail("The media type for the main video must be a String.");if(""===a.mediaType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"streamType":if(!a.hasOwnProperty("streamType"))return this._fail("The stream type for the main video must be specified.");if("string"!=typeof a.streamType)return this._fail("The stream type for the main video must be a String.");if(""===a.streamType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"playerName":if(!a.hasOwnProperty("playerName"))return this._fail("The player name for the main video must be specified.");if("string"!=typeof a.playerName)return this._fail("The player name for the main video must be a String.");if(""===a.playerName)return this._fail("The player name for the main video cannot be an empty string.");break;case"videoLength":if(!a.hasOwnProperty("videoLength"))return this._fail("The length of the main video must be specified.");if("number"!=typeof a.videoLength)return this._fail("The length of the main video must be a Number.");if(isNaN(a.videoLength))return this._fail("The length of the main video cannot be NaN.");break;case"podPlayerName":if(!a.hasOwnProperty("podPlayerName"))return this._fail("The player name for the ad-break must be specified.");if("string"!=typeof a.podPlayerName)return this._fail("The player name for the ad-break must be a String.");if(""===a.podPlayerName)return this._fail("The player name for the ad-break cannot be an empty string.");break;case"podPosition":if(!a.hasOwnProperty("podPosition"))return this._fail("Position (index) of the ad-break must be specified.");if("number"!=typeof a.podPosition)return this._fail("Position (index) of the ad-break must be a Number.");if(isNaN(a.podPosition))return this._fail("Position (index) of the ad-break cannot be NaN.");break;case"adId":if(!a.hasOwnProperty("adId"))return this._fail("The ad ID must be specified.");if("string"!=typeof a.adId)return this._fail("The ad ID must be a String.");if(""===a.adId)return this._fail("The ad ID cannot be an empty string.");break;case"adPosition":if(!a.hasOwnProperty("adPosition"))return this._fail("Position (index) of the ad must be specified.");if("number"!=typeof a.adPosition)return this._fail("Position (index) of the ad must be a Number.");if(isNaN(a.adPosition))return this._fail("Position (index) of the ad cannot be NaN.");break;case"adLength":if(!a.hasOwnProperty("adLength"))return this._fail("The length of the ad must be specified.");if("number"!=typeof a.adLength)return this._fail("The length of the ad must be a Number.");if(isNaN(a.adLength))return this._fail("The length of the ad cannot be NaN.");break;default:return this._fail("Unable to validate unknown parameter: "+d)}}return!0},c.prototype._fail=function(a){var b=new d("Invalid input data",a);return this._onFail.fn&&this._onFail.fn.call(this._onFail.ctx,b),!1},b.InputDataValidator=c}(a.ADB.va,b),function(a){"use strict";function b(){this.channel=c,this.debugLogging=!1}var c="";a.AdobeAnalyticsPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.onError=function(a){},a.AdobeAnalyticsPluginDelegate=b}(b),function(a,b,c,d){"use strict";function e(a){this._aaPlugin=a}function f(a,b){if(f.__super__.constructor.call(this,s),!a)throw new Error("The reference to the AppMeasurement object cannot be NULL.");if(a.unsupportedBrowser)throw new Error("AppMeasurement is not supported in current browser.");this._appMeasurement=a,this._appMeasurementBridge=new e(this),this._delegate=b,this._videoMetadata={},this._adMetadata={},this._chapterMetadata={},this._errorInfo=null,this._appMeasurementReady=!1,this._beginReporting=!1,this._workQueue=new l(!0,x),this._inputDataValidator=new r(function(a){this._errorInfo=a,this._logger.error(this._logTag,a.getMessage()+" | "+a.getDetails());var b=this;setTimeout(function(){b._trigger(y,a),b._delegate&&b._delegate.onError(b._errorInfo)},0)},this),this._appMeasurement.isReadyToTrack(),this._setupDataResolver()}var g=a.Trigger,h=a.plugin.BasePlugin,i=a.plugin.ParamMapping,j=a.radio.Channel,k=a.radio.Command,l=a.radio.CommandQueue,m=b.ErrorInfo,n=c.md5,o=c.StringUtils,p=c.ObjectUtils,q=d.AdobeAnalyticsPluginConfig,r=d.InputDataValidator;e.prototype.onAppMeasurementReady=function(){this._aaPlugin&&this._aaPlugin._onAppMeasurementReady()},e.prototype.release=function(){this._aaPlugin=null},a.extend(f,h),f.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof q))throw new Error("Expected config data to be instance of AdobeAnalyticsPluginConfig.");this._config=a,this._config.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure({trackingServer="+this._config.debugLogging+", channel="+this._config.channel+", ssl="+this._appMeasurement.ssl+"})")},f.prototype.bootstrap=function(a){f.__super__.bootstrap.call(this,a),this._registerCommands(),this._registerBehaviours()},f.prototype.setup=function(){this._appMeasurement.isReadyToTrack()?this._onAppMeasurementReady():this._appMeasurement.callbackWhenReadyToTrack(this._appMeasurementBridge,this._appMeasurementBridge.onAppMeasurementReady,[]),f.__super__.setup.call(this)},f.prototype.setVideoMetadata=function(a){this._videoMetadata=p.clone(a)},f.prototype.setAdMetadata=function(a){this._adMetadata=p.clone(a)},f.prototype.setChapterMetadata=function(a){this._chapterMetadata=p.clone(a)},f.prototype._teardown=function(){this._logger.debug(this._logTag,"#_teardown()"),this._appMeasurementBridge.release()},f.prototype._canProcess=function(){return this._errorInfo?(this._logger.error(this._logTag,"#_canProcess() > In ERROR state."),!1):f.__super__._canProcess.call(this)},f.prototype._cmdVideoLoad=function(a){this._errorInfo=null},f.prototype._cmdBeginReporting=function(a){this._logger.debug(this._logTag,"#_cmdBeginReporting()"),this._beginReporting=!0,this._resumeWorkQueue()},f.prototype._cmdVideoStart=function(a){this._logger.debug(this._logTag,"#_cmdVideoStart()"),this._canProcess()&&this._workQueue.addCommand(new k(this._executeOpen,this,[a]))},f.prototype._cmdAdStart=function(a){this._logger.debug(this._logTag,"#_cmdAdStart()"),this._canProcess()&&this._workQueue.addCommand(new k(this._executeOpenAd,this,[a]))},f.prototype._cmdHeartbeatPluginError=function(a){this._errorInfo||(this._errorInfo=new m("Internal error","HeartbeatPlugin is in ERROR state."),this._trigger(y,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo))},f.prototype._track=function(a){try{var b=this._appMeasurement.linkTrackVars;this._appMeasurement.linkTrackVars="",this._appMeasurement.track(a),this._appMeasurement.linkTrackVars=b}catch(a){this._logger.warn(this._logTag,"appMeasurement.track() call threw an exception.")}},f.prototype._executeOpen=function(a){if(this._logger.debug(this._logTag,"#_executeOpen(id="+a.videoId+", videoName="+a.videoName+", mediaType="+a.mediaType+", streamType="+a.streamType+", length="+a.videoLength+", playerName="+a.playerName+", channel="+a.channel+", isPrimetime="+a.isPrimetime+", sessionId="+a.sessionId+")"),this._canProcess()&&this._inputDataValidator.validateFields(a,["videoId","mediaType","streamType","videoLength","playerName"])){var b={};for(var c in a.metaVideo)a.metaVideo.hasOwnProperty(c)&&(b[c]=a.metaVideo[c]);if(a.metaNielsen)for(var c in a.metaNielsen)a.metaNielsen.hasOwnProperty(c)&&(b[c]=a.metaNielsen[c]);b["a.contentType"]=a.streamType,b["a.media.name"]=a.videoId,b["a.media.friendlyName"]=a.videoName||"",b["a.media.length"]=Math.floor(a.videoLength)||"0.0",b["a.media.playerName"]=a.playerName,b["a.media.channel"]=a.channel||"",b["a.media.view"]=!0,b["a.media.vsid"]=a.sessionId;var d={};d.contextData=b,"audio"===a.mediaType?(d.pev3=B,d.ms_a="1"):d.pev3=z,d.pe=a.isPrimetime?E:D,this._track(d);var e=this;setTimeout(function(){e._trigger(H,a)},0)}},f.prototype._executeOpenAd=function(a){var b=n(a.videoId)+"_"+a.podPosition;if(this._logger.debug(this._logTag,"#_executeOpenAd(id="+a.adId+", mediaType="+a.mediaType+", streamType="+a.streamType+", length="+a.adLength+", podPlayerName="+a.podPlayerName+", parentId="+a.videoId+", podId="+b+", parentPodPosition="+a.adPosition+", podSecond="+a.podSecond+")"),this._canProcess()&&this._inputDataValidator.validateFields(a,["videoId","mediaType","streamType","playerName","adId","adLength","podPlayerName","adPosition"])){a.podSecond=null==a.podSecond||isNaN(a.podSecond)?a.playhead:a.podSecond;var c,d={};for(c in a.metaVideo)a.metaVideo.hasOwnProperty(c)&&(d[c]=a.metaVideo[c]);for(c in a.metaAd)a.metaAd.hasOwnProperty(c)&&(d[c]=a.metaAd[c]);if(a.metaNielsen)for(var c in a.metaNielsen)a.metaNielsen.hasOwnProperty(c)&&(d[c]=a.metaNielsen[c]);d["a.contentType"]=a.streamType,d["a.media.name"]=a.videoId,d["a.media.playerName"]=a.playerName,d["a.media.channel"]=a.channel||"",d["a.media.vsid"]=a.sessionId,d["a.media.friendlyName"]=a.videoName||"",d["a.media.length"]=Math.floor(a.videoLength)||"0.0",d["a.media.ad.name"]=a.adId,d["a.media.ad.friendlyName"]=a.adName||"",d["a.media.ad.podFriendlyName"]=a.podName||"",d["a.media.ad.length"]=Math.floor(a.adLength)||"0.0",d["a.media.ad.playerName"]=a.podPlayerName,d["a.media.ad.pod"]=b,d["a.media.ad.podPosition"]=Math.floor(a.adPosition)||"0.0",d["a.media.ad.podSecond"]=Math.floor(a.podSecond)||"0.0",d["a.media.ad.view"]=!0;var e={};e.contextData=d,"audio"===a.mediaType?(e.pev3=C,e.ms_a="1"):e.pev3=A,e.pe=a.isPrimetime?G:F,this._track(e);var f=this;setTimeout(function(){f._trigger(I,a)},0)}},f.prototype._setupDataResolver=function(){var a={},b=this;a.rsid=function(){return b._appMeasurement.account},a.tracking_server=function(){return b._appMeasurement.ssl&&b._appMeasurement.trackingServerSecure?b._appMeasurement.trackingServerSecure:b._appMeasurement.trackingServer},a.ssl=function(){return b._appMeasurement.ssl},a.vid=function(){return b._appMeasurement.visitorID},a.aid=function(){return b._appMeasurement.analyticsVisitorID},a.mid=function(){return b._appMeasurement.marketingCloudVisitorID},a.blob=function(){return b._appMeasurement.audienceManagerBlob},a.loc_hint=function(){return b._appMeasurement.audienceManagerLocationHint?parseInt(b._appMeasurement.audienceManagerLocationHint):""},a.customerIDs=function(){var a={},c=b._appMeasurement.visitor.getCustomerIDs();for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if("object"==typeof e){for(var f in e)e.hasOwnProperty(f)&&("authState"==f?a[d+".as"]=e[f]:a[d+"."+f]=e[f]);a[d+".as"]||(a[d+".as"]="0")}}return a},a.channel=function(){return b._config?b._config.channel:null},a.meta=function(a){var c=a.split(".");if(c.length<2)return null;var d=c.shift();switch(a=c.join("."),d){case"video":return a==j.WILDCARD?b._videoMetadata:b._videoMetadata[a];case"ad":return a==j.WILDCARD?b._adMetadata:b._adMetadata[a];case"chapter":return a==j.WILDCARD?b._chapterMetadata:b._chapterMetadata[a];default:return null}},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];c=c||{},o.startsWith(e,"meta.")?c[e]=a.meta(e.split("meta.")[1]):c[e]=a.hasOwnProperty(e)?a[e].call(this):null}return c}},f.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleVideoLoad",this._cmdVideoLoad),this._pluginManager.comply(this,"handleBeginReporting",this._cmdBeginReporting),this._pluginManager.comply(this,"handleVideoStart",this._cmdVideoStart),this._pluginManager.comply(this,"handleAdStart",this._cmdAdStart),this._pluginManager.comply(this,"handleHeartbeatPluginError",this._cmdHeartbeatPluginError)},f.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new g(v,J),this,"handleVideoLoad"),this._pluginManager.registerBehaviour(new g(v,M),this,"handleBeginReporting"),this._pluginManager.registerBehaviour(new g(v,K),this,"handleVideoStart",[new i(v,"video.id","videoId"),new i(v,"video.mediaType","mediaType"),new i(v,"video.streamType","streamType"),new i(v,"video.name","videoName"),new i(v,"video.length","videoLength"),new i(v,"video.playerName","playerName"),new i(v,"video.streamType","streamType"),new i(w,"is_primetime","isPrimetime"),new i(w,"session_id","sessionId"),new i(t,"channel","channel"),new i(t,"meta.video.*","metaVideo"),new i(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new g(v,L),this,"handleAdStart",[new i(v,"video.id","videoId"),new i(v,"video.mediaType","mediaType"),new i(v,"video.streamType","streamType"),new i(v,"video.playhead","playhead"),new i(v,"video.playerName","playerName"),new i(v,"video.name","videoName"),new i(v,"video.length","videoLength"),new i(v,"ad.id","adId"),new i(v,"ad.length","adLength"),new i(v,"ad.position","adPosition"),new i(v,"ad.name","adName"),new i(v,"pod.name","podName"),new i(v,"pod.position","podPosition"),new i(v,"pod.playerName","podPlayerName"),new i(v,"pod.startTime","podSecond"),new i(w,"is_primetime","isPrimetime"),new i(w,"session_id","sessionId"),new i(t,"channel","channel"),new i(t,"meta.video.*","metaVideo"),new i(t,"meta.ad.*","metaAd"),new i(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new g(w,y),this,"handleHeartbeatPluginError")},f.prototype._onAppMeasurementReady=function(){this._logger.debug(this._logTag,"#_onAppMeasurementReady"),this._appMeasurementReady=!0,this._resumeWorkQueue()},f.prototype._resumeWorkQueue=function(){this._appMeasurementReady&&this._beginReporting&&(this._logger.debug(this._logTag,"#_resumeWorkQueue"),this._workQueue.resume())};var s="adobe-analytics",t=s,u="nielsen",v="player",w="adobe-heartbeat",x=2e3,y="error",z="video",A="videoAd",B="audio",C="audioAd",D="ms_s",E="msp_s",F="msa_s",G="mspa_s",H="aa_start",I="sc_ad_start",J="video_load",K="video_start",L="ad_start",M="video_begin_reporting";d.AdobeAnalyticsPlugin=f}(a.ADB.core,a.ADB.va,a.ADB.va.utils,b),function(a){"use strict";var b={SHOW:"a.media.show",SEASON:"a.media.season",EPISODE:"a.media.episode",ASSET_ID:"a.media.asset",GENRE:"a.media.genre",FIRST_AIR_DATE:"a.media.airDate",FIRST_DIGITAL_DATE:"a.media.digitalDate",RATING:"a.media.rating",ORIGINATOR:"a.media.originator",NETWORK:"a.media.network",SHOW_TYPE:"a.media.type",AD_LOAD:"a.media.adLoad",MVPD:"a.media.pass.mvpd",AUTHORIZED:"a.media.pass.auth",DAY_PART:"a.media.dayPart",FEED:"a.media.feed",STREAM_FORMAT:"a.media.format"},c={ARTIST:"a.media.artist",ALBUM:"a.media.album",LABEL:"a.media.label",AUTHOR:"a.media.author",STATION:"a.media.station",PUBLISHER:"a.media.publisher"},d={ADVERTISER:"a.media.ad.advertiser",CAMPAIGN_ID:"a.media.ad.campaign",CREATIVE_ID:"a.media.ad.creative",PLACEMENT_ID:"a.media.ad.placement",SITE_ID:"a.media.ad.site",CREATIVE_URL:"a.media.ad.creativeURL"};a.VideoMetadataKeys=b,a.AudioMetadataKeys=c,a.AdMetadataKeys=d}(b),a.ADB.va.plugins.aa||(a.ADB.va.plugins.aa=b)}(this);
|
|
69
|
-
|
|
70
|
-
// MediaHeartbeat
|
|
71
|
-
!function(a){!function(a,b){"use strict";function c(){this._processAction=!0,this._store={}}function d(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._rules=[]}c.prototype.setRuleName=function(a){this._ruleName=a},c.prototype.getRuleName=function(a,b){return this._ruleName},c.prototype.setData=function(a,b){this._store[a]=b},c.prototype.getData=function(a){return this._store[a]},c.prototype.shouldProcessAction=function(){return this._processAction},c.prototype.stopProcessingAction=function(){this._processAction=!1},c.prototype.startProcessingAction=function(){this._processAction=!0},d.createContext=function(){return new c},d.createPredicate=function(a,b,c){return{fn:a,expectedValue:b,msg:c}},d.prototype.registerRule=function(a,b,c,d,e){this._rules.push({name:a,desc:b,preconditions:c,actions:d,scope:e})},d.prototype.registerEnterExitAction=function(a,b){this._enterAction=a,this._exitAction=b},d.prototype._handleFailure=function(a,b){this._logger.error(e,a.desc+" - "+b.msg)},d.prototype._getRule=function(a){for(var b=0;b<this._rules.length;++b)if(this._rules[b].name===a)return this._rules[b];return null},d.prototype.processRule=function(a,b){var c=!0,f=this._getRule(a);if(f){var g=f.scope;b||(b=d.createContext()),b.setRuleName(a);for(var h=!1,i=0;i<f.preconditions.length;++i){var j=f.preconditions[i];if(h=!!j.fn.call(g,b)!==j.expectedValue){this._handleFailure(f,j);break}}if(h)c=!1;else{b.startProcessingAction(),this._enterAction&&this._enterAction.call(g,b);for(var i=0;i<f.actions.length;++i){var k=f.actions[i];if(!b.shouldProcessAction()){this._logger.info(e,"Stopping actions for "+f.desc);break}k.call(g,b)}this._exitAction&&b.shouldProcessAction()&&this._exitAction.call(g,b)}}else this._logger.warn(e,"No registered event found for ruleName "+a),c=!1;return c};var e="RuleEngine";b._RuleEngine=d}(a.ADB.core,a.ADB.va),function(a,b){"use strict";function c(a,b,c){this.taskFn=a,this.scope=b,this.interval=c,this.remainingInterval=c}function d(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._tasks=[],this._pausedTasks=[]}c.prototype.elapsedTime=function(a){this.remainingInterval-=a},c.prototype.shouldExecute=function(){return this.remainingInterval<=0},c.prototype.execute=function(){this.taskFn.call(this.scope)},d.prototype._getCurrentTimeInMS=function(){return(new Date).getTime()},d.prototype._runTasksForTime=function(a){var b=[],c=a-this._lastTickTime;this._lastTickTime=a;for(var d=0;d<this._tasks.length;){var e=this._tasks[d];e.elapsedTime(c),e.shouldExecute()?(b.push(e),this._tasks.splice(d,1)):++d}this._checkStopTimer();for(var d=0;d<b.length;++d)b[d].execute()},d.prototype._onTick=function(){var a=this._getCurrentTimeInMS();this._runTasksForTime(a)},d.prototype._startTimer=function(){var a=this;this._timer||(this._logger.info(e,"#startTimer()"),a._lastTickTime=this._getCurrentTimeInMS(),this._timer=window.setInterval(function(){a._onTick()},f))},d.prototype._stopTimer=function(){this._timer&&(this._logger.info(e,"#stopTimer()"),window.clearInterval(this._timer),this._timer=null)},d.prototype._checkStartTimer=function(){this._tasks.length>0&&this._startTimer()},d.prototype._checkStopTimer=function(){0===this._tasks.length&&this._stopTimer()},d.prototype._removeTask=function(a,b){for(var c=0;c<a.length;++c)if(a[c]===b)return a.splice(c,1),!0;return!1},d.prototype.scheduleTask=function(a,b,d){if(this._logger.info(e,"#scheduleTask()"),!a)throw new Error("Reference to the taskFn cannot be NULL");var f=new c(a,b,d);return this._tasks.push(f),this._checkStartTimer(),f},d.prototype.cancelTask=function(a){this._logger.info(e,"#cancelTask()"),this._removeTask(this._tasks,a),this._checkStopTimer()},d.prototype.pauseTask=function(a){this._logger.info(e,"#pauseTask()"),this._removeTask(this._tasks,a)&&this._pausedTasks.push(a),this._checkStopTimer()},d.prototype.resumeTask=function(a){this._logger.info(e,"#resumeTask()"),this._removeTask(this._pausedTasks,a)&&this._tasks.push(a),this._checkStartTimer()},d.prototype.clearTasks=function(){this._stopTimer(),this._tasks=[],this._pausedTasks=[]};var e="TaskScheduler",f=250;b._TaskScheduler=d}(a.ADB.core,a.ADB.va),function(a){"use strict";function b(){this.trackingServer=void 0,this.channel=void 0,this.ovp=void 0,this.appVersion=void 0,this.playerName=void 0,this.ssl=!1,this.debugLogging=!1}a.MediaHeartbeatConfig=b,a.MediaHeartbeatConfig.sharedInstance=new b}(a.ADB.va),function(a){"use strict";function b(){this.data={}}var c=a.plugins.videoplayer.VideoInfo,d=a.plugins.videoplayer.AdBreakInfo,e=a.plugins.videoplayer.AdInfo,f=a.plugins.videoplayer.ChapterInfo,g=a.plugins.videoplayer.QoSInfo;b.MEDIAINFO_KEY_NAME="a.name",b.MEDIAINFO_KEY_VIDEOID="a.videoId",b.MEDIAINFO_KEY_ADID="a.adId",b.MEDIAINFO_KEY_LENGTH="a.length",b.MEDIAINFO_KEY_PLAYHEAD="a.playhead",b.MEDIAINFO_KEY_MEDIATYPE="a.mediaType",b.MEDIAINFO_KEY_STREAMTYPE="a.streamType",b.MEDIAINFO_KEY_POSITION="a.position",b.MEDIAINFO_KEY_STARTTIME="a.startTime",b.MEDIAINFO_KEY_BITRATE="a.bitrate",b.MEDIAINFO_KEY_FPS="a.fps",b.MEDIAINFO_KEY_DROPPEDFRAMES="a.droppedFrames",b.MEDIAINFO_KEY_STARTUPTIME="a.startupTime",b.MEDIAINFO_KEY_TIMEDMETADATA="a.timedMetadata",b.prototype.setValue=function(a,b){this.data[a]=b},b.prototype.getValue=function(a){return this.data.hasOwnProperty(a)?this.data[a]:null},b.prototype.createVideoInfo=function(){var a=new c;return a.id=null!=this.getValue(b.MEDIAINFO_KEY_VIDEOID)?this.getValue(b.MEDIAINFO_KEY_VIDEOID):"",a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.playhead=null!=this.getValue(b.MEDIAINFO_KEY_PLAYHEAD)?this.getValue(b.MEDIAINFO_KEY_PLAYHEAD):0,a.mediaType=null!=this.getValue(b.MEDIAINFO_KEY_MEDIATYPE)?this.getValue(b.MEDIAINFO_KEY_MEDIATYPE):"",a.streamType=null!=this.getValue(b.MEDIAINFO_KEY_STREAMTYPE)?this.getValue(b.MEDIAINFO_KEY_STREAMTYPE):"",a},b.prototype.createAdBreakInfo=function(){var a=new d;return a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a.startTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTTIME)?this.getValue(b.MEDIAINFO_KEY_STARTTIME):0,a},b.prototype.createAdInfo=function(){var a=new e;return a.id=null!=this.getValue(b.MEDIAINFO_KEY_ADID)?this.getValue(b.MEDIAINFO_KEY_ADID):"",a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a},b.prototype.createChapterInfo=function(){var a=new f;return a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.startTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTTIME)?this.getValue(b.MEDIAINFO_KEY_STARTTIME):0,a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a},b.prototype.createQoSInfo=function(){var a=new g;return a.bitrate=null!=this.getValue(b.MEDIAINFO_KEY_BITRATE)?this.getValue(b.MEDIAINFO_KEY_BITRATE):0,a.fps=null!=this.getValue(b.MEDIAINFO_KEY_FPS)?this.getValue(b.MEDIAINFO_KEY_FPS):0,a.droppedFrames=null!=this.getValue(b.MEDIAINFO_KEY_DROPPEDFRAMES)?this.getValue(b.MEDIAINFO_KEY_DROPPEDFRAMES):0,a.startupTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTUPTIME)?this.getValue(b.MEDIAINFO_KEY_STARTUPTIME):0,a},b.prototype.isEqual=function(a){if(this===a)return!0;if(!a||"object"!=typeof a||"function"!=typeof a.getValue)return!1;for(var c=[b.MEDIAINFO_KEY_NAME,b.MEDIAINFO_KEY_VIDEOID,b.MEDIAINFO_KEY_ADID,b.MEDIAINFO_KEY_LENGTH,b.MEDIAINFO_KEY_PLAYHEAD,b.MEDIAINFO_KEY_STREAMTYPE,b.MEDIAINFO_KEY_MEDIATYPE,b.MEDIAINFO_KEY_POSITION,b.MEDIAINFO_KEY_STARTTIME,b.MEDIAINFO_KEY_BITRATE,b.MEDIAINFO_KEY_FPS,b.MEDIAINFO_KEY_DROPPEDFRAMES,b.MEDIAINFO_KEY_STARTUPTIME,b.MEDIAINFO_KEY_TIMEDMETADATA],d=0;d<c.length;++d){var e=c[d];if(this.getValue(e)!==a.getValue(e))return!1}return!0},a.MediaObject=b}(a.ADB.va),function(a){"use strict";function b(a,c){if(!c)throw new Error("Visitor instance cannot be NULL");this._visitor=c,this._logger=a,this._status=b.OPT_UNKNOWN,this._optInFetchPermissionsCallback=this._optInFetchPermissionsCallback.bind(this)}var c="PrivacyManager";b.prototype.getStatus=function(){return this._status},b.prototype.configure=function(a){this.reset(),this._callback=a,this._optIn=window.adobe&&window.adobe.optIn?window.adobe.optIn:void 0,this._optIn&&this._optIn.doesOptInApply?(this._logger.info(c,"OptIn service enabled"),this._waitingForOptInCallback=!0,this._optInMediaApproved=!1):this._logger.info(c,"OptIn service does not apply"),this._waitingForVisitorCallback=!0,this._visitorOptOut=!1,this._fetchVisitorOptOut(),this._fetchOptIn(),this._updateStatus()},b.prototype.reset=function(){this._unsubscribeOptIn(),this._status=b.OPT_UNKNOWN,this._callback=null},b.prototype._fetchVisitorOptOut=function(){this._logger.info(c,"Fetching Visitor.isOptedOut");try{var a=this;this._visitor.isOptedOut(function(b){a._logger.info(c,"Visitor.isOptedOut : "+b),a._waitingForVisitorCallback=!1,a._visitorOptOut=b,a._updateStatus()},void 0,!0)}catch(a){this._logger.warn(c,"Error fetching Visitor.isOptedOut"),this._waitingForVisitorCallback=!1}},b.prototype._fetchOptIn=function(){try{if(!this._optIn||!this._optIn.doesOptInApply)return;this._logger.info(c,"Fetching permissions from OptIn service"),this._optInListenerRegistered||(this._optIn.fetchPermissions(this._optInFetchPermissionsCallback,!0),this._optInListenerRegistered=!0)}catch(a){this._logger.warn(c,"Error fetching permissions from OptIn service"),this._waitingForOptInCallback=!1}},b.prototype._unsubscribeOptIn=function(){try{this._optIn&&this._optInListenerRegistered&&(this._optIn.off("complete",this._optInFetchPermissionsCallback),this._optInListenerRegistered=!1)}catch(a){this._logger.error(c,"Error unsubscribing from OptIn service")}},b.prototype._optInFetchPermissionsCallback=function(){this._waitingForOptInCallback=!1;var a=this._optIn.isApproved(this._optIn.Categories.ECID),b=this._optIn.isApproved(this._optIn.Categories.ANALYTICS),d=void 0===this._optIn.Categories.MEDIA_ANALYTICS||this._optIn.isApproved(this._optIn.Categories.MEDIA_ANALYTICS);this._optInMediaApproved=a&&b&&d,this._logger.info(c,"OptIn fetchPermissions ECID : "+a+" Analytics : "+b+" Media : "+d),this._updateStatus()},b.prototype._updateStatus=function(){if(!(this._waitingForVisitorCallback||this._optIn&&this._optIn.doesOptInApply&&this._waitingForOptInCallback)){var a=this._visitorOptOut||this._optIn&&this._optIn.doesOptInApply&&!this._optInMediaApproved,d=a?b.OPT_OUT:b.OPT_IN;if(this._status!==d){this._logger.info(c,"Privacy changed from "+this._status+" to "+d),this._status=d;var e=this;setTimeout(function(){try{e._callback&&e._callback(d)}catch(a){}},0)}}},b.OPT_OUT="optout",b.OPT_IN="optin",b.OPT_UNKNOWN="optunknown",a._PrivacyManager=b}(a.ADB.va),function(a,b){"use strict";function c(a){c.__super__.constructor.call(this),this._heartbeat=a}function d(a){d.__super__.constructor.call(this),this._heartbeat=a}function e(a){e.__super__.constructor.call(this),this._heartbeat=a}function f(a){f.__super__.constructor.call(this),this._heartbeat=a}a.extend(c,b.plugins.aa.AdobeAnalyticsPluginDelegate),c.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},a.extend(d,b.plugins.ah.AdobeHeartbeatPluginDelegate),d.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},d.prototype.onTrackingDisabled=function(){this._heartbeat&&this._heartbeat._onDelegateTrackingDisabled()},a.extend(e,b.HeartbeatDelegate),e.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},a.extend(f,b.plugins.videoplayer.VideoPlayerPluginDelegate),f.prototype.getVideoInfo=function(){return this._heartbeat&&this._heartbeat._videoInfo?(this._heartbeat._delegate&&(this._heartbeat._videoInfo.playhead=this._heartbeat._delegate.getCurrentPlaybackTime()),this._heartbeat._videoInfo):null},f.prototype.getAdBreakInfo=function(){return this._heartbeat&&this._heartbeat._adBreakInfo?this._heartbeat._adBreakInfo:null},f.prototype.getAdInfo=function(){return this._heartbeat&&this._heartbeat._adInfo?this._heartbeat._adInfo:null},f.prototype.getChapterInfo=function(){return this._heartbeat&&this._heartbeat._chapterInfo?this._heartbeat._chapterInfo:null},f.prototype.getQoSInfo=function(){if(this._heartbeat&&this._heartbeat._delegate&&this._heartbeat._delegate.getQoSObject()){var a=this._heartbeat._delegate.getQoSObject();if(a&&"object"==typeof a&&a.setValue)return a.createQoSInfo()}return null},b._MediaAnalyticsPluginDelegate=c,b._MediaHeartbeatPluginDelegate=d,b._ADBMediaHeartbeatDelegate=e,b._MediaHeartbeatVideoPlayerPluginDelegate=f}(a.ADB.core,a.ADB.va),function(a,b){"use strict";function c(a,d){c.__super__.constructor.call(this),this._heartbeat=a,this._logger=d,this._validator=new b.plugins.nielsen.MetadataValidator(d)}var d="MediaHeartbeatNielsenPluginDelegate",e={NielsenContentMetadata:"media_nielsen_content_metadata",NielsenChannelMetadata:"media_nielsen_channel_metadata",NielsenAdMetadata:"media_nielsen_ad_metadata"};b.plugins.nielsen&&a.extend(c,b.plugins.nielsen.NielsenPluginDelegate),c.prototype.getMetadataInfo=function(){if(this._heartbeat&&this._heartbeat._currentMediaObject){var a=this._heartbeat._currentMediaObject.getValue(e.NielsenContentMetadata);if(a&&"object"==typeof a)return this._validator.validateContentMetadata(a,"MediaHeartbeat.NielsenContentMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenContentMetadata in MediaObject")}return null},c.prototype.getAdMetadataInfo=function(){if(this._heartbeat&&this._heartbeat._currentAdObject){var a=this._heartbeat._currentAdObject.getValue(e.NielsenAdMetadata);if(a&&"object"==typeof a)return this._validator.validateAdMetadata(a,"MediaHeartbeat.NielsenAdMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenAdMetadata in MediaObject")}return null},c.prototype.getChannelInfo=function(){if(this._heartbeat&&this._heartbeat._currentMediaObject){var a=this._heartbeat._currentMediaObject.getValue(e.NielsenChannelMetadata);if(a&&"object"==typeof a)return this._validator.validateChannelMetadata(a,"MediaHeartbeat.NielsenChannelMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenChannelMetadata in MediaObject")}return null},c.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},b.plugins.nielsen&&(b._NielsenObjectKey=e,b._NielsenPluginDelegate=c)}(a.ADB.core,a.ADB.va),function(b,c){"use strict";function d(){}function e(b,d,e){if(this._appMeasurement=e||a.s,!this._appMeasurement)throw new Error("MediaHeartbeat needs a valid AppMeasurement instance.");if(!this._appMeasurement.visitor||!this._appMeasurement.visitor.marketingCloudOrgID)throw new Error("MediaHeartbeat needs a valid visitor instance with marketingCloudOrgId set.");if(!b)throw new Error("MediaHeartbeat needs a valid delegate object.");if(!d||"object"!=typeof d||!d.trackingServer)throw new Error("MediaHeartbeat needs a valid config object with trackingServer set.");this._config=d,this._delegate=b,this._debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._logger=new f,this._debugLogging?this._logger.enable():this._logger.disable(),this._ruleEngine=new t(this._logger),this._taskScheduler=new u(this._logger),this._privacyManager=new v(this._logger,this._appMeasurement.visitor),this._resetState(),this._setupRules()}var f=b.Logger,g=c.MediaObject,h=c.Heartbeat,i=c.HeartbeatConfig,j=c._ADBMediaHeartbeatDelegate,k=c.plugins.videoplayer.VideoPlayerPlugin,l=c.plugins.videoplayer.VideoPlayerPluginConfig,m=c._MediaHeartbeatVideoPlayerPluginDelegate,n=c.plugins.aa.AdobeAnalyticsPlugin,o=c.plugins.aa.AdobeAnalyticsPluginConfig,p=c._MediaAnalyticsPluginDelegate,q=c.plugins.ah.AdobeHeartbeatPlugin,r=c.plugins.ah.AdobeHeartbeatPluginConfig,s=c._MediaHeartbeatPluginDelegate,t=c._RuleEngine,u=c._TaskScheduler,v=c._PrivacyManager,w=c.utils.ObjectUtils,x=c.utils.VersionUtils;if(d.prototype.getCurrentPlaybackTime=function(){return null},d.prototype.getQoSObject=function(){return null},e.MediaType={Video:"video",Audio:"audio"},e.Event={AdBreakStart:"adBreakStart",AdBreakComplete:"adBreakComplete",AdStart:"adStart",AdComplete:"adComplete",AdSkip:"adSkip",ChapterStart:"chapterStart",ChapterComplete:"chapterComplete",ChapterSkip:"chapterSkip",SeekStart:"seekStart",SeekComplete:"seekComplete",BufferStart:"bufferStart",BufferComplete:"bufferComplete",BitrateChange:"bitrateChange",TimedMetadataUpdate:"timedMetadataUpdate"},e.StreamType={VOD:"vod",LIVE:"live",LINEAR:"linear",PODCAST:"podcast",AUDIOBOOK:"audiobook",AOD:"aod"},e.MediaObjectKey={StandardVideoMetadata:"media_standard_content_metadata",StandardMediaMetadata:"media_standard_content_metadata",StandardAdMetadata:"media_standard_ad_metadata",VideoResumed:"resumed",MediaResumed:"resumed",PrerollTrackingWaitingTime:"preroll_tracking_waiting_time"},e.VideoMetadataKeys=c.plugins.aa.VideoMetadataKeys,e.AudioMetadataKeys=c.plugins.aa.AudioMetadataKeys,e.AdMetadataKeys=c.plugins.aa.AdMetadataKeys,e.createMediaObject=function(a,b,c,d,f){var h=new g;h.setValue(g.MEDIAINFO_KEY_VIDEOID,b),h.setValue(g.MEDIAINFO_KEY_NAME,a),h.setValue(g.MEDIAINFO_KEY_LENGTH,c),h.setValue(g.MEDIAINFO_KEY_PLAYHEAD,0);var i=d||e.StreamType.VOD;return h.setValue(g.MEDIAINFO_KEY_STREAMTYPE,i),("string"!=typeof f||f!=e.MediaType.Video&&f!=e.MediaType.Audio)&&(f=e.MediaType.Video),h.setValue(g.MEDIAINFO_KEY_MEDIATYPE,f),h},e.createAdBreakObject=function(a,b,c){var d=new g;return d.setValue(g.MEDIAINFO_KEY_NAME,a),d.setValue(g.MEDIAINFO_KEY_POSITION,b),d.setValue(g.MEDIAINFO_KEY_STARTTIME,c),d},e.createAdObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_NAME,a),e.setValue(g.MEDIAINFO_KEY_ADID,b),e.setValue(g.MEDIAINFO_KEY_POSITION,c),e.setValue(g.MEDIAINFO_KEY_LENGTH,d),e},e.createChapterObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_NAME,a),e.setValue(g.MEDIAINFO_KEY_POSITION,b),e.setValue(g.MEDIAINFO_KEY_LENGTH,c),e.setValue(g.MEDIAINFO_KEY_STARTTIME,d),e},e.createQoSObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_BITRATE,a),e.setValue(g.MEDIAINFO_KEY_FPS,c),e.setValue(g.MEDIAINFO_KEY_DROPPEDFRAMES,d),e.setValue(g.MEDIAINFO_KEY_STARTUPTIME,b),e},e.createTimedMetadataObject=function(a){var b=new g;return b.setValue(g.MEDIAINFO_KEY_TIMEDMETADATA,a),b},e.version=function(){return c.Version.getVersion()},e.prototype.trackSessionStart=function(a,b){this._logger.info(D,"#::trackSessionStart()");var c=t.createContext();c.setData(E,a),c.setData(J,this._cleanContextData(b)),this._processRule(B.SessionStart,c)},e.prototype.trackPlay=function(){this._logger.info(D,"#::trackPlay()"),this._processRule(B.Play)},e.prototype.trackPause=function(){this._logger.info(D,"#::trackPause()"),this._processRule(B.Pause)},e.prototype.trackComplete=function(){this._logger.info(D,"#::trackComplete()"),this._processRule(B.VideoComplete)},e.prototype.trackSessionEnd=function(){this._logger.info(D,"#::trackSessionEnd()"),this._processRule(B.SessionEnd)},e.prototype.trackError=function(a){this._logger.info(D,"#::trackError()");var b=t.createContext();b.setData(K,a),this._processRule(B.Error,b)},e.prototype.trackEvent=function(a,b,c){this._logger.info(D,"#::trackEvent() - "+a);var d,f=t.createContext();switch(a){case e.Event.AdBreakStart:f.setData(F,b),f.setData(J,this._cleanContextData(c)),d=B.AdBreakStart;break;case e.Event.AdBreakComplete:d=B.AdBreakComplete;break;case e.Event.AdStart:f.setData(G,b),f.setData(J,this._cleanContextData(c)),d=B.AdStart;break;case e.Event.AdComplete:d=B.AdComplete;break;case e.Event.AdSkip:d=B.AdSkip;break;case e.Event.SeekStart:d=B.SeekStart;break;case e.Event.SeekComplete:d=B.SeekComplete;break;case e.Event.ChapterStart:f.setData(H,b),f.setData(J,this._cleanContextData(c)),d=B.ChapterStart;break;case e.Event.ChapterComplete:d=B.ChapterComplete;break;case e.Event.ChapterSkip:d=B.ChapterSkip;break;case e.Event.BufferStart:d=B.BufferStart;break;case e.Event.BufferComplete:d=B.BufferComplete;break;case e.Event.BitrateChange:d=B.BitrateChange;break;case e.Event.TimedMetadataUpdate:d=B.TimedMetadataUpdate,f.setData(I,b);break;default:return void this._logger.error(D,"Incorrect event name.")}this._processRule(d,f)},c.plugins.nielsen){var y=c.MediaHeartbeatConfig;y.prototype.nielsenConfigKey=void 0,y.prototype.nielsenAppInfo=void 0;var z=c._NielsenObjectKey;e.MediaObjectKey.NielsenContentMetadata=z.NielsenContentMetadata,e.MediaObjectKey.NielsenAdMetadata=z.NielsenAdMetadata,e.MediaObjectKey.NielsenChannelMetadata=z.NielsenChannelMetadata,e.NielsenContentMetadataKeys=c.plugins.nielsen.ContentMetadataKeys,e.NielsenChannelMetadataKeys=c.plugins.nielsen.ChannelMetadataKeys,e.NielsenAdMetadataKeys=c.plugins.nielsen.AdMetadataKeys,e.prototype.nielsenLoadMetadata=function(a){this._nielsenPlugin&&this._nielsenPlugin.loadMetadata(a)}}e.prototype._setState=function(a,b){this._mediaState[a]=b},e.prototype._isInState=function(a){return this._mediaState[a]},e.prototype._isTrackingDisabled=function(a){return this._mediaHeartbeatDisabled},e.prototype._isInSession=function(a){return this._isInState(A.Session)},e.prototype._isInMedia=function(a){return this._isInState(A.Media)},e.prototype._isInAd=function(a){return this._isInState(A.Ad)},e.prototype._isInAdBreak=function(a){return this._isInState(A.AdBreak)},e.prototype._isInChapter=function(a){return this._isInState(A.Chapter)},e.prototype._isInPlay=function(a){return this._isInState(A.PlayPause)},e.prototype._isInPause=function(a){return!this._isInState(A.PlayPause)},e.prototype._isInBuffer=function(a){return this._isInState(A.Buffer)},e.prototype._isInSeek=function(a){return this._isInState(A.Seek)},e.prototype._isPlatformTrackingSupported=function(a){return!this._appMeasurement.unsupportedBrowser},e.prototype._isAudioTrackingSupported=function(a){return a.getData(E).getValue(g.MEDIAINFO_KEY_MEDIATYPE)!==e.MediaType.Audio||x.isGreaterThanEqual(this._appMeasurement.version,"2.11.0")},e.prototype._isValidMediaObject=function(a){var b=a.getData(E);if(b&&b instanceof g){var c=b.getValue(e.MediaObjectKey.MediaResumed);null!=c&&"boolean"!=typeof c&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.MediaResumed in MediaObject as we expect a boolean value");var d=b.getValue(e.MediaObjectKey.PrerollTrackingWaitingTime);if(null!=d){("string"==typeof d||"number"==typeof d)&&!isNaN(d)||this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.PrerollTrackingWaitingTime in MediaObject as we expect a valid duration as number in milliseconds.")}var f=b.getValue(e.MediaObjectKey.StandardMediaMetadata);return null!=f&&"object"!=typeof f&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.StandardMediaMetadata in MediaObject as we expect a valid object with kv pairs."),!0}return!1},e.prototype._isValidAdBreakObject=function(a){var b=a.getData(F);return b&&b instanceof g},e.prototype._isDifferentAdBreakObject=function(a){var b=a.getData(F);return!(this._currentAdBreakObject&&this._currentAdBreakObject.isEqual(b))},e.prototype._isValidAdObject=function(a){var b=a.getData(G);if(b&&b instanceof g){var c=b.getValue(N);null!=c&&"boolean"!=typeof c&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.GranularAdTracking in AdObject as we expect a boolean value.");var d=b.getValue(e.MediaObjectKey.StandardAdMetadata);return null!=d&&"object"!=typeof d&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.StandardAdMetadata in AdObject as we expect a valid object with kv pairs."),!0}return!1},e.prototype._isDifferentAdObject=function(a){var b=a.getData(G);return!(this._currentAdObject&&this._currentAdObject.isEqual(b))},e.prototype._isValidChapterObject=function(a){var b=a.getData(H);return b&&b instanceof g},e.prototype._isDifferentChapterObject=function(a){var b=a.getData(H);return!(this._currentChapterObject&&this._currentChapterObject.isEqual(b))},e.prototype._isValidTimedMetadataObject=function(a){var b=a.getData(I);if(b&&b instanceof g){var c=b.getValue(g.MEDIAINFO_KEY_TIMEDMETADATA);return c&&"string"==typeof c}return!1},e.prototype._shouldAllowPlayerStateChange=function(a){return!(this._isInState(A.AdBreak)&&!this._isInState(A.Ad))},e.prototype._didBeginReporting=function(a){return this._isInState(A.Reporting)},e.prototype._deferredTrackPlay=function(){this._prerollWaitEnabled&&(this._logger.info(D,"Executing deferred API:trackPlay."),this._prerollWaitEnabled=!1,this._playTaskHandle=null,this._processRule(B.Play))},e.prototype._cmdEnterAction=function(a){var b=a.getRuleName();if(this._prerollWaitEnabled)if(this._playReceived)switch(b){case B.SeekStart:case B.BufferStart:this._logger.info(D,"Cancelling scheduled API:trackPlay because of SeekStart/BufferStart event"),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null;break;case B.SeekComplete:case B.BufferComplete:this._logger.info(D,"Rescheduled API:trackPlay after SeekComplete/BufferComplete event"),this._playTaskHandle=this._taskScheduler.scheduleTask(this._deferredTrackPlay,this,this._prerollWaitTime);break;case B.Play:this._logger.info(D,"Dropping API:trackPlay as we already have a API:trackPlay scheduled."),a.stopProcessingAction();break;case B.Pause:this._logger.info(D,"Cancelling scheduled API:trackPlay because of API:trackPause call."),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null,this._prerollWaitEnabled=!1;break;case B.AdBreakStart:this._logger.info(D,"Received API:trackEvent(AdBreakStart) within "+this._prerollWaitTime+" ms after API:trackPlay. We will track this as preroll AdBreak."),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null,this._prerollWaitEnabled=!1,this._playAfterAdStart=!0}else switch(b){case B.Play:this._logger.info(D,"Deferring API:trackPlay for "+this._prerollWaitTime+" ms."),this._playReceived=!0,this._playUnhandledFromPrerollWaitTime=!0,this._playTaskHandle=this._taskScheduler.scheduleTask(this._deferredTrackPlay,this,this._prerollWaitTime),a.stopProcessingAction();break;case B.Pause:this._logger.info(D,"Received trackPause before first trackPlay."),this._prerollWaitEnabled=!1;break;case B.AdBreakStart:this._logger.info(D,"Received trackEvent(AdBreakStart) before first trackPlay."),this._prerollWaitEnabled=!1}},e.prototype._cmdExitAction=function(a){var b=a.getRuleName();this._playAfterAdStart&&(b===B.AdStart?(this._cmdPlay(a),this._playAfterAdStart=!1):b===B.AdBreakComplete&&(this._playAfterAdStart=!1)),b!==B.AdStart||this._isInState(A.FPlayPause)||this._cmdPlay(a),this._prerollWaitEnabled||!this._playUnhandledFromPrerollWaitTime||b!==B.BufferComplete&&b!==B.SeekComplete&&b!==B.AdBreakComplete||this._isInState(A.FPlayPause)||this._isInState(A.Buffer)||this._isInState(A.Seek)||(this._logger.info(D,"Executing pending API:trackPlay. This case most likely happens tracking Preroll AdBreak without any Ads."),this._cmdPlay(a))},e.prototype._cmdConfigure=function(a){this._configureAdobeAnalyticsPlugin(),this._configureAdobeHearbeatPlugin(),this._configureVideoPlayerPlugin(),this._configureOtherPlugins(),this._configureHeartbeat(),this._privacyManager.configure(this._onPrivacyChange.bind(this))},e.prototype._cmdBeginReporting=function(a){this._playerPlugin&&this._playerPlugin.beginReporting(),this._setState(A.Reporting,!0)},e.prototype._cmdSessionStart=function(a){var b=a.getData(E),c=a.getData(J);this._currentMediaObject=b,this._videoInfo=b.createVideoInfo(),this._videoInfo.playerName=this._config.playerName?this._config.playerName:"";var d=b.getValue(e.MediaObjectKey.StandardMediaMetadata);d&&"object"==typeof d||(d=null);var f=b.getValue(e.MediaObjectKey.MediaResumed);"boolean"==typeof f&&(this._videoInfo.resumed=f);var g=b.getValue(e.MediaObjectKey.PrerollTrackingWaitingTime);"string"!=typeof g&&"number"!=typeof g||isNaN(g)||(this._prerollWaitTime=Number(g),this._prerollWaitTime<=0&&(this._prerollWaitEnabled=!1));var h=this._prepareMetadata(d,c);h[L]=this._videoInfo.mediaType,this._aaPlugin.setVideoMetadata(h),this._playerPlugin.trackVideoLoad(),this._playerPlugin.trackSessionStart(),this._setState(A.Session,!0),this._setState(A.Media,!0)},e.prototype._destroyHeartbeat=function(a,b){a&&a.trackVideoUnload(),b&&b.destroy()},e.prototype._cmdVideoEnd=function(a){var b=a.getRuleName()===B.VideoComplete;if(this._isInState(A.Reporting)){var c=this,d=this._heartbeat,e=this._playerPlugin;this._playerPlugin.trackComplete(function(){c._destroyHeartbeat(e,d)},b)}else this._destroyHeartbeat(this._playerPlugin,this._heartbeat);this._setState(A.Media,!1)},e.prototype._cmdHandleMediaComplete=function(a){this._isInMedia(a)||(this._logger.info(D,"API:trackComplete has already cleaned up Heartbeat instance."),this._cmdSessionEnd(a),a.stopProcessingAction())},e.prototype._cmdSessionEnd=function(a){this._setState(A.Session,!1),this._resetState()},e.prototype._cmdDisableTracking=function(a){this._logger.info(D,"#_cmdDisableTracking: ADBMediaHeartbeat Tracking Disabled Remotely."),this._mediaHeartbeatDisabled=!0},e.prototype._cmdBufferStart=function(a){this._playerPlugin.trackBufferStart(),this._setState(A.Buffer,!0)},e.prototype._cmdBufferComplete=function(a){this._isInState(A.Buffer)&&this._playerPlugin.trackBufferComplete(),this._setState(A.Buffer,!1)},e.prototype._cmdSeekStart=function(a){this._playerPlugin.trackSeekStart(),this._setState(A.Seek,!0)},e.prototype._cmdSeekComplete=function(a){this._isInState(A.Seek)&&this._playerPlugin.trackSeekComplete(),this._setState(A.Seek,!1)},e.prototype._cmdPlay=function(a){this._playerPlugin.trackPlay(),this._setState(A.PlayPause,!0),this._setState(A.FPlayPause,!0),this._playUnhandledFromPrerollWaitTime=!1},e.prototype._cmdPause=function(a){this._playerPlugin.trackPause(),this._setState(A.PlayPause,!1),this._setState(A.FPlayPause,!0)},e.prototype._cmdAdBreakStart=function(a){var b=a.getData(F);this._currentAdBreakObject=b,this._adBreakInfo=b.createAdBreakInfo(),this._adBreakInfo.playerName=this._config.playerName?this._config.playerName:"",this._playerPlugin.trackAdBreakStart(),this._setState(A.AdBreak,!0)},e.prototype._cmdAdBreakComplete=function(a){this._currentAdBreakObject=null,this._adBreakInfo=null,this._isInState(A.AdBreak)&&this._playerPlugin.trackAdBreakComplete(),this._setState(A.AdBreak,!1)},e.prototype._cmdAdStart=function(a){var b=a.getData(G),c=a.getData(J);this._currentAdObject=b,this._adInfo=b.createAdInfo();var d=b.getValue(N);"boolean"==typeof d&&(this._adInfo.granularTracking=d);var f=b.getValue(e.MediaObjectKey.StandardAdMetadata);f&&"object"==typeof f||(f=null);var g=this._prepareMetadata(f,c);this._aaPlugin.setAdMetadata(g),this._playerPlugin.trackAdStart(),this._setState(A.Ad,!0)},e.prototype._cmdAdComplete=function(a){this._currentAdObject=null,this._adInfo=null,this._isInState(A.Ad)&&this._playerPlugin.trackAdComplete(),this._setState(A.Ad,!1)},e.prototype._cmdAdSkip=function(a){this._currentAdObject=null,this._adInfo=null,this._isInState(A.Ad)&&this._playerPlugin.trackAdSkip(),this._setState(A.Ad,!1)},e.prototype._cmdChapterStart=function(a){var b=a.getData(H),c=a.getData(J);this._currentChapterObject=b,this._chapterInfo=b.createChapterInfo();var d=this._prepareMetadata(null,c);this._aaPlugin.setChapterMetadata(d),this._playerPlugin.trackChapterStart(),this._setState(A.Chapter,!0)},e.prototype._cmdChapterComplete=function(a){this._currentChapterObject=null,this._chapterInfo=null,this._isInState(A.Chapter)&&this._playerPlugin.trackChapterComplete(),this._setState(A.Chapter,!1)},e.prototype._cmdChapterSkip=function(a){this._currentChapterObject=null,this._chapterInfo=null,this._isInState(A.Chapter)&&this._playerPlugin.trackChapterSkip(),this._setState(A.Chapter,!1)},e.prototype._cmdError=function(a){var b=a.getData(K);b||(b="unknown_error_id"),this._playerPlugin.trackVideoPlayerError(b)},e.prototype._cmdBitrate=function(a){this._playerPlugin.trackBitrateChange()},e.prototype._cmdTimedMetadataUpdate=function(a){var b=a.getData(I),c=b.getValue(g.MEDIAINFO_KEY_TIMEDMETADATA);this._playerPlugin.trackTimedMetadata(c)},e.prototype._processRule=function(a,b){return this._ruleEngine.processRule(a,b)},e.prototype._setupRules=function(){this._ruleEngine.registerEnterExitAction(this._cmdEnterAction,this._cmdExitAction),this._ruleEngine.registerRule(B.SessionStart,"API:trackSessionStart",[t.createPredicate(this._isPlatformTrackingSupported,!0,C.ErrUnSupportedPlatform),t.createPredicate(this._isTrackingDisabled,!1,C.ErrTrackingDisabled),t.createPredicate(this._isInSession,!1,C.ErrInSession),t.createPredicate(this._isValidMediaObject,!0,C.ErrInvalidMediaObject),t.createPredicate(this._isAudioTrackingSupported,!0,C.ErrAudioTrackingNotSupported)],[this._cmdConfigure,this._cmdSessionStart],this),this._ruleEngine.registerRule(B.SessionEnd,"API:trackSessionEnd",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession)],[this._cmdHandleMediaComplete,this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdChapterSkip,this._cmdVideoEnd,this._cmdSessionEnd],this),this._ruleEngine.registerRule(B.VideoComplete,"API:trackComplete",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdChapterSkip,this._cmdVideoEnd],this),this._ruleEngine.registerRule(B.Error,"API:trackError",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdError],this),this._ruleEngine.registerRule(B.Play,"API:trackPlay",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState)],[this._cmdSeekComplete,this._cmdBufferComplete,this._cmdPlay],this),this._ruleEngine.registerRule(B.Pause,"API:trackPause",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer),t.createPredicate(this._isInSeek,!1,C.ErrInSeek)],[this._cmdPause],this),this._ruleEngine.registerRule(B.BufferStart,"API:trackEvent(BufferStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer),t.createPredicate(this._isInSeek,!1,C.ErrInSeek)],[this._cmdBufferStart],this),this._ruleEngine.registerRule(B.BufferComplete,"API:trackEvent(BufferComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!0,C.ErrNotInBuffer)],[this._cmdBufferComplete],this),this._ruleEngine.registerRule(B.SeekStart,"API:trackEvent(SeekStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInSeek,!1,C.ErrInSeek),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer)],[this._cmdSeekStart],this),this._ruleEngine.registerRule(B.SeekComplete,"API:trackEvent(SeekComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInSeek,!0,C.ErrNotInSeek)],[this._cmdSeekComplete],this),this._ruleEngine.registerRule(B.AdBreakStart,"API:trackEvent(AdBreakStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidAdBreakObject,!0,C.ErrInvalidAdBreakObject),t.createPredicate(this._isDifferentAdBreakObject,!0,C.ErrDuplicateAdBreakObject)],[this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdAdBreakStart],this),this._ruleEngine.registerRule(B.AdBreakComplete,"API:trackEvent(AdBreakComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak)],[this._cmdAdSkip,this._cmdAdBreakComplete],this),this._ruleEngine.registerRule(B.AdStart,"API:trackEvent(AdStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isValidAdObject,!0,C.ErrInvalidAdObject),t.createPredicate(this._isDifferentAdObject,!0,C.ErrDuplicateAdObject)],[this._cmdAdSkip,this._cmdAdStart],this),this._ruleEngine.registerRule(B.AdComplete,"API:trackEvent(AdComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isInAd,!0,C.ErrNotInAd)],[this._cmdAdComplete],this),this._ruleEngine.registerRule(B.AdSkip,"API:trackEvent(AdSkip)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isInAd,!0,C.ErrNotInAd)],[this._cmdAdSkip],this),this._ruleEngine.registerRule(B.ChapterStart,"API:trackEvent(ChapterStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidChapterObject,!0,C.ErrInvalidChapterObject),t.createPredicate(this._isDifferentChapterObject,!0,C.ErrDuplicateChapterObject)],[this._cmdChapterSkip,this._cmdChapterStart],this),this._ruleEngine.registerRule(B.ChapterComplete,"API:trackEvent(ChapterComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInChapter,!0,C.ErrNotInChapter)],[this._cmdChapterComplete],this),this._ruleEngine.registerRule(B.ChapterSkip,"API:trackEvent(ChapterSkip)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInChapter,!0,C.ErrNotInChapter)],[this._cmdChapterSkip],this),this._ruleEngine.registerRule(B.BitrateChange,"API:trackEvent(BitrateChange)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdBitrate],this),this._ruleEngine.registerRule(B.TimedMetadataUpdate,"API:trackEvent(TimedMetadataUpdate)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidTimedMetadataObject,!0,C.ErrInvalidTimedMetadataObject)],[this._cmdTimedMetadataUpdate],this),this._ruleEngine.registerRule(B.DisableTracking,"Internal::DisableTracking",[t.createPredicate(this._isTrackingDisabled,!1,C.ErrTrackingDisabled)],[this._cmdDisableTracking],this),this._ruleEngine.registerRule(B.BeginReporting,"Internal::BeginReporting",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._didBeginReporting,!1,C.ErrBeginReporting)],[this._cmdBeginReporting],this)},e.prototype._configureAdobeAnalyticsPlugin=function(){this._aaPlugin=new n(this._appMeasurement,new p(this));var a=new o;a.channel=this._config.channel?this._config.channel:"",a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._aaPlugin.configure(a),this._plugins.push(this._aaPlugin)},e.prototype._configureAdobeHearbeatPlugin=function(){var a=this._appMeasurement.visitor?this._appMeasurement.visitor.marketingCloudOrgID:"";this._ahPlugin=new q(new s(this));var b=new r(this._config.trackingServer,a);b.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,b.ovp=this._config.ovp?this._config.ovp:"",b.ssl=this._config.ssl,b.sdk=this._config.appVersion?this._config.appVersion:"";var d=this._primetimeTVSDKVersion();d&&d.length>0&&(b.__primetime=!0,b.__psdkVersion=d),this._ahPlugin.configure(b),this._plugins.push(this._ahPlugin)},e.prototype._configureVideoPlayerPlugin=function(){this._playerPlugin=new k(new m(this));var a=new l;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._playerPlugin.configure(a),this._plugins.push(this._playerPlugin)},e.prototype._configureOtherPlugins=function(){if(c.plugins.nielsen&&this._config.nielsenConfigKey&&this._config.nielsenAppInfo){this._nielsenPlugin=new c.plugins.nielsen.NielsenPlugin(new c._NielsenPluginDelegate(this,this._logger));var a=new c.plugins.nielsen.NielsenPluginConfig;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,a.appInfo=this._config.nielsenAppInfo,a.configKey=this._config.nielsenConfigKey,this._nielsenPlugin.configure(a),this._plugins.push(this._nielsenPlugin)}},e.prototype._configureHeartbeat=function(){var a=new i;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._heartbeat=new h(new j(this),this._plugins),this._heartbeat.configure(a)},e.prototype._resetState=function(){this._taskScheduler.clearTasks(),this._privacyManager.reset(),this._mediaState={},this._plugins=[],this._playerPlugin=null,this._aaPlugin=null,this._ahPlugin=null,this._nielsenPlugin=null,this._heartbeat=null,this._currentMediaObject=null,this._currentAdBreakObject=null,this._currentAdObject=null,this._currentChapterObject=null,this._videoInfo=null,this._adBreakInfo=null,this._adInfo=null,this._chapterInfo=null,this._prerollWaitEnabled=!0,this._prerollWaitTime=O,this._playReceived=!1,this._playUnhandledFromPrerollWaitTime=!1,this._playTaskHandle=null,this._playAfterAdStart=!1},e.prototype._primetimeTVSDKVersion=function(){return this._currentMediaObject?this._currentMediaObject.getValue(M):null},e.prototype._cleanContextData=function(a){if(null==a||"object"!=typeof a)return null;var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];"number"!=typeof d&&"string"!=typeof d&&"boolean"!=typeof d||(b[c]=d)}return b},e.prototype._prepareMetadata=function(a,b){var c={};if(b&&w.append(c,b),a){var d=this._cleanContextData(a);w.append(c,d)}return delete c[L],c},e.prototype._onDelegateError=function(a){this._logger.error(D,a.getMessage()+" | "+a.getDetails())},e.prototype._onDelegateTrackingDisabled=function(){this._processRule(B.SessionEnd),this._processRule(B.DisableTracking)},e.prototype._onPrivacyChange=function(a){this._logger.info(D,"#_onPrivacyChange: Privacy Status: "+a),a===v.OPT_IN?this._processRule(B.BeginReporting):a===v.OPT_OUT&&this._processRule(B.SessionEnd)};var A={Session:0,Media:1,AdBreak:2,Ad:3,Chapter:4,PlayPause:5,Buffer:6,Seek:7,FPlayPause:8,Reporting:9},B={SessionStart:0,SessionEnd:1,VideoComplete:2,Play:3,Pause:4,Error:5,AdBreakStart:6,AdBreakComplete:7,AdStart:8,AdComplete:9,AdSkip:10,ChapterStart:11,ChapterComplete:12,ChapterSkip:13,SeekStart:14,SeekComplete:15,BufferStart:16,BufferComplete:17,BitrateChange:18,TimedMetadataUpdate:19,DisableTracking:20,BeginReporting:21},C={ErrUnSupportedPlatform:"MediaHeartbeat does not support tracking due to AppMeasurement or VisitorAPI not supporting the browser.",ErrNotInSession:'MediaHeartbeat is not in active tracking session, call "API:trackSessionStart" to begin a new tracking session.',ErrInSession:'MediaHeartbeat is in active tracking session, call "API:trackSessionEnd" to end current tracking session.',ErrNotInMedia:'MediaHeartbeat has completed tracking session, call "API:trackSessionEnd" first to end current session and then begin a new tracking session.',ErrInBuffer:'MediaHeartbeat is tracking buffer events, call "API:trackEvent(BufferComplete)" first to stop tracking buffer events.',ErrNotInBuffer:'MediaHeartbeat is not tracking buffer events, call "API:trackEvent(BufferStart)" before "API:trackEvent(BufferComplete)".',ErrInSeek:'MediaHeartbeat is tracking seek events, call "API:trackEvent(SeekComplete)" first to stop tracking seek events.',ErrNotInSeek:'MediaHeartbeat is not tracking seek events, call "API:trackEvent(SeekStart)" before "API:trackEvent(SeekComplete)".',ErrNotInAdBreak:'MediaHeartbeat is not tracking any AdBreak, call "API:trackEvent(AdBreakStart)" to begin tracking AdBreak',ErrNotInAd:'MediaHeartbeat is not tracking any Ad, call "API:trackEvent(AdStart)" to begin tracking Ad',ErrNotInChapter:'MediaHeartbeat is not tracking any Chapter, call "API:trackEvent(ChapterStart)" to begin tracking Chapter',ErrInvalidMediaObject:'MediaInfo passed into "API:trackSessionStart" is invalid.',ErrInvalidAdBreakObject:'AdBreakInfo passed into "API:trackEvent(AdBreakStart)" is invalid.',ErrDuplicateAdBreakObject:'MediaHeartbeat is currently tracking the AdBreak passed into "API:trackEvent(AdBreakStart)".',ErrInvalidAdObject:'AdInfo passed into "API:trackEvent(AdStart)" is invalid.',ErrDuplicateAdObject:'MediaHeartbeat is currently tracking the Ad passed into "API:trackEvent(AdStart)".',ErrInvalidChapterObject:'ChapterInfo passed into "API:trackEvent(ChapterStart)" is invalid.',ErrDuplicateChapterObject:'MediaHeartbeat is currently tracking the Chapter passed into "API:trackEvent(ChapterStart)".',ErrInvalidTimedMetadataObject:'TimedMetadata passed into "API:trackEvent(TimedMetadataUpdate)" is invalid.',ErrInvalidPlayerState:"MediaHeartbeat is tracking an AdBreak but not tracking any Ad and will drop any calls to track player state (Play, Pause, Buffer or Seek) in this state.",ErrAudioTrackingNotSupported:"Upgrade your AppMeasurement library to version >= '2.11.0' to support tracking audio content.",ErrTrackingDisabled:"MediaHeartbeat tracking is disabled for this publisher. Please contact Adobe Representative to enable tracking.",ErrBeginReporting:"MediaHeartbeat has already started reporting."},D="MediaHeartbeat",E="key_media_object",F="key_adbreak_object",G="key_ad_object",H="key_chapter_object",I="key_timed_metadata_object",J="key_custom_metadata",K="key_error_id",L="a.media.streamType",M="a.__pttvsdkVersion",N="granular_ad_tracking",O=250;c._MediaHeartbeatRule=B,c._MediaHeartbeatErrorMessage=C,c.MediaHeartbeatDelegate=d,c.MediaHeartbeat=e,c.MediaHeartbeat._debugLogging=!1}(a.ADB.core,a.ADB.va),a.ADB||(a.ADB={}),a.ADB.core||(a.ADB.core=core),a.ADB.va||(a.ADB.va=va),a.ADB.va.plugins||(a.ADB.va.plugins={})}(this);
|
|
72
|
-
|
|
73
|
-
}).call(lib);
|
|
74
|
-
exports.va = lib.ADB.va;
|
|
75
|
-
exports.core = lib.ADB.core;
|
|
76
|
-
}));
|
|
1
|
+
/*************************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* ___________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2020 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
**************************************************************************/
|
|
17
|
+
/*
|
|
18
|
+
* MediaSDK - 2.2.2 - 2020-06-24
|
|
19
|
+
* Copyright (c) 2020 Adobe. All Rights Reserved.
|
|
20
|
+
*
|
|
21
|
+
* Copyright for external libraries used in Media SDK
|
|
22
|
+
* JavaScript MD5 1.0.1
|
|
23
|
+
* https://github.com/blueimp/JavaScript-MD5
|
|
24
|
+
*
|
|
25
|
+
* Copyright 2011, Sebastian Tschan
|
|
26
|
+
* https://blueimp.net
|
|
27
|
+
*
|
|
28
|
+
* Licensed under the MIT license:
|
|
29
|
+
* http://www.opensource.org/licenses/MIT
|
|
30
|
+
*
|
|
31
|
+
* Based on
|
|
32
|
+
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
|
33
|
+
* Digest Algorithm, as defined in RFC 1321.
|
|
34
|
+
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
|
|
35
|
+
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
36
|
+
* Distributed under the BSD License
|
|
37
|
+
* See http://pajhome.org.uk/crypt/md5 for more info.
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* umdjs (commonjsStrict.js)
|
|
41
|
+
* Copyright (c) the UMD contributors
|
|
42
|
+
* Licensed under the MIT license:
|
|
43
|
+
* https://github.com/umdjs/umd/blob/master/LICENSE.md
|
|
44
|
+
*/
|
|
45
|
+
(function (root, factory) {
|
|
46
|
+
if (typeof define === 'function' && define.amd) {
|
|
47
|
+
define(['exports'], factory);
|
|
48
|
+
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
|
|
49
|
+
factory(exports);
|
|
50
|
+
} else {
|
|
51
|
+
factory(root.ADB = {});
|
|
52
|
+
}
|
|
53
|
+
}(typeof self !== 'undefined' ? self : this, function (exports) {
|
|
54
|
+
var lib = {};
|
|
55
|
+
(function () {
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
// Heartbeat core
|
|
59
|
+
!function(a){if(void 0===b)var b={};if(void 0===c)var c={};if(void 0===d)var d={};if(d.radio||(d.radio={}),d.plugin||(d.plugin={}),void 0===e)var e={};e.clock||(e.clock={}),function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b);return(a>>16)+(b>>16)+(c>>16)<<16|65535&c}function c(a,b){return a<<b|a>>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<<c%32,a[14+(c+64>>>9<<4)]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d<a.length;d+=16)i=m,j=n,k=o,l=p,m=e(m,n,o,p,a[d],7,-680876936),p=e(p,m,n,o,a[d+1],12,-389564586),o=e(o,p,m,n,a[d+2],17,606105819),n=e(n,o,p,m,a[d+3],22,-1044525330),m=e(m,n,o,p,a[d+4],7,-176418897),p=e(p,m,n,o,a[d+5],12,1200080426),o=e(o,p,m,n,a[d+6],17,-1473231341),n=e(n,o,p,m,a[d+7],22,-45705983),m=e(m,n,o,p,a[d+8],7,1770035416),p=e(p,m,n,o,a[d+9],12,-1958414417),o=e(o,p,m,n,a[d+10],17,-42063),n=e(n,o,p,m,a[d+11],22,-1990404162),m=e(m,n,o,p,a[d+12],7,1804603682),p=e(p,m,n,o,a[d+13],12,-40341101),o=e(o,p,m,n,a[d+14],17,-1502002290),n=e(n,o,p,m,a[d+15],22,1236535329),m=f(m,n,o,p,a[d+1],5,-165796510),p=f(p,m,n,o,a[d+6],9,-1069501632),o=f(o,p,m,n,a[d+11],14,643717713),n=f(n,o,p,m,a[d],20,-373897302),m=f(m,n,o,p,a[d+5],5,-701558691),p=f(p,m,n,o,a[d+10],9,38016083),o=f(o,p,m,n,a[d+15],14,-660478335),n=f(n,o,p,m,a[d+4],20,-405537848),m=f(m,n,o,p,a[d+9],5,568446438),p=f(p,m,n,o,a[d+14],9,-1019803690),o=f(o,p,m,n,a[d+3],14,-187363961),n=f(n,o,p,m,a[d+8],20,1163531501),m=f(m,n,o,p,a[d+13],5,-1444681467),p=f(p,m,n,o,a[d+2],9,-51403784),o=f(o,p,m,n,a[d+7],14,1735328473),n=f(n,o,p,m,a[d+12],20,-1926607734),m=g(m,n,o,p,a[d+5],4,-378558),p=g(p,m,n,o,a[d+8],11,-2022574463),o=g(o,p,m,n,a[d+11],16,1839030562),n=g(n,o,p,m,a[d+14],23,-35309556),m=g(m,n,o,p,a[d+1],4,-1530992060),p=g(p,m,n,o,a[d+4],11,1272893353),o=g(o,p,m,n,a[d+7],16,-155497632),n=g(n,o,p,m,a[d+10],23,-1094730640),m=g(m,n,o,p,a[d+13],4,681279174),p=g(p,m,n,o,a[d],11,-358537222),o=g(o,p,m,n,a[d+3],16,-722521979),n=g(n,o,p,m,a[d+6],23,76029189),m=g(m,n,o,p,a[d+9],4,-640364487),p=g(p,m,n,o,a[d+12],11,-421815835),o=g(o,p,m,n,a[d+15],16,530742520),n=g(n,o,p,m,a[d+2],23,-995338651),m=h(m,n,o,p,a[d],6,-198630844),p=h(p,m,n,o,a[d+7],10,1126891415),o=h(o,p,m,n,a[d+14],15,-1416354905),n=h(n,o,p,m,a[d+5],21,-57434055),m=h(m,n,o,p,a[d+12],6,1700485571),p=h(p,m,n,o,a[d+3],10,-1894986606),o=h(o,p,m,n,a[d+10],15,-1051523),n=h(n,o,p,m,a[d+1],21,-2054922799),m=h(m,n,o,p,a[d+8],6,1873313359),p=h(p,m,n,o,a[d+15],10,-30611744),o=h(o,p,m,n,a[d+6],15,-1560198380),n=h(n,o,p,m,a[d+13],21,1309151649),m=h(m,n,o,p,a[d+4],6,-145523070),p=h(p,m,n,o,a[d+11],10,-1120210379),o=h(o,p,m,n,a[d+2],15,718787259),n=h(n,o,p,m,a[d+9],21,-343485551),m=b(m,i),n=b(n,j),o=b(o,k),p=b(p,l);return[m,n,o,p]}function j(a){var b,c="";for(b=0;b<32*a.length;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b<c.length;b+=1)c[b]=0;for(b=0;b<8*a.length;b+=8)c[b>>5]|=(255&a.charCodeAt(b/8))<<b%32;return c}function l(a){return j(i(k(a),8*a.length))}function m(a,b){var c,d,e=k(a),f=[],g=[];for(f[15]=g[15]=void 0,e.length>16&&(e=i(e,8*a.length)),c=0;c<16;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c<a.length;c+=1)b=a.charCodeAt(c),e+=d.charAt(b>>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}a.md5=t}(b),function(a){"use strict";var b={};b.startsWith=function(a,b){return 0==a.indexOf(b)},a.StringUtils=b}(b),function(a){"use strict";var b={};b.clone=function(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},b.merge=function(a,c){var d=b.clone(a);for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);return d},b.append=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},a.ObjectUtils=b}(b),function(a){"use strict";function b(a){if(null==a)return!0;for(var b=0;b<a.length;++b)if(isNaN(a[b]))return!1;return!0}function c(a,c){if("string"!=typeof a||"string"!=typeof c)return NaN;var d=a.split("."),e=c.split(".");if(!b(d)||!b(e))return NaN;for(var f=Math.max(d.length,e.length),g=0;g<f;++g){var h=void 0!=d[g]?d[g]:"0",i=void 0!=e[g]?e[g]:"0";if(h=Number(h),i=Number(i),h>i)return 1;if(h<i)return-1}return 0}var d={};d.isGreaterThan=function(a,b){return c(a,b)>0},d.isGreaterThanEqual=function(a,b){return c(a,b)>=0},d.isLessThan=function(a,b){return c(a,b)<0},d.isLessThanEqual=function(a,b){return c(a,b)<=0},d.isSame=function(a,b){return 0===c(a,b)},d.isDifferent=function(a,b){return 0!==c(a,b)},a.VersionUtils=d}(b),function(a){"use strict";function b(a,b,c){this.fn=a,this.ctx=b,this.params=c}b.prototype.run=function(){this.params?this.fn.apply(this.ctx,this.params):this.fn.apply(this.ctx)},a.radio.Command=b}(d),function(a){"use strict";function b(a,b){this._queue=[],this._lastTs=0,this._isSuspended=void 0!==a&&a,this._delay=void 0!==b?b:0}b.prototype.addCommand=function(a){this._queue.push(a),this._drain()},b.prototype.cancelAllCommands=function(){this._queue=[]},b.prototype.isEmpty=function(){return 0===this._queue.length},b.prototype.suspend=function(){this._isSuspended=!0},b.prototype.resume=function(){this._isSuspended=!1,this._drain()},b.prototype.flush=function(){this._isSuspended=!1;for(var a=0;a<this._queue.length;a++){this._queue[a].run()}this._queue=[]},b.prototype._drain=function(){if(!this._isSuspended&&!this._drainInProgress){this._drainInProgress=!0;var a=this;!function b(){var c=a._queue.shift();c?a._runCommand(c,function(){a._isSuspended||b()}):a._drainInProgress=!1}()}},b.prototype._runCommand=function(a,b){function c(){a.run(),null!=b&&b.call(d)}var d=this;if(0==this._lastTs)c();else{var e=(new Date).getTime(),f=e-this._lastTs;this._lastTs=e,f<this._delay?setTimeout(c,this._delay-f):c()}},a.radio.CommandQueue=b}(d),function(a){"use strict";function b(a,b){if(this._name=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._listeners={},this._requests={},this._commands={},this._isShutDown=!1}function c(a,c){if(a===c)return!0;for(var d=(a||"").split(b.SEPARATOR),e=(c||"").split(b.SEPARATOR),f=!0,g=0;g<d.length;g++)f=f&&(d[g]===b.WILDCARD||d[g]===e[g]);return f}b.WILDCARD="*",b.SEPARATOR=":",b.prototype.toString=function(){return"<channel: "+this._name+">"},b.prototype.shutdown=function(){this._isShutDown||(this._logger.debug(d,"#shutdown > Shutting down"),this.off(),this._requests={},this._commands={},this._isShutDown=!0)},b.prototype.on=function(a,b,c){this._isShutDown||(this._listeners[a]||(this._listeners[a]=[]),this._listeners[a].push({fn:b,ctx:c}))},b.prototype.off=function(a,b,c){if(!this._isShutDown){if(b="function"==typeof b?b:null,!a&&null==b&&!c)return void(this._listeners={});if(a)this._removeListener(a,b,c);else for(a in this._listeners)this._listeners.hasOwnProperty(a)&&this._removeListener(a,b,c)}},b.prototype.trigger=function(a){if(!this._isShutDown)for(var b in this._listeners)if(this._listeners.hasOwnProperty(b)&&c(b,a.name))for(var d=this._listeners[b].slice(0),e=0;e<d.length;e++){var f=d[e];f.fn.call(f.ctx,a)}},b.prototype.comply=function(a,b,c){this._isShutDown||(this._commands[a]={cmd:b,ctx:c})},b.prototype.command=function(a,b){if(!this._isShutDown){var c=this._commands[a];if(!c)return void this._logger.warn(d,"#command > No command handler for: "+a);c.cmd.call(c.ctx,b)}},b.prototype.reply=function(a,b,c){this._isShutDown||(this._requests[a]={fn:b,ctx:c})},b.prototype.request=function(a){if(!this._isShutDown){var b=this._requests[a];return b?b.fn.call(b.ctx):(this._logger.warn(d,"#request > No request handler for: "+a),null)}},b.prototype._removeListener=function(a,b,c){b="function"==typeof b?b:null;var d=this._listeners[a];if(d){if(!d.length||null==b&&!c)return void delete this._listeners[a];for(var e=0;e<d.length;e++){var f=d[e];null!==b&&b!==f.fn||c&&c!==f.ctx||this._listeners[a].splice(e,1)}}};var d="radio::Channel";a.radio.Channel=b}(d),function(a){"use strict";function b(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._channels={}}var c=a.radio.Channel;b.prototype.channel=function(a){return this._channels[a]||(this._channels[a]=new c(a,this._logger)),this._channels[a]},b.prototype.shutdown=function(){for(var a in this._channels)this._channels.hasOwnProperty(a)&&this._channels[a].shutdown()},a.radio.Radio=b}(d),function(a){"use strict";function b(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a}a.extend=b}(d),function(a){"use strict";function b(){}b.prototype.write=function(a){throw new Error("Implementation error: Method must be overridden.")},a.ILogWriter=b}(d),function(a){"use strict";function b(){}b.prototype.write=function(a){window.console&&window.console.log&&window.console.log(a)},a.LogWriter=b}(d),function(a){"use strict";function b(){}b.prototype.setLogWriter=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getLogWriter=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getEnabled=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.enable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.disable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.debug=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.info=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.warn=function(a,b){throw new Error("Implementation error: Method must be overridden.")},b.prototype.error=function(a,b){throw new Error("Implementation error: Method must be overridden.")},a.ILogger=b}(d),function(a){"use strict";function b(){this._logWriter=new d}function c(a){return a<10?"00"+a:a<100?"0"+a:""+a}var d=a.LogWriter;b.prototype.setLogWriter=function(a){if(!a)throw new Error("Reference to the ILogWriter object cannot be NULL");this._logWriter=a,this._enabled=!1},b.prototype.getLogWriter=function(){return this._logWriter},b.prototype.getEnabled=function(){return this._enabled},b.prototype.enable=function(){this._enabled=!0},b.prototype.disable=function(){this._enabled=!1},b.prototype.debug=function(a,b){this._log(a,f,b)},b.prototype.info=function(a,b){this._log(a,e,b)},b.prototype.warn=function(a,b){this._log(a,g,b)},b.prototype.error=function(a,b){this._log(a,h,b)},b.prototype._log=function(a,b,d){if(b==h||this._enabled){var e="",f=new Date;e+="["+f.toTimeString()+"."+c(f.getMilliseconds())+"] ["+b+"] ",e+="["+a+"] "+d,this._logWriter.write(e)}};var e="INFO",f="DEBUG",g="WARN",h="ERROR";a.Logger=b}(d),function(a){"use strict";function b(a,b){this._pluginName=a,this._eventName=b}var c=a.radio.Channel;b.prototype.getPluginName=function(){return this._pluginName},b.prototype.getEventName=function(){return this._eventName},b.prototype.getName=function(){return this._pluginName+c.SEPARATOR+this._eventName},a.Trigger=b}(d),function(a){"use strict";function b(a,b){this.name=a,this.data=b}b.SUCCESS="success",b.ERROR="error",b.createFromTrigger=function(a){return new b(a.getName())},a.Event=b}(d),function(a){"use strict";function b(){this._events={}}b.prototype.addEventListener=function(a,b,c){a&&b&&(c=c||window,this._events[a]=this._events[a]||[],this._events[a].push({cb:b,ctx:c}))},b.prototype.removeEventListener=function(a,b,c){if(a&&b){c=c||window;var d,e,f=!1;for(e in this._events)if(a===e){f=!0;break}if(f){for(d=this._events[e].length-1;d>=0;d--){var g=this._events[e][d];b===g.cb&&c===g.ctx&&this._events[e].splice(d,1)}this._events[e].length||delete this._events[e]}}},b.prototype.dispatchEvent=function(a){if(a.name){var b,c;for(b in this._events)if(this._events.hasOwnProperty(b)&&a.name===b){var d=this._events[b],e=d.slice(0),f=e.length;for(c=0;c<f;c++)e[c].cb.call(e[c].ctx,a);break}}},b.prototype.removeAllListeners=function(a){if(a){var b,c;for(c in this._events)if(this._events.hasOwnProperty(c)){for(b=this._events[c].length-1;b>=0;b--){var d=this._events[c][b];d.ctx===a&&this._events[c].splice(b,1)}this._events[c].length||delete this._events[c]}}else this._events={}},a.EventDispatcher=b}(d),function(a){"use strict";function b(){}function c(a,b){this.url=a||null,this.method=b,this._xmlhttp=null}function d(){d.__super__.constructor.call(this),this._connection=null}var e=a.Event,f=a.EventDispatcher;b.GET="GET",d.RESPONSE="response",d.INSTANCE="instance",a.extend(d,f),d.prototype.close=function(){this.removeAllListeners(null)},d.prototype.load=function(a){a&&a.method&&a.url&&(a._xmlhttp=this._createCORSRequest(a),a._xmlhttp?a._xmlhttp.send():this._loadImage(a))},d.prototype._createCORSRequest=function(a){var b=null;if(void 0!==window.XMLHttpRequest){var c=new window.XMLHttpRequest;"withCredentials"in c&&(b=c,b.open(a.method,a.url,!0))}if(null==b&&void 0!==window.XDomainRequest&&(b=new window.XDomainRequest,b.open(a.method,a.url)),b){var f={};f[d.INSTANCE]=this;var g=this;b.onload=function(){if(b.status&&parseInt(b.status,10)>=400)return this.onerror();f[d.RESPONSE]=b.responseText,g.dispatchEvent(new e(e.SUCCESS,f))},b.onerror=function(){g.dispatchEvent(new e(e.ERROR,f))}}return b},d.prototype._loadImage=function(a){this._connection||(this._connection=new Image,this._connection.alt=""),this._connection.src=a.url;var b={};b[d.RESPONSE]="",b[d.INSTANCE]=this,this.dispatchEvent(new e(e.SUCCESS,b))},a.URLRequestMethod=b,a.URLRequest=c,a.URLLoader=d}(d),function(a){"use strict";var b="2.2.2.230",c="96e624",d={};d.getVersion=function(){return"js-"+b+"-"+c},d.getMajor=function(){return d.getNumberAtPosition(0)},d.getMinor=function(){return d.getNumberAtPosition(1)},d.getMicro=function(){return d.getNumberAtPosition(2)},d.getPatch=function(){return d.getNumberAtPosition(3)},d.getBuild=function(){return c},d.getApiLevel=function(){return 4},d.getNumberAtPosition=function(a){return b.split(".")[a]},a.Version=d}(c),function(a){"use strict";function b(a,b){this._message=a,this._details=b}b.prototype.getMessage=function(){return this._message},b.prototype.getDetails=function(){return this._details},a.ErrorInfo=b}(c),function(a){"use strict";function b(){this.debugLogging=!1}a.HeartbeatConfig=b}(c),function(a){"use strict";function b(){}b.prototype.onError=function(a){},a.HeartbeatDelegate=b}(c),function(a){"use strict";function b(){}b.prototype.configure=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.bootstrap=function(a){throw new Error("Implementation error: Method must be overridden.")},b.prototype.setup=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.destroy=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.enable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.disable=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getName=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.isInitialized=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.resolveData=function(a){throw new Error("Implementation error: Method must be overridden.")},a.plugin.IPlugin=b}(d),function(a){"use strict";function b(a,b,c,d){this.trigger=a,this.action=c,this.plugin=b,this._paramMappings={},this.mergeParams(d)}var c=a.plugin.ParamMapping;b.prototype.mergeParams=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b];this._paramMappings[c.getKeyName()]=c}},b.prototype.getParams=function(){var a=[];for(var b in this._paramMappings)this._paramMappings.hasOwnProperty(b)&&a.push(this._paramMappings[b]);return a},b.prototype.addParam=function(a){this._paramMappings[a.getKeyName()]=a},b.prototype.removeParam=function(a,b){var d=new c(a,b);this._paramMappings.hasOwnProperty(d.getKeyName())&&delete this._paramMappings[d.getKeyName()]},a.plugin.Behaviour=b}(d),function(a){"use strict";function b(a,b,d){this._pluginName=a,this._key=b,this._paramName=d||a+c.SEPARATOR+b}var c=a.radio.Channel;b.prototype.getPluginName=function(){return this._pluginName},b.prototype.getKey=function(){return this._key},b.prototype.getKeyName=function(){return this._pluginName+c.SEPARATOR+this._key},b.prototype.getParamName=function(){return this._paramName},a.plugin.ParamMapping=b}(d),function(a){"use strict";function b(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._plugins={},this._behaviours={},this._radio=new d(this._logger),this._dataChannel=this._radio.channel(g),this._ctrlChannel=this._radio.channel(h)}var c=a.Event,d=a.radio.Radio,e=a.radio.Channel,f=a.plugin.Behaviour;b.ERROR="error",b.prototype.addPlugin=function(a){var b=a.getName();this._plugins[b]&&this._logger.warn(i,"#addPlugin > Replacing plugin: "+b),this._plugins[b]=a,a.bootstrap(this)},b.prototype.setupPlugins=function(){for(var a in this._plugins)this._plugins.hasOwnProperty(a)&&this._plugins[a].setup()},b.prototype.pluginExists=function(a){return!!this._plugins[a]},b.prototype.isPluginInitialized=function(a){return this._plugins[a]&&this._plugins[a].isInitialized()},b.prototype.on=function(a,b,c,d){this._dataChannel.on(a+e.SEPARATOR+b,c,d)},b.prototype.off=function(a,b,c,d){var f=a&&b?a+e.SEPARATOR+b:null;this._dataChannel.off(f,c,d)},b.prototype.trigger=function(a){var b=a.name,c=this._behaviours[b];if(c){var d,e,f,g,h,i={},j={};for(d=0;d<c.length;d++)if(f=c[d],g=f.getParams())for(e=0;e<g.length;e++)h=g[e],i[h.getPluginName()]=i[h.getPluginName()]||[],h.key in i[h.getPluginName()]||i[h.getPluginName()].push(h.getKey());for(var k in i)i.hasOwnProperty(k)&&(j[k]=this.request(k,i[k]));for(d=0;d<c.length;d++){f=c[d];var l={_behaviour:f,_eventData:a.data||{}};if(g=f.getParams()){for(e=0;e<g.length;e++)h=g[e],l[h.getParamName()]=j[h.getPluginName()]?j[h.getPluginName()][h.getKey()]:null;this.command(f.plugin.getName(),f.action,l)}}}this._dataChannel.trigger(a)},b.prototype.request=function(a,b){var c=this._plugins[a];return c&&b&&0!=b.length?c.resolveData(b):null},b.prototype.raise=function(a){this._errorInfo=a;var d=new c(b.ERROR,a);this._ctrlChannel.trigger(d)},b.prototype.getErrorInfo=function(){return this._errorInfo},b.prototype.destroy=function(){this._radio.shutdown();for(var a in this._plugins)this._plugins.hasOwnProperty(a)&&this._plugins[a].destroy()},b.prototype.comply=function(a,b,c){this._dataChannel.comply(a.getName()+e.SEPARATOR+b,c,a)},b.prototype.command=function(a,b,c){this._dataChannel.command(a+e.SEPARATOR+b,c)},b.prototype.registerBehaviour=function(a,b,c,d){var e=a.getName(),g=new f(a,b,c,d);this._behaviours[e]=this._behaviours[e]||[],this._behaviours[e].push(g)};var g="data_channel",h="ctrl_channel",i="plugin::PluginManager";a.plugin.PluginManager=b}(d),function(a,b){"use strict";function c(a){this._name=a,this._isInitialized=!1,this._isDestroyed=!1,this._isEnabled=!0,this._dataResolver={},this._logTag="plugin::"+this.getName(),this._logger=new d}var d=a.Logger,e=a.Trigger,f=a.Event,g=b.ErrorInfo;c.INITIALIZED="initialized",c.prototype.configure=function(a){},c.prototype.bootstrap=function(a){this._pluginManager=a,this._isDestroyed&&this._pluginManager.raise(new g("Invalid state.","Plugin already destroyed."))},c.prototype.setup=function(){this._trigger(c.INITIALIZED),this._isInitialized=!0},c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._teardown())},c.prototype.enable=function(){this._isEnabled=!0,this._enabled()},c.prototype.disable=function(){this._isEnabled=!1,this._disabled()},c.prototype.getName=function(){return this._name},c.prototype.getLogger=function(){return this._logger},c.prototype.isInitialized=function(){return this._isInitialized},c.prototype.resolveData=function(a){if(!this._isEnabled||!this._isInitialized)return this._logger.warn(this._logTag,"Unable to retrieve plugin data. Plugin: "+this._name+". Enabled: "+this._isEnabled+". Initialized: "+this._isInitialized+"."),null;if("function"==typeof this._dataResolver)return this._dataResolver.call(this,a);var b=null;if(a)for(var c=0;c<a.length;c++){var d=a[c];this._dataResolver.hasOwnProperty(d)&&(b=b||{},"function"==typeof this._dataResolver[d]?b[d]=this._dataResolver[d].call(this):b[d]=this._dataResolver[d])}return b},c.prototype.toString=function(){return"<plugin: "+this._name+">"},c.prototype._enabled=function(){},c.prototype._disabled=function(){},c.prototype._teardown=function(){},c.prototype._canProcess=function(){return this._isEnabled?!this._isDestroyed||(this._logger.error(this._logTag,"Plugin destroyed."),!1):(this._logger.error(this._logTag,"Plugin disabled."),!1)},c.prototype._trigger=function(a,b){var c=f.createFromTrigger(new e(this.getName(),a));c.data=b,this._pluginManager.trigger(c)},a.plugin.BasePlugin=c}(d,c),function(a){"use strict";function b(a,b,c){this.name=a,this.interval=b,this.isActive=!1,this.repeatCount=void 0!==c?c:e,this._nextTickTimestamp=0,this.reset()}function c(a,b){if(!a)throw new Error("Reference to the ClockService object cannot be NULL");if(this._service=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._isDestroyed=!1,this._timers={};var c=this;this._clock=window.setInterval(function(){c._onTick()},1e3*f)}b.prototype.reset=function(){this.tick=0,this._createdTimestamp=(new Date).getTime(),this._updateNextTickTimestamp()},b.prototype.shouldTick=function(){return(new Date).getTime()>this._nextTickTimestamp-g/2&&(this.tick++,this._updateNextTickTimestamp(),!0)},b.prototype._updateNextTickTimestamp=function(){var a=(new Date).getTime();this._nextTickTimestamp=a+1e3*this.interval-1},c.prototype.createTimer=function(a,c,d){this._timers[a]=new b(a,c,d)},c.prototype.destroyTimer=function(a){delete this._timers[a]},c.prototype.resumeTimer=function(a,b){b=void 0!==b&&b,this._logger.debug(d,"#resumeTimer(name="+a+", reset="+b+")");var c=this._timers[a];c&&(c.isActive=!0,b&&c.reset())},c.prototype.pauseTimer=function(a,b){b=void 0!==b&&b,this._logger.debug(d,"#pauseTimer(name="+a+", reset="+b+")");var c=this._timers[a];c&&(c.isActive=!1,b&&c.reset())},c.prototype.isTimerPaused=function(a){var b=this._timers[a];return!!b&&!b.isActive},c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._timers={},window.clearInterval(this._clock))},c.prototype._onTick=function(){for(var a in this._timers)if(this._timers.hasOwnProperty(a)){var b=this._timers[a];b.isActive&&b.shouldTick()&&(b.interval>1&&this._logger.debug(d,"#_onTick() > "+b.name+"("+b.tick+" | "+b.repeatCount+")"),0!=b.repeatCount?(this._service.onTick(b.name,b.interval,b.tick),b.repeatCount!=e&&b.repeatCount--):this.destroyTimer(b.name))}};var d="service.clock::TimerManager",e=-1,f=.25,g=1e3*f;a.clock.TimerDescriptor=b,a.clock.TimerManager=c}(e),function(a,b,c){"use strict";function d(a){if(d.__super__.constructor.call(this,h),!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._timerManager=new e(this,this._logger),this._setupDataResolver()}var e=c.clock.TimerManager,f=b.StringUtils,g=a.plugin.BasePlugin;a.extend(d,g),d.prototype.bootstrap=function(a){d.__super__.bootstrap.call(this,a),this._pluginManager.comply(this,i,this._cmdCreate),this._pluginManager.comply(this,k,this._cmdResume),this._pluginManager.comply(this,j,this._cmdPause),this._pluginManager.comply(this,l,this._cmdDestroy)},d.prototype._teardown=function(){this._timerManager.destroy()},d.prototype._cmdCreate=function(a){var b=a[o]||s;this._timerManager.createTimer(a[m],a[n],b)},d.prototype._cmdPause=function(a){this._timerManager.pauseTimer(a[m],!!a[q])},d.prototype._cmdResume=function(a){this._timerManager.resumeTimer(a[m],!!a[q])},d.prototype._cmdDestroy=function(a){this._timerManager.destroyTimer(a[m])},d.prototype.onTick=function(a,b,c){a+=".tick";var d={};d[m]=a,d[n]=b,d[p]=c,this._trigger(a,d)},d.prototype._setupDataResolver=function(){var a={},b=this._timerManager;a[r]=function(a){return b.isTimerPaused(a)},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];if(c=c||{},f.startsWith(e,r)){var g=e.split(r+".");g.length>0&&(c[e]=a[r].call(this,g[1]))}}return c}};var h="service.clock",i="create",j="pause",k="resume",l="destroy",m="name",n="interval",o="repeat_count",p="tick",q="reset",r="is_paused",s=-1;c.clock.ClockService=d}(d,b,e),function(a,b,c){"use strict";function d(a,b){if(this._logger=new e,this._pluginManager=new f(this._logger),this._pluginManager.addPlugin(new g(this._logger)),b)for(var c=0;c<b.length;c++)this._pluginManager.addPlugin(b[c]);this._pluginManager.setupPlugins(),this._isDestroyed=!1}var e=a.Logger,f=a.plugin.PluginManager,g=b.clock.ClockService;d.prototype.configure=function(a){if(!a)throw new Error("Configuration object cannot be NULL.");a.debugLogging?this._logger.enable():this._logger.disable(),this._isDestroyed&&this._logger.error(h,"Instance is destroyed.")},d.prototype.destroy=function(){this._isDestroyed||(this._pluginManager.destroy(),this._isDestroyed=!0)};var h="Heartbeat";c.Heartbeat=d}(d,e,c),a.ADB||(a.ADB={}),a.ADB.core||(a.ADB.core=d),a.ADB.va||(a.ADB.va=c),a.ADB.va.utils||(a.ADB.va.utils=b),a.ADB.va.plugins||(a.ADB.va.plugins={})}(this);
|
|
60
|
+
|
|
61
|
+
// VideoPlayerPlugin
|
|
62
|
+
!function(a){if(void 0===b)var b={};!function(a){"use strict";var b={};b.ASSET_TYPE_VOD="vod",b.ASSET_TYPE_LIVE="live",b.ASSET_TYPE_LINEAR="linear",a.AssetType=b}(b),function(a){"use strict";function b(){this.playerName=null,this.name=null,this.position=null,this.startTime=null}b.prototype.toString=function(){return"playerName="+this.playerName+", name="+this.name+", position="+this.position+", startTime="+this.startTime},a.AdBreakInfo=b}(b),function(a){"use strict";function b(){this.id=null,this.name=null,this.length=null,this.position=null,this.granularTracking=!0}b.prototype.toString=function(){return"id="+this.id+", name="+this.name+", length="+this.length+", position="+this.position+", granularTracking="+this.granularTracking},a.AdInfo=b}(b),function(a){"use strict";function b(){this.name=null,this.length=null,this.position=null,this.startTime=null}b.prototype.toString=function(){return"name="+this.name+", length="+this.length+", position="+this.position+", startTime="+this.startTime},a.ChapterInfo=b}(b),function(a){"use strict";function b(){this.bitrate=null,this.fps=null,this.droppedFrames=null,this.startupTime=null}b.prototype.toString=function(){return"bitrate="+this.bitrate+", fps="+this.fps+", droppedFrames="+this.droppedFrames+", startupTime="+this.startupTime},a.QoSInfo=b}(b),function(a){"use strict";function b(){this.playerName=null,this.id=null,this.name=null,this.length=null,this.playhead=null,this.mediaType=null,this.streamType=null,this.resumed=!1}b.prototype.toString=function(){return"playerName="+this.playerName+", id="+this.id+", name="+this.name+", length="+this.length+", playhead="+this.playhead+", mediaType="+this.mediaType+", streamType="+this.streamType+", resumed="+this.resumed},a.VideoInfo=b}(b),function(a){"use strict";function b(){this.debugLogging=!1}a.VideoPlayerPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.getVideoInfo=function(){throw new Error("Implementation error: Method must be overridden.")},b.prototype.getAdBreakInfo=function(){return null},b.prototype.getAdInfo=function(){return null},b.prototype.getChapterInfo=function(){return null},b.prototype.getQoSInfo=function(){return null},a.VideoPlayerPluginDelegate=b}(b),function(a,b){"use strict";function c(a){if(c.__super__.constructor.call(this,h),!a)throw new Error("PlayerPlugin delegate cannot be NULL.");this._delegate=a,this._isTrackingSessionActive=!1,this._isTrackingSessionStarted=!1,this._setupDataResolver()}var d=a.plugin.ParamMapping,e=a.Trigger,f=a.plugin.BasePlugin,g=b.VideoPlayerPluginConfig;a.extend(c,f),c.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof g))throw new Error("Expected config data to be instance of VideoPlayerPluginConfig.");a.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure(debugLogging="+a.debugLogging+")")},c.prototype.bootstrap=function(a){c.__super__.bootstrap.call(this,a),this._registerCommands(),this._registerBehaviours()},c.prototype._cmdVideoIdleStart=function(a){this._logger.info(this._logTag,"#_cmdVideoIdleStart()"),this._videoIdle=!0},c.prototype._cmdVideoIdleResume=function(a){this._logger.info(this._logTag,"#_cmdVideoIdleResume()"),this._videoIdle&&(this._trigger(p),this._trigger(q),a.isInAd&&(this._trigger(x),this._isTrackingAdBreak=!0),a.isInAd&&(this._trigger(z),this._isTrackingAd=!0),a.isInChapter&&this._trigger(G),this._trigger(u)),this._videoIdle=!1},c.prototype.trackSessionStart=function(){if(this._logger.info(this._logTag,"#trackSessionStart()"),this._canProcess()){if(!this._isTrackingSessionActive)return void this._logger.warn(this._logTag,"#trackSessionStart() > No active tracking session.");if(this._isTrackingSessionStarted)return void this._logger.info(this._logTag,"#trackSessionStart() > Tracking session already started.");this._trigger(p),this._isTrackingSessionStarted=!0;var a=this._dataResolver(["video.resumed"]);a.hasOwnProperty("video.resumed")&&a["video.resumed"]&&this._trigger(q)}},c.prototype.trackVideoLoad=function(){this._logger.info(this._logTag,"#trackVideoLoad()"),this._canProcess()&&(this._isTrackingAdBreak=!1,this._isTrackingAd=!1,this._contentStarted=!1,this._isPaused=!0,this._isBuffering=!1,this._isSeeking=!1,this._playheadTimer=null,this._previousPlayhead=-1,this._stalledPlayheadCount=0,this._playheadStalled=!1,this._videoIdle=!1,this._trigger(m),this._isTrackingSessionActive=!0,this._isTrackingSessionStarted=!1)},c.prototype.trackVideoUnload=function(){if(this._logger.info(this._logTag,"#trackVideoUnload()"),this._canProcess()){if(!this._isTrackingSessionActive)return void this._logger.warn(this._logTag,"#trackVideoUnload() > No active tracking session.");this._stopPlayheadTimer(),this._trigger(n),this._isTrackingSessionActive=!1,this._isTrackingSessionStarted=!1,this._contentStarted=!1}},c.prototype.beginReporting=function(){this._logger.info(this._logTag,"#beginReporting()"),this._canProcess()&&this._startSessionIfNeeded("beginReporting")&&this._trigger(N)},c.prototype.trackPlay=function(){this._logger.info(this._logTag,"#trackPlay()"),this._canProcess()&&this._startSessionIfNeeded("trackPlay")&&this._allowPlayerStateChange()&&(this._isPaused=!1,this._trigger(u),this._startPlayheadTimer())},c.prototype.trackPause=function(){if(this._logger.info(this._logTag,"#trackPause()"),this._canProcess()&&this._startSessionIfNeeded("trackPause")&&this._allowPlayerStateChange()){this._stopPlayheadTimer();var a={};a[P]=!1,this._isPaused=!0,this._trigger(v,a)}},c.prototype.trackBufferStart=function(){this._logger.info(this._logTag,"#trackBufferStart()"),this._canProcess()&&this._startSessionIfNeeded("trackBufferStart")&&this._allowPlayerStateChange()&&(this._stopPlayheadTimer(),this._isBuffering=!0,this._trigger(C))},c.prototype.trackBufferComplete=function(){this._logger.info(this._logTag,"#trackBufferComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackBufferComplete")&&this._allowPlayerStateChange()&&(this._isBuffering=!1,this._trigger(D),this._startPlayheadTimer())},c.prototype.trackSeekStart=function(){this._logger.info(this._logTag,"#trackSeekStart()"),this._canProcess()&&this._startSessionIfNeeded("trackSeekStart")&&this._allowPlayerStateChange()&&(this._stopPlayheadTimer(),this._isSeeking=!0,this._trigger(E))},c.prototype.trackSeekComplete=function(){this._logger.info(this._logTag,"#trackSeekComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackSeekComplete")&&this._allowPlayerStateChange()&&(this._isSeeking=!1,this._trigger(F),this._startPlayheadTimer())},c.prototype.trackComplete=function(a,b){if(this._logger.info(this._logTag,"#trackComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackComplete")){if(this._stopPlayheadTimer(),this._videoIdle)return this._logger.info(this._logTag,"#trackComplete() > Video session is already in Idle State."),void(a&&a());var c={};c[O]=a,b=void 0===b||!!b,b?this._trigger(r,c):(this._trigger(s),this._trigger(o,c))}},c.prototype.trackTimedMetadata=function(a){this._logger.info(this._logTag,"#trackComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackTimedMetadata")&&this._trigger(t,a)},c.prototype.trackChapterStart=function(){this._logger.info(this._logTag,"#trackChapterStart()"),this._canProcess()&&this._startSessionIfNeeded("#trackChapterStart")&&this._trigger(G)},c.prototype.trackChapterComplete=function(){this._logger.info(this._logTag,"#trackChapterComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackChapterComplete")&&this._trigger(H)},c.prototype.trackChapterSkip=function(){this._logger.info(this._logTag,"#trackChapterSkip()"),this._canProcess()&&this._startSessionIfNeeded("trackChapterSkip")&&this._trigger(I)},c.prototype.trackAdBreakStart=function(){this._logger.info(this._logTag,"#trackAdBreakStart()"),this._canProcess()&&this._startSessionIfNeeded("trackAdBreakStart")&&(this._trigger(x),this._isTrackingAdBreak=!0)},c.prototype.trackAdBreakComplete=function(){this._logger.info(this._logTag,"#trackAdBreakComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackAdBreakComplete")&&(this._trigger(y),this._isTrackingAdBreak=!1)},c.prototype.trackAdStart=function(){this._logger.info(this._logTag,"#trackAdStart()"),this._canProcess()&&this._startSessionIfNeeded("trackAdStart")&&(this._trigger(z),this._isTrackingAd=!0)},c.prototype.trackAdComplete=function(){this._logger.info(this._logTag,"#trackAdComplete()"),this._canProcess()&&this._startSessionIfNeeded("trackAdComplete")&&(this._trigger(A),this._isTrackingAd=!1)},c.prototype.trackAdSkip=function(){this._logger.info(this._logTag,"#trackAdSkip()"),this._canProcess()&&this._startSessionIfNeeded("trackAdSkip")&&(this._trigger(B),this._isTrackingAd=!1)},c.prototype.trackBitrateChange=function(){this._logger.info(this._logTag,"#trackBitrateChange()"),this._canProcess()&&this._startSessionIfNeeded("trackBitrateChange")&&this._trigger(J)},c.prototype.trackVideoPlayerError=function(a){if(this._logger.info(this._logTag,"#trackVideoPlayerError(errorId="+a+")"),this._startSessionIfNeeded("trackVideoPlayerError")){var b={};b[Q]=l,b[R]=a,this._trigger(K,b)}},c.prototype.trackApplicationError=function(a){if(this._logger.info(this._logTag,"#trackApplicationError(errorId="+a+")"),this._startSessionIfNeeded("trackApplicationError")){var b={};b[Q]=k,b[R]=a,this._trigger(K,b)}},c.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleVideoIdleStart",this._cmdVideoIdleStart),this._pluginManager.comply(this,"handleVideoIdleResume",this._cmdVideoIdleResume)},c.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new e(j,L),this,"handleVideoIdleStart"),this._pluginManager.registerBehaviour(new e(j,M),this,"handleVideoIdleResume",[new d(i,"ad.isInAdBreak","isInAdBreak"),new d(i,"ad.isInAd","isInAd"),new d(i,"chapter.isInChapter","isInChapter")])},c.prototype._setupDataResolver=function(){function a(){return g.video?g.video:(g.video=h._delegate.getVideoInfo(),h._logger.info(h._logTag,"Data from delegate > VideoInfo: "+g.video),g.video)}function b(){return g.ad?g.ad:(g.ad=h._delegate.getAdInfo(),h._logger.info(h._logTag,"Data from delegate > AdInfo: "+g.ad),g.ad)}function c(){return g.pod?g.pod:(g.pod=h._delegate.getAdBreakInfo(),h._logger.info(h._logTag,"Data from delegate > AdBreakInfo: "+g.pod),g.pod)}function d(){return g.chapter?g.chapter:(g.chapter=h._delegate.getChapterInfo(),h._logger.info(h._logTag,"Data from delegate > ChapterInfo: "+g.chapter),g.chapter)}function e(){return g.qos?g.qos:(g.qos=h._delegate.getQoSInfo(),h._logger.info(h._logTag,"Data from delegate > QoSInfo: "+g.qos),g.qos)}var f={},g={},h=this;f["video.id"]=function(){var b=a(),c=b?b.id:null;return h._logger.debug(h._logTag,"Resolving video.id: "+c),c},f["video.name"]=function(){var b=a(),c=b?b.name:null;return h._logger.debug(h._logTag,"Resolving video.name: "+c),c},f["video.length"]=function(){var b=a(),c=b?b.length:NaN;return h._logger.debug(h._logTag,"Resolving video.length: "+c),c},f["video.playerName"]=function(){var b=a(),c=b?b.playerName:null;return h._logger.debug(h._logTag,"Resolving video.playerName: "+c),c},f["video.mediaType"]=function(){var b=a(),c=b?b.mediaType:null;return h._logger.debug(h._logTag,"Resolving video.mediaType: "+c),c},f["video.streamType"]=function(){var b=a(),c=b?b.streamType:null;return h._logger.debug(h._logTag,"Resolving video.streamType: "+c),c},f["video.playhead"]=function(){var b=a(),c=b?b.playhead:NaN;return h._logger.debug(h._logTag,"Resolving video.playhead: "+c),c},f["video.resumed"]=function(){var b=a(),c=!!b&&b.resumed;return h._logger.debug(h._logTag,"Resolving video.resumed: "+c),c},f["video.playheadStalled"]=function(){return this._playheadStalled},f["pod.name"]=function(){var a=c(),b=a?a.name:null;return h._logger.debug(h._logTag,"Resolving pod.name: "+b),b},f["pod.playerName"]=function(){var a=c(),b=a?a.playerName:null;return h._logger.debug(h._logTag,"Resolving pod.playerName: "+b),b},f["pod.position"]=function(){var a=c(),b=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving pod.position: "+b),b},f["pod.startTime"]=function(){var a=c(),b=a?a.startTime:NaN;return h._logger.debug(h._logTag,"Resolving pod.startTime: "+b),b},f["ad.isInAd"]=function(){var a=b(),c=null!=a;return h._logger.debug(h._logTag,"Resolving ad.isInAd: "+c),c},f["ad.isInAdBreak"]=function(){var a=c(),b=null!=a;return h._logger.debug(h._logTag,"Resolving ad.isInAdBreak: "+b),b},f["ad.id"]=function(){var a=b(),c=a?a.id:null;return h._logger.debug(h._logTag,"Resolving ad.id: "+c),c},f["ad.name"]=function(){var a=b(),c=a?a.name:null;return h._logger.debug(h._logTag,"Resolving ad.name: "+c),c},f["ad.length"]=function(){var a=b(),c=a?a.length:NaN;return h._logger.debug(h._logTag,"Resolving ad.length: "+c),c},f["ad.position"]=function(){var a=b(),c=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving ad.position: "+c),c},f["ad.granularTracking"]=function(){var a=b(),c=!!a&&a.granularTracking;return h._logger.debug(h._logTag,"Resolving ad.granularTracking: "+c),c},f["ad.trackingInterval"]=function(){var a=T;return h._logger.debug(h._logTag,"Resolving ad.trackingInterval: "+a),a},f["chapter.isInChapter"]=function(){var a=d(),b=null!=a;return h._logger.debug(h._logTag,"Resolving chapter.isInChapter: "+b),b},f["chapter.name"]=function(){var a=d(),b=a?a.name:null;return h._logger.debug(h._logTag,"Resolving chapter.name: "+b),b},f["chapter.length"]=function(){var a=d(),b=a?a.length:NaN;return h._logger.debug(h._logTag,"Resolving chapter.length: "+b),b},f["chapter.position"]=function(){var a=d(),b=a?a.position:NaN;return h._logger.debug(h._logTag,"Resolving chapter.position: "+b),b},f["chapter.startTime"]=function(){var a=d(),b=a?a.startTime:NaN;return h._logger.debug(h._logTag,"Resolving chapter.startTime: "+b),b},f["qos.bitrate"]=function(){var a=e(),b=a?a.bitrate:NaN;return h._logger.debug(h._logTag,"Resolving qos.bitrate: "+b),b},f["qos.fps"]=function(){var a=e(),b=a?a.fps:NaN;return h._logger.debug(h._logTag,"Resolving qos.fps: "+b),b},f["qos.droppedFrames"]=function(){var a=e(),b=a?a.droppedFrames:NaN;return h._logger.debug(h._logTag,"Resolving qos.droppedFrames: "+b),b},f["qos.startupTime"]=function(){var a=e(),b=a?1e3*a.startupTime:NaN;return h._logger.debug(h._logTag,"Resolving qos.startupTime: "+b),b},this._dataResolver=function(a){if(!a||0==a.length)return null;g={};for(var b=null,c=0;c<a.length;c++){var d=a[c];b=b||{},b[d]=f.hasOwnProperty(d)?f[d].call(this):null}return b}},c.prototype._trackPlayheadStall=function(){this._canProcess()&&(this._playheadStalled||(this._logger.info(this._logTag,"#_trackPlayheadStall()"),this._stalledPlayheadCount=0,this._playheadStalled=!0,this._trigger(v)))},c.prototype._trackExitStall=function(){this._canProcess()&&(this._stalledPlayheadCount=0,!this._playheadStalled||this._isPaused||this._isSeeking||this._isBuffering||(this._logger.info(this._logTag,"#_trackExitStall()"),this._playheadStalled=!1,this._trigger(u)))},c.prototype._startPlayheadTimer=function(){var a=this;this._playheadTimer||this._isPaused||this._isSeeking||this._isBuffering||(this._playheadTimer=setInterval(function(){if(a._canProcess()){var b=a._dataResolver(["ad.isInAd","video.playhead"]);if(a._isTrackingAdBreak)a._playheadStalled&&a._trackExitStall();else{var c=b["video.playhead"];c!=a._previousPlayhead?a._trackExitStall():a._previousPlayhead>=0&&c==a._previousPlayhead&&++a._stalledPlayheadCount==U&&a._trackPlayheadStall(),c!=a._previousPlayhead&&c>0&&!a._contentStarted&&(a._isPaused||a._isBuffering||a._isSeeking||(a._logger.info(a._logTag,"#_playheadTimer playhead progress to: "+c),a._trigger(w),a._contentStarted=!0)),a._previousPlayhead=c}}},S))},c.prototype._stopPlayheadTimer=function(){this._playheadTimer&&(clearInterval(this._playheadTimer),this._playheadTimer=null),this._trackExitStall()},c.prototype._startSessionIfNeeded=function(a){return this._isTrackingSessionActive?(this._isTrackingSessionStarted||(this._logger.info(this._logTag,"#"+a+"() > Tracking session auto-start."),this.trackSessionStart()),!0):(this._logger.warn(this._logTag,"#"+a+"() > No active tracking session."),!1)},c.prototype._allowPlayerStateChange=function(){return!(this._isTrackingAdBreak&&!this._isTrackingAd)||(this._logger.info(this._logTag,"_allowPlayerStateChange Player plugin does not allow player state changes when in Adbreak and not in Ad."),!1)};var h="player",i=h,j="adobe-heartbeat",k="sourceErrorExternal",l="sourceErrorSDK",m="video_load",n="video_unload",o="video_session_end",p="video_start",q="video_resume",r="video_complete",s="video_skip",t="timed_metadata",u="play",v="pause",w="content_start",x="adbreak_start",y="adbreak_complete",z="ad_start",A="ad_complete",B="ad_skip",C="buffer_start",D="buffer_complete",E="seek_start",F="seek_complete",G="chapter_start",H="chapter_complete",I="chapter_skip",J="bitrate_change",K="track_error",L="video_idle_start",M="video_idle_resume",N="video_begin_reporting",O="callback",P="filter_report",Q="source",R="error_id",S=1001,T=1,U=2;b.VideoPlayerPlugin=c}(a.ADB.core,b),a.ADB.va.plugins.videoplayer||(a.ADB.va.plugins.videoplayer=b)}(this);
|
|
63
|
+
|
|
64
|
+
// AdobeHeartbeatPlugin
|
|
65
|
+
!function(a){if(void 0===b)var b={};b.clock||(b.clock={}),b.context||(b.context={}),b.filter||(b.filter={}),b.model||(b.model={}),b.network||(b.network={}),function(a,b){"use strict";function c(a,b,c,d,e){if(!b)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=b,!a)throw new Error("Reference to the pluginManager object cannot be NULL");if(this._pluginManager=a,!e)throw new Error("Reference to the logger object cannot be NULL");this._logTag="ah::Timer."+c,this._logger=e,this._isDestroyed=!1,this._createTimer(c,d),this._installHandlers()}var d=a.Event;c.KEY_NAME="name",c.KEY_INTERVAL="interval",c.KEY_RESET="reset",c.prototype.resume=function(a){this._logger.debug(this._logTag,"Starting timer: "+this._name);var b={};b[c.KEY_NAME]=e+"."+this._name,b[c.KEY_RESET]=a,this._pluginManager.command(f,i,b)},c.prototype.pause=function(a){this._logger.debug(this._logTag,"Stopping timer: "+this._name);var b={};b[c.KEY_NAME]=e+"."+this._name,b[c.KEY_RESET]=a,this._pluginManager.command(f,h,b)},c.prototype.destroy=function(){if(!this._isDestroyed){this._isDestroyed=!0,this._uninstallHandlers();var a={};a[c.KEY_NAME]=e+"."+this._name,this._pluginManager.command(f,j,a)}},c.prototype.setInterval=function(a){var b=k+"."+e+"."+this._name,c=this._pluginManager.request(f,[b])[b];this.pause(!0),this._createTimer(this._name,a),c||this.resume(!0)},c.prototype._cmdResume=function(a){var b=!1;null!=a&&a.hasOwnProperty(c.KEY_RESET)&&(b=a[c.KEY_RESET]),this.resume(b)},c.prototype._cmdPause=function(a){var b=!1;null!=a&&a.hasOwnProperty(c.KEY_RESET)&&(b=a[c.KEY_RESET]),this.pause(b)},c.prototype._onTick=function(a,b){this._channel.trigger(new d("clock:"+this._name+".tick",b))},c.prototype._installHandlers=function(){this._channel.comply("clock:"+this._name+".resume",this._cmdResume,this),this._channel.comply("clock:"+this._name+".pause",this._cmdPause,this),this._pluginManager.on(f,e+"."+this._name+".tick",this._onTick,this)},c.prototype._uninstallHandlers=function(){this._channel.off(null,null,this),this._pluginManager.off(null,null,null,this)},c.prototype._createTimer=function(a,b){this._name=a,this._interval=b;var d={};d[c.KEY_NAME]=e+"."+this._name,d[c.KEY_INTERVAL]=this._interval,this._pluginManager.command(f,g,d)};var e="heartbeat",f="service.clock",g="create",h="pause",i="resume",j="destroy",k="is_paused";b.clock.Timer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,f,h,d)}var d=a.Event,e=b.clock.Timer;a.extend(c,e),c.prototype._onCheckStatusComplete=function(a){var b=a.data[l];if(this._logger.debug(this._logTag,"#_onCheckStatusComplete(interval="+b+")"),b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed.");b>g?(this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Interval value too large: "+b),this.setInterval(g)):(this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval changed to: "+b),this.setInterval(b))}else this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Invalid interval value."),this.setInterval(h)},c.prototype._getSettings=function(a){this._logger.debug(this._logTag,"#_getSettings()"),this._channel.trigger(new d(i))},c.prototype._installHandlers=function(){c.__super__._installHandlers.call(this),this._channel.on(j,this._getSettings,this),this._channel.on(k,this._onCheckStatusComplete,this),this._channel.reply(l,function(){return this._interval},this)};var f="check_status",g=600,h=180,i="clock:check_status.tick",j="clock:check_status.get_settings",k="net:check_status_complete",l="check_status_interval";b.clock.CheckStatusTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d),this._doNotOverrideInterval=!1}var d=b.clock.Timer;a.extend(c,d),c.prototype._onCheckStatusComplete=function(a){var b=a.data[g];if(this._logger.debug(this._logTag,"#_onCheckStatusComplete(interval="+b+")"),this._doNotOverrideInterval)this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed. (doNotOverrideInterval = true)");else if(b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval value not changed.");this._logger.debug(this._logTag,"#_onCheckStatusComplete() > Interval changed to: "+b),this.setInterval(b)}else this._logger.warn(this._logTag,"#_onCheckStatusComplete() > Invalid interval value."),this.setInterval(f)},c.prototype._onUpdateReportingInterval=function(a){var b=a.data[g];if(this._doNotOverrideInterval=!!a.data[h],this._logger.debug(this._logTag,"#_onUpdateReportingInterval(interval="+b+", doNotOverrideInterval="+this._doNotOverrideInterval+")"),b){if(b==this._interval)return void this._logger.debug(this._logTag,"#_onUpdateReportingInterval() > Interval value not changed.");this._logger.debug(this._logTag,"#_onUpdateReportingInterval() > Interval changed to: "+b),this.setInterval(b)}else this._logger.warn(this._logTag,"#_onUpdateReportingInterval() > Invalid interval value."),this.setInterval(f)},c.prototype._installHandlers=function(){c.__super__._installHandlers.call(this),this._channel.on(j,this._onCheckStatusComplete,this),this._channel.on(i,this._onUpdateReportingInterval,this),this._channel.reply(g,function(){return this._interval},this)};var e="reporting",f=10,g="reporting_interval",h="do_not_override_interval",i="reporting:update_interval",j="net:check_status_complete";b.clock.ReportingTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d)}var d=b.clock.Timer;a.extend(c,d);var e="idle",f=1800;b.clock.IdleTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,d){c.__super__.constructor.call(this,a,b,e,f,d)}var d=b.clock.Timer;a.extend(c,d);var e="flush_filter",f=.25;b.clock.FlushFilterTimer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,c){if(!a)throw new Error("Reference to the pluginManager object cannot be NULL");if(!b)throw new Error("Reference to the channel object cannot be NULL");if(!c)throw new Error("Reference to the logger object cannot be NULL");this._isDestroyed=!1,this._reportingTimer=new f(a,b,c),this._checkStatusTimer=new d(a,b,c),this._flushFilterTimer=new e(a,b,c),this._idleTimer=new g(a,b,c)}var d=b.clock.CheckStatusTimer,e=b.clock.FlushFilterTimer,f=b.clock.ReportingTimer,g=b.clock.IdleTimer;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._reportingTimer.destroy(),this._checkStatusTimer.destroy(),this._flushFilterTimer.destroy(),this._idleTimer.destroy())},b.clock.Clock=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){this.value=a,this.hint=b}function d(a){this.realm=a,this.data={}}c.HINT_SHORT="short",d.prototype.setField=function(a,b,d){this.data[a]=new c(b,d)},d.prototype._createAccessor=function(a,b,c){var d=this;return function(){return arguments.length&&(d[a]=arguments[0],d.setField(b,arguments[0],c)),d[a]}},b.model.Dao=d,b.model.DaoField=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"asset"),this.adId=this._createAccessor("_adId","ad_id",null),this.sid=this._createAccessor("_sid","ad_sid",null),this.resolver=this._createAccessor("_resolver","resolver",null),this.podId=this._createAccessor("_podId","pod_id",null),this.podPosition=this._createAccessor("_podPosition","pod_position",null),this.podOffset=this._createAccessor("_podOffset","pod_offset",null),this.podName=this._createAccessor("_podName","pod_name",null),this.adLength=this._createAccessor("_adLength","ad_length",null),this.adName=this._createAccessor("_adName","ad_name",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.adId(a.adId()),this.sid(a.sid()),this.resolver(a.resolver()),this.podId(a.podId()),this.podPosition(a.podPosition()),this.podOffset(a.podOffset()),this.podName(a.podName()),this.adLength(a.adLength()),this.adName(a.adName())}else this.adId(""),this.sid(""),this.resolver(""),this.podId(""),this.podPosition(""),this.podOffset(0),this.podName(""),this.adLength(0),this.adName("")}var d=b.model.Dao;a.extend(c,d),b.model.AdDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"sc"),this.reportSuiteId=this._createAccessor("_reportSuiteId","rsid",null),this.trackingServer=this._createAccessor("_trackingServer","tracking_server",null),this.ssl=this._createAccessor("_ssl","ssl",e.HINT_SHORT),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.reportSuiteId(a.reportSuiteId()),this.trackingServer(a.trackingServer()),this.ssl(a.ssl())}else this.reportSuiteId(""),this.trackingServer(""),this.ssl(0)}var d=b.model.Dao,e=b.model.DaoField;a.extend(c,d),b.model.AdobeAnalyticsDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.id=this._createAccessor("_id","chapter_id",null),this.sid=this._createAccessor("_sid","chapter_sid",null),this.name=this._createAccessor("_name","chapter_name",null),this.position=this._createAccessor("_position","chapter_pos",null),this.length=this._createAccessor("_length","chapter_length",null),this.offset=this._createAccessor("_offset","chapter_offset",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.id(a.id()),this.sid(a.sid()),this.name(a.name()),this.position(a.position()),this.length(a.length()),this.offset(a.offset())}else this.id(""),this.sid(""),this.name(""),this.position(0),this.length(0),this.offset(0)}var d=b.model.Dao;a.extend(c,d),b.model.ChapterDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"asset"),this.type=this._createAccessor("_type","type",null),this.videoId=this._createAccessor("_videoId","video_id",null),this.publisher=this._createAccessor("_publisher","publisher",null),this.adData=this._createAccessor("_adData","ad_data",null),this.chapterData=this._createAccessor("_chapterData","chapter_data",null),this.length=this._createAccessor("_length","length",null),this.name=this._createAccessor("_name","name",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type()),this.name(a.name()),this.videoId(a.videoId()),this.publisher(a.publisher()),this.length(a.length());var b=a.adData()?new e(a.adData()):null;this.adData(b);var d=a.chapterData()?new f(a.chapterData()):null;this.chapterData(d)}else this.type(""),this.name(""),this.videoId(""),this.publisher(""),this.length(0),this.adData(null),this.chapterData(null)}var d=b.model.Dao,e=b.model.AdDao,f=b.model.ChapterDao;a.extend(c,d),c.TYPE_AD="ad",c.TYPE_MAIN_CONTENT="main",b.model.AssetDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"event"),this.type=this._createAccessor("_type","type",null),this.duration=this._createAccessor("_duration","duration",null),this.playhead=this._createAccessor("_playhead","playhead",null),this.id=this._createAccessor("_id","id",null),this.source=this._createAccessor("_source","source",null),this.ts=this._createAccessor("_ts","ts",null),this.prevTs=this._createAccessor("_prevTs","prev_ts",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type()),this.duration(a.duration()),this.playhead(a.playhead()),this.id(a.id()),this.source(a.source()),this.ts(a.ts()),this.prevTs(a.prevTs())}else this.type(""),this.duration(0),this.playhead(0),this.id(""),this.source(""),this.ts(0),this.prevTs(-1)}var d=b.model.Dao;a.extend(c,d),c.EVENT_TYPE_AA_START="aa_start",c.EVENT_TYPE_AA_AD_START="aa_ad_start",c.EVENT_TYPE_START="start",c.EVENT_TYPE_RESUME="resume",c.EVENT_TYPE_CHAPTER_START="chapter_start",c.EVENT_TYPE_CHAPTER_COMPLETE="chapter_complete",c.EVENT_TYPE_CHAPTER_SKIP="chapter_skip",c.EVENT_TYPE_PLAY="play",c.EVENT_TYPE_PAUSE="pause",c.EVENT_TYPE_STALL="stall",c.EVENT_TYPE_BUFFER="buffer",c.EVENT_TYPE_BITRATE_CHANGE="bitrate_change",c.EVENT_TYPE_ERROR="error",c.EVENT_TYPE_COMPLETE="complete",c.EVENT_TYPE_SKIP="skip",c.EVENT_TYPE_END="end",b.model.EventDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.bitrate=this._createAccessor("_bitrate","bitrate",null),this.fps=this._createAccessor("_fps","fps",null),this.droppedFrames=this._createAccessor("_droppedFrames","dropped_frames",null),this.startupTime=this._createAccessor("_startup_time","startup_time",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.bitrate(a.bitrate()),this.fps(a.fps()),this.droppedFrames(a.droppedFrames()),this.startupTime(a.startupTime()),this.isStartupTimeOverridden=a.isStartupTimeOverridden}else this.bitrate(0),this.fps(0),this.droppedFrames(0),this.startupTime(0),this.isStartupTimeOverridden=!1}var d=b.model.Dao;a.extend(c,d),b.model.QoSDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"sp"),this.ovp=this._createAccessor("_ovp","ovp",null),this.sdk=this._createAccessor("_sdk","sdk",null),this.channel=this._createAccessor("_channel","channel",null),this.playerName=this._createAccessor("_playerName","player_name",null),this.libVersion=this._createAccessor("_libVersion","hb_version",null),this.apiLevel=this._createAccessor("_apiLevel","hb_api_lvl",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.ovp(a.ovp()),this.sdk(a.sdk()),this.channel(a.channel()),this.playerName(a.playerName()),this.libVersion(a.libVersion()),this.apiLevel(a.apiLevel())}else this.ovp(e),this.sdk(e),this.channel(e),this.playerName(""),this.libVersion(""),this.apiLevel(0)}var d=b.model.Dao;a.extend(c,d);var e="unknown";b.model.ServiceProviderDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"event"),this.sessionId=this._createAccessor("_sessionId","sid",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.sessionId(a.sessionId())}else this.sessionId(null)}var d=b.model.Dao;a.extend(c,d),b.model.SessionDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"stream"),this.type=this._createAccessor("_type","type",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.type(a.type())}else this.type(null)}var d=b.model.Dao;a.extend(c,d),b.model.StreamDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"user"),this.analyticsVisitorId=this._createAccessor("_analyticsVisitorId","aid",null),this.marketingCloudVisitorId=this._createAccessor("_marketingCloudVisitorId","mid",null),this.visitorId=this._createAccessor("_visitorId","id",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.analyticsVisitorId(a.analyticsVisitorId()),this.marketingCloudVisitorId(a.marketingCloudVisitorId()),this.visitorId(a.visitorId())}else this.analyticsVisitorId(null),this.marketingCloudVisitorId(null),this.visitorId(null)}var d=b.model.Dao;a.extend(c,d),b.model.UserDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(){if(c.__super__.constructor.call(this,"aam"),this.audienceManagerBlob=this._createAccessor("_audienceManagerBlob","blob",null),this.audienceManagerLocationHint=this._createAccessor("_audienceManagerLocationHint","loc_hint",null),arguments.length&&arguments[0]instanceof c){var a=arguments[0];this.audienceManagerBlob(a.audienceManagerBlob()),this.audienceManagerLocationHint(a.audienceManagerLocationHint())}else this.audienceManagerBlob(null),this.audienceManagerLocationHint(null)}var d=b.model.Dao;a.extend(c,d),b.model.AudienceManagerDao=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b,c,i,j){this.eventData=new e,this.eventData.type(b),this.eventData.duration(0),this.eventData.ts((new Date).getTime()),this.eventData.playhead(c),this.assetData=new f(a._assetData),this.streamData=new g(a._streamData),this.qosData=new h(a._qosData),this.cuserData=d.clone(a._cuserData),this.meta=i,this.callback=j,this.filterReport=!0}var d=a.ObjectUtils,e=b.model.EventDao,f=b.model.AssetDao,g=b.model.StreamDao,h=b.model.QoSDao;b.model.TrackItem=c}(a.ADB.va.utils,b),function(a,b){"use strict";function c(a,b,c,i,j,k){this.adobeAnalyticsData=a,this.userData=b,this.aamData=c,this.serviceProviderData=i,this.sessionData=j,this.eventData=new e(k.eventData),this.assetData=new f(k.assetData),this.streamData=new g(k.streamData),this.qosData=new h(k.qosData),this.cuserData=d.clone(k.cuserData),this.meta=d.clone(k.meta),this.callback=k.callback,this.filterReport=k.filterReport}var d=a.ObjectUtils,e=b.model.EventDao,f=b.model.AssetDao,g=b.model.StreamDao,h=b.model.QoSDao;b.model.CUserDao;b.model.Report=c}(a.ADB.va.utils,b),function(a){"use strict";function b(){}b.prototype.serializeReport=function(a){},b.prototype.serializeDao=function(a){},b.prototype.serializeMap=function(a){},b.prototype.serializeNumber=function(a,b,c,d){},b.prototype.serializeString=function(a,b,c,d){},a.model.ISerializer=b}(b),function(a,b){"use strict";function c(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a}var d=b.model.Dao,e=b.model.DaoField,f=b.model.ISerializer;a.extend(c,f),c.prototype.serializeReport=function(a){var b=[];return b.push(this.serializeDao(a.adobeAnalyticsData)),b.push(this.serializeDao(a.userData)),b.push(this.serializeDao(a.aamData)),b.push(this.serializeMap(a.cuserData,"cuser")),b.push(this.serializeDao(a.serviceProviderData)),b.push(this.serializeDao(a.sessionData)),b.push(this.serializeDao(a.eventData)),b.push(this.serializeDao(a.assetData)),b.push(this.serializeDao(a.streamData)),b.push(this.serializeDao(a.qosData)),b.push(this.serializeMap(a.meta,"meta")),{serializedOutput:b.filter(function(a){return!!a}).join("&"),callback:a.callback}},c.prototype.serializeDao=function(a){return this._processDao(a).filter(function(a){return!!a}).join("&")},c.prototype.serializeMap=function(a,b){var c=[],d=b||"meta";for(var e in a)a.hasOwnProperty(e)&&a[e]&&c.push("s:"+d+":"+e+"="+window.encodeURIComponent(a[e]));return c.join("&")},c.prototype.serializeNumber=function(a,b,c,d){var f=h;return null==b||isNaN(b)?null:(d===e.HINT_SHORT&&(f=i),f+":"+c+":"+a+"="+Math.floor(b))},c.prototype.serializeString=function(a,b,c,d){return b?j+":"+c+":"+a+"="+window.encodeURIComponent(b):null},c.prototype._processDao=function(a){var b=[];for(var c in a.data)if(a.data.hasOwnProperty(c)){var e=a.data[c],f=e.value,h=e.hint,i=null,j=a.realm;if(null==f)continue;"number"==typeof f?i=this.serializeNumber(c,f,j,h):"string"==typeof f?i=this.serializeString(c,f,j,h):f instanceof d?i=this.serializeDao(f):this._logger.warn(g,"#_processDao() > Unable to serialize DAO. Field: "+c+". Value: "+f+"."),i&&b.push(i)}return b};var g="ah::QuerystringSerializer",h="l",i="h",j="s";b.model.QuerystringSerializer=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(!a)throw new Error("Reference to the data object cannot be NULL");if(this._data=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b}c.prototype.parse=function(){var a,b,c,j,k,l;if(window.DOMParser){l=(new window.DOMParser).parseFromString(this._data,"text/xml")}else l=new window.ActiveXObject("Microsoft.XMLDOM"),l.async=!1,l.loadXML(this._data);var m;m=parseInt(l.getElementsByTagName("trackingInterval")[0].childNodes[0].nodeValue,10),m&&(a=m),m=parseInt(l.getElementsByTagName("setupCheckInterval")[0].childNodes[0].nodeValue,10),m&&(b=m),m=parseInt(l.getElementsByTagName("trackExternalErrors")[0].childNodes[0].nodeValue,10),m&&(c=1==m),l.getElementsByTagName("trackingDisabled")[0]&&(m=parseInt(l.getElementsByTagName("trackingDisabled")[0].childNodes[0].nodeValue,10),j=1==m),l.getElementsByTagName("nielsenEnabled")[0]?(m=parseInt(l.getElementsByTagName("nielsenEnabled")[0].childNodes[0].nodeValue,10),k=1==m):k=!0;var n={};return n[e]=a,n[f]=b,n[g]=c,n[i]=j,n[h]=k,this._logger.debug(d,"#parse() > Obtained configuration settings."),n};var d="ah::SettingsParser",e="reporting_interval",f="check_status_interval",g="track_external_errors",h="nielsen_enabled",i="tracking_disabled";b.network.SettingsParser=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(this._trackingServer=null,this._checkStatusServer=null,this._publisher=null,this._isConfigured=!1,this._isDestroyed=!1,this._beginReporting=!1,this._sendingRequest=!1,this._requestsQueue=[],this._quietMode=!1,this._prevReportSent=null,!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._serializer=new i(b),this._installEventListeners()}var d=a.Event,e=a.URLRequestMethod,f=a.URLRequest,g=a.URLLoader,h=b.network.SettingsParser,i=b.model.QuerystringSerializer;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(j,"#destroy()"),this._uninstallEventListeners())},c.prototype._onApiConfig=function(a){var b=a.data;this._logger.debug(j,"#_onApiConfig(sb_server="+b[k]+", check_status_server="+b[l]+", publisher="+b[m]+", quiet_mode="+b[n]+", ssl="+b[o]+")"),this._trackingServer=this._updateRequestProtocol(b[k],b[o]),this._checkStatusServer=this._updateRequestProtocol(b[l],b[o]),this._publisher=b[m],this._quietMode=b[n],this._isConfigured=!0},c.prototype._onBeginReporting=function(a){this._logger.debug(j,"#_onBeginReporting()"),this._beginReporting=!0,this._sendNextRequest(),this._onClockCheckStatusTick()},c.prototype._onFilterReportAvailable=function(a){var b=a.data;if(!this._isConfigured)return void this._logger.warn(j,"#_onFilterReportAvailable() > Unable to send request: not configured.");var c=b[p];if(this._prevReportSent&&this._prevReportSent.eventData&&c.eventData&&this._prevReportSent.eventData.playhead==c.eventData.playhead&&this._prevReportSent.eventData.ts==c.eventData.ts&&this._prevReportSent.eventData.prevTs==c.eventData.prevTs&&this._prevReportSent.eventData.type==c.eventData.type)return void this._logger.debug(j,"#_onFilterReportAvailable() > Duplicate heartbeat report not sent for URL:\n"+e);this._prevReportSent=c;var d=this._serializer.serializeReport(c),e=this._trackingServer+"/?"+d.serializedOutput;this._processRequest(e,d.callback)},c.prototype._processRequest=function(a,b){this._requestsQueue.push({url:a,callback:b}),this._sendNextRequest()},c.prototype._sendNextRequest=function(){if(!this._beginReporting)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we have not started reporting.");if(this._sendingRequest)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we are currently sending a request.");var a=this._requestsQueue.shift();if(!a)return void this._logger.debug(j,"#_sendNextRequest() > Exiting as we have no requests to send.");this._sendingRequest=!0,this._logger.debug(j,"#_sendNextRequest() > "+a.url);var b=this,c=new g,h=function(){c.close(),a.callback&&a.callback.call(null),b._sendingRequest=!1,b._sendNextRequest()},i=function(a){h()},k=function(a){b._logger.warn(j,"#_onFilterReportAvailable() > Failed to send heartbeat report."),h()};if(!this._quietMode){c.addEventListener(d.SUCCESS,i,this),c.addEventListener(d.ERROR,k,this);var l=new f(a.url,e.GET);c.load(l)}},c.prototype._onClockCheckStatusTick=function(a){function b(a){if(a.data)try{var b=new h(a.data.response,i._logger),c=b.parse();c?i._channel.trigger(new d(u,c)):i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to parse the config. settings.")}catch(a){i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to parse the config. settings.")}n.close()}function c(a){i._logger.warn(j,"#_onClockCheckStatusTick() > Failed to obtain the config. settings."),n.close()}if(!this._isConfigured)return void this._logger.warn(j,"#_onClockCheckStatusTick() > Unable to send request: not configured.");if(!this._publisher)return void this._logger.warn(j,"#_onClockCheckStatusTick() > Publisher is NULL.");if(!this._beginReporting)return void this._logger.debug(j,"#_onClockCheckStatusTick() > Exiting as we have not started reporting.");var i=this,k=this._publisher.replace(/[^a-zA-Z0-9]+/,"-").toLocaleLowerCase(),l=this._checkStatusServer+k+".xml?r="+(new Date).getTime(),m=new f(l,e.GET),n=new g;n.addEventListener(d.SUCCESS,b,this),n.addEventListener(d.ERROR,c,this),this._logger.debug(j,"#_onClockCheckStatusTick() > Get new settings from: "+l),n.load(m)},c.prototype._updateRequestProtocol=function(a,b){var c=a;return 0===c.indexOf("http://")?c=c.slice(7):0===c.indexOf("https://")&&(c=c.slice(8)),b?"https://"+c:"http://"+c},c.prototype._installEventListeners=function(){this._channel.on(q,this._onApiConfig,this),this._channel.on(r,this._onBeginReporting,this),this._channel.on(s,this._onFilterReportAvailable,this),this._channel.on(t,this._onClockCheckStatusTick,this)},c.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)};var j="ah::Network",k="tracking_server",l="check_status_server",m="publisher",n="quiet_mode",o="ssl",p="report",q="api:config",r="api:video_begin_reporting",s="filter:data_available",t="clock:check_status.tick",u="net:check_status_complete";b.network.Network=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){if(!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._isDestroyed=!1,this._isBufferingInProgress=!1,this._reportBuffer={},this._tsHistory={},this._workQueue=new i,this._installEventListeners()}function d(a){var b=[];return a&&a.forEach(function(a){a.eventData.type()==k.EVENT_TYPE_PAUSE||a.eventData.type()==k.EVENT_TYPE_STALL||a.eventData.type()==k.EVENT_TYPE_BUFFER?(!a.filterReport||a.eventData.duration()>u)&&b.push(a):b.push(a)}),b}function e(a){var b=-1,c=-1,d=[];return a.forEach(function(a){a.eventData.type()==k.EVENT_TYPE_START?a.assetData.type()==l.TYPE_MAIN_CONTENT?-1==b?b=d.push(a)-1:(a.eventData.prevTs(-1),d[b]=a):-1==c?c=d.push(a)-1:(a.eventData.prevTs(-1),d[c]=a):d.push(a)}),d}function f(a){var b=[];return a.forEach(function(c){if(c.eventData.type()==k.EVENT_TYPE_PLAY){if(c.eventData.duration()>t)b.push(c);else if(0==c.eventData.duration()&&c.assetData.type()==l.TYPE_MAIN_CONTENT){var d=g(a);d.indexOf(c)==d.length-1&&b.push(c)}}else b.push(c)}),b}function g(a){var b=[];return a.forEach(function(a){a.eventData.type()!=k.EVENT_TYPE_PLAY&&a.eventData.type()!=k.EVENT_TYPE_BUFFER&&a.eventData.type()!=k.EVENT_TYPE_START||b.push(a)}),b}var h=a.radio.Command,i=a.radio.CommandQueue,j=a.Event,k=b.model.EventDao,l=b.model.AssetDao;c.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(w,"#destroy()"),this._uninstallEventListeners(),this.clear())},c.prototype.clear=function(){this._logger.debug(w,"#clear()"),this._workQueue.cancelAllCommands(),this._reportBuffer={},this._tsHistory={},this._isBufferingInProgress=!1},c.prototype.flush=function(){this._workQueue.addCommand(new h(this._flushBufferReport,this))},c.prototype._bufferReport=function(a){if(!this._isDestroyed){var b=a[q];if(b){var c=b.sessionData.sessionId();this._reportBuffer[c]=this._reportBuffer[c]||[],this._reportBuffer[c].push(b)}if(!this._isBufferingInProgress){this._isBufferingInProgress=!0;var d={};d[p]=!0,d[r]=1,this._channel.command(s,d)}}},c.prototype._flushBufferReport=function(){function a(a){if(a)for(var c=0;c<a.length;c++){var d=a[c],e=d.sessionData.sessionId();b._tsHistory[e]=b._tsHistory[e]||{};var f=d.eventData.type()+"."+(d.assetData.type()==l.TYPE_AD?d.assetData.adData().adId():d.assetData.videoId());b._tsHistory[e].hasOwnProperty(f)&&d.eventData.prevTs(b._tsHistory[e][f]),b._tsHistory[e][f]=d.eventData.ts()}}if(!this._isDestroyed){var b=this;for(var c in this._reportBuffer)if(this._reportBuffer.hasOwnProperty(c)){var g=f(e(d(this._reportBuffer[c])));a(g);for(var h=0;h<g.length;h++){var i=g[h],k={};k[q]=i,this._channel.trigger(new j(n,k))}}this._reportBuffer={};var m=this._channel.request(v),o=this._tsHistory[m]||{};this._tsHistory={},this._tsHistory[m]=o,this._isBufferingInProgress=!1}},c.prototype._onContextReportAvailable=function(a){var b=a.data;this._workQueue.addCommand(new h(this._bufferReport,this,[b]))},c.prototype._onClockFlushFilterTick=function(a){this.flush()},c.prototype._installEventListeners=function(){this._channel.on(m,this._onContextReportAvailable,this),this._channel.on(o,this._onClockFlushFilterTick,this)},c.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)};var m="context:report_available",n="filter:data_available",o="clock:flush_filter.tick",p="reset",q="report",r="repeat_count",s="clock:flush_filter.resume",t=250,u=250,v="session_id",w="ah::ReportFilter";b.filter.ReportFilter=c}(a.ADB.core,b),function(a,b){"use strict";function c(a,b){this._onFail={fn:a,ctx:b}}var d=a.ErrorInfo;c.prototype.validateFields=function(a,b){if(!a)return this._fail("Data cannot be null");if(b)for(var c=0;c<b.length;c++){var d=b[c];switch(d){case"videoId":if(!a.hasOwnProperty("videoId"))return this._fail("The ID for the main video must be specified.");if("string"!=typeof a.videoId)return this._fail("The ID for the main video must be a String.");if(""===a.videoId)return this._fail("The ID for the main video cannot be an empty string.");break;case"streamType":if(!a.hasOwnProperty("streamType"))return this._fail("The stream type for the main video must be specified.");if("string"!=typeof a.streamType)return this._fail("The stream type for the main video must be a String.");if(""===a.streamType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"videoLength":if(!a.hasOwnProperty("videoLength"))return this._fail("The length of the main video must be specified.");if("number"!=typeof a.videoLength)return this._fail("The length of the main video must be a Number.");if(isNaN(a.videoLength))return this._fail("The length of the main video cannot be NaN.");break;case"playhead":if(!a.hasOwnProperty("playhead"))return this._fail("The playhead for the main video must be specified.");if("number"!=typeof a.playhead)return this._fail("The playhead for the main video must be a Number.");if(isNaN(a.playhead))return this._fail("The playhead for the main video cannot be NaN.");break;case"playerName":if(!a.hasOwnProperty("playerName"))return this._fail("The player name for the main video must be specified.");if("string"!=typeof a.playerName)return this._fail("The player name for the main video must be a String.");if(""===a.playerName)return this._fail("The player name for the main video cannot be an empty string.");break;case"rsid":if(!a.hasOwnProperty("rsid"))return this._fail("account (rsid) is required and has to be set in the AppMeasurement instance.");if("string"!=typeof a.rsid)return this._fail("account (rsid) of the AppMeasurement instance must be a String.");if(""===a.rsid)return this._fail("account (rsid) of the AppMeasurement instance cannot be an empty string.");break;case"trackingServer":if(!a.hasOwnProperty("trackingServer"))return this._fail("trackingServer is required and has to be set in the AppMeasurement instance.");if("string"!=typeof a.trackingServer)return this._fail("trackingServer of the AppMeasurement instance must be a String.");if(""===a.trackingServer)return this._fail("trackingServer of the AppMeasurement instance cannot be an empty string.");break;case"podPlayerName":if(!a.hasOwnProperty("podPlayerName"))return this._fail("The player name for the ad-break must be specified.");if("string"!=typeof a.podPlayerName)return this._fail("The player name for the ad-break must be a String.");if(""===a.podPlayerName)return this._fail("The player name for the ad-break cannot be an empty string.");break;case"podPosition":if(!a.hasOwnProperty("podPosition"))return this._fail("Position (index) of the ad-break must be specified.");if("number"!=typeof a.podPosition)return this._fail("Position (index) of the ad-break must be a Number.");if(isNaN(a.podPosition))return this._fail("Position (index) of the ad-break cannot be NaN.");break;case"adId":if(!a.hasOwnProperty("adId"))return this._fail("The ad ID must be specified.");if("string"!=typeof a.adId)return this._fail("The ad ID must be a String.");if(""===a.adId)return this._fail("The ad ID cannot be an empty string.");break;case"adPosition":if(!a.hasOwnProperty("adPosition"))return this._fail("Position (index) of the ad must be specified.");if("number"!=typeof a.adPosition)return this._fail("Position (index) of the ad must be a Number.");if(isNaN(a.adPosition))return this._fail("Position (index) of the ad cannot be NaN.");break;case"chapterPosition":if(!a.hasOwnProperty("chapterPosition"))return this._fail("Position (index) of the chapter must be specified.");if("number"!=typeof a.chapterPosition)return this._fail("Position (index) of the chapter must be a Number.");if(isNaN(a.chapterPosition))return this._fail("Position (index) of the chapter cannot be NaN.");break;case"chapterOffset":if(!a.hasOwnProperty("chapterOffset"))return this._fail("Chapter start-time (offset) must be specified.");if("number"!=typeof a.chapterOffset)return this._fail("Chapter start-time (offset) must be a Number.");if(isNaN(a.chapterOffset))return this._fail("Chapter start-time (offset) cannot be NaN.");break;case"chapterLength":if(!a.hasOwnProperty("chapterLength"))return this._fail("The length of the chapter must be specified.");if("number"!=typeof a.chapterLength)return this._fail("The length of the chapter must be a Number.");if(isNaN(a.chapterLength))return this._fail("The length of the chapter cannot be NaN.");break;default:return this._fail("Unable to validate unknown parameter: "+d)}}return!0},c.prototype._fail=function(a){var b=new d("Invalid input data",a);return this._onFail.fn&&this._onFail.fn.call(this._onFail.ctx,b),!1},b.context.InputDataValidator=c}(a.ADB.va,b),function(a,b){"use strict";function c(a,b){if(!b)throw new Error("Reference to the logger object cannot be NULL");if(this._logger=b,!a)throw new Error("Reference to the context object cannot be NULL");this._context=a}var d=b.model.Report;c.prototype.createReportForItem=function(a){return this._logger.debug(e,"Creating report for item: "+a.eventData.type()),new d(this._context._adobeAnalyticsData,this._context._userData,this._context._aamData,this._context._serviceProviderData,this._context._sessionData,a)};var e="ah::ReportFactory";b.context.ReportFactory=c}(a.ADB.core,b),function(a,b,c,d){"use strict";function e(a,b){if(!a)throw new Error("Reference to the channel object cannot be NULL");if(this._channel=a,!b)throw new Error("Reference to the logger object cannot be NULL");this._logger=b,this._lastInBandItem=null,this._stashedLastInBandItem=null,this._stashedMainMetadata=null,this._autoComputedStartupTime=0,this._reportingInterval=ma,this._assetData=null,this._streamData=null,this._qosData=null,this._sessionData=null,this._cuserData=null,this._adobeAnalyticsData=new j,this._serviceProviderData=new k,this._userData=new l,this._aamData=new m,this._isTrackingSessionActive=!1,this._isVideoComplete=!1,this._isDestroyed=!1,this._doNotOverrideEventDuration=!1,this._reportFactory=new u(this,this._logger),this._inputDataValidator=new v(function(a){this._logger.error(w,a.getMessage()+" | "+a.getDetails()),this._channel.trigger(new h(y,a))},this),this._trackExternalErrors=!0,this._installEventListeners()}var f=c.md5,g=c.ObjectUtils,h=a.Event,i=d.model.SessionDao,j=d.model.AdobeAnalyticsDao,k=d.model.ServiceProviderDao,l=d.model.UserDao,m=d.model.AudienceManagerDao,n=d.model.EventDao,o=d.model.AssetDao,p=d.model.StreamDao,q=d.model.QoSDao,r=d.model.AdDao,s=d.model.ChapterDao,t=d.model.TrackItem,u=d.context.ReportFactory,v=d.context.InputDataValidator;e.prototype.destroy=function(){this._isDestroyed||(this._isDestroyed=!0,this._logger.debug(w,"#destroy()"),this._uninstallEventListeners())},e.prototype._onApiAnalyticsStart=function(a){this._logger.debug(w,"#_onApiAnalyticsStart()");var b=a.data;if(this._checkCall("_onApiAnalyticsStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._userData.visitorId(b.vid),this._userData.analyticsVisitorId(b.aid),this._userData.marketingCloudVisitorId(b.mid),this._aamData.audienceManagerBlob(b.blob),this._aamData.audienceManagerLocationHint(b.loc_hint),b.customerIDs&&(this._cuserData=b.customerIDs),this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_AA_START,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._cuserData=null,this._sendHit(c)}},e.prototype._onApiAnalyticsAdStart=function(a){this._logger.debug(w,"#_onApiAnalyticsAdStart()");var b=a.data;if(this._checkCall("_onApiAnalyticsAdStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_AA_AD_START,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiVideoLoad=function(a){var b=a.data;this._logger.debug(w,"#_onApiVideoLoad(rsid="+b.rsid+", aa_trackingServer="+b.trackingServer+")"),this._resetInternalState(),this._inputDataValidator.validateFields(b,["rsid","trackingServer"])&&(this._sessionData.sessionId(this._generateSessionId()),this._isTrackingSessionActive=!0)},e.prototype._onApiVideoUnload=function(a){if(this._logger.debug(w,"#_onApiVideoUnload()"),!this._isTrackingSessionActive)return void this._logger.debug(w,"#_onApiVideoUnload() > No active tracking session.");this._isTrackingSessionActive=!1},e.prototype._onApiVideoStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiVideoStart(id="+b.videoId+", name="+b.videoName+", length="+b.videoLength+", type="+b.streamType+", playerName="+b.playerName+")"),this._checkCall("_onApiVideoStart")&&this._inputDataValidator.validateFields(b,["videoId","streamType","videoLength","playhead","playerName"])){this._lastInBandItem=null,this._stashedLastInBandItem=null,this._adobeAnalyticsData.reportSuiteId(b.rsid),this._adobeAnalyticsData.trackingServer(b.trackingServer),this._adobeAnalyticsData.ssl(Number(b.useSsl)),this._serviceProviderData.ovp(b.ovp),this._serviceProviderData.sdk(b.sdk),this._serviceProviderData.channel(b.channel),this._serviceProviderData.libVersion(b.version),this._serviceProviderData.apiLevel(b.apiLvl),this._serviceProviderData.playerName(b.playerName),this._assetData.adData(null),this._assetData.chapterData(null),this._assetData.videoId(b.videoId),this._assetData.length(b.videoLength),this._assetData.type(o.TYPE_MAIN_CONTENT),this._assetData.publisher(b.publisher),this._assetData.name(b.videoName),this._streamData.type(b.streamType),this._updateQoSInfo(b);var c=b.metaNielsen?g.merge(b.metaVideo,b.metaNielsen):b.metaVideo,d=new t(this,n.EVENT_TYPE_START,b.playhead,c,b._eventData[E]);this._sendHit(d)}},e.prototype._onApiVideoResume=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiVideoResume(id="+b.videoId+", name="+b.videoName+", length="+b.videoLength+", type="+b.streamType+", playerName="+b.playerName+")"),this._checkCall("_onApiVideoResume")&&this._inputDataValidator.validateFields(b,["videoId","streamType","videoLength","playhead","playerName"])){this._assetData.videoId(b.videoId),this._assetData.length(b.videoLength),this._assetData.type(o.TYPE_MAIN_CONTENT),this._assetData.name(b.videoName),this._streamData.type(b.streamType);var c=new t(this,n.EVENT_TYPE_RESUME,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiVideoSessionEnd=function(a){this._logger.debug(w,"#_onApiVideoSessionEnd()");var b=a.data;if(this._checkCall("_onApiVideoSessionEnd")&&this._inputDataValidator.validateFields(b,["playhead"])){var c=new t(this,n.EVENT_TYPE_END,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c)}},e.prototype._onApiVideoComplete=function(a){this._logger.debug(w,"#_onApiVideoComplete()");var b=a.data;if(this._checkCall("_onApiVideoComplete")){var c=new t(this,n.EVENT_TYPE_COMPLETE,this._assetData.length(),null,b._eventData[E]);this._sendHit(c),this._isVideoComplete=!0}},e.prototype._onApiVideoSkip=function(a){this._logger.debug(w,"#_onApiVideoSkip()");var b=a.data;if(this._checkCall("_onApiVideoSkip")){var c=new t(this,n.EVENT_TYPE_SKIP,b.playhead,null,b._eventData[E]);this._sendHit(c),this._isVideoComplete=!0}},e.prototype._onApiPlay=function(a){this._logger.debug(w,"#_onApiPlay()");var b=a.data;if(this._checkCall("_onApiPlay")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_PLAY,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiPause=function(a){this._logger.debug(w,"#_onApiPause()");var b=a.data;if(this._checkCall("_onApiPause")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=b.playheadStalled?n.EVENT_TYPE_STALL:n.EVENT_TYPE_PAUSE,d=new t(this,c,b.playhead,null,b._eventData[E]);b._eventData.hasOwnProperty(F)&&(d.filterReport=b._eventData[F]),this._sendHit(d)}},e.prototype._onApiBufferStart=function(a){this._logger.debug(w,"#_onApiBufferStart()");var b=a.data;if(this._checkCall("_onApiBufferStart")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_BUFFER,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiAdBreakStart=function(a){this._logger.debug(w,"#_onApiAdBreakStart()");var b=a.data;this._checkCall("_onApiAdBreakStart")&&this._inputDataValidator.validateFields(b,["playhead"])&&(this._flushLastInbandItem(b),this._updateLastInbandItemToBuffering())},e.prototype._onApiAdBreakComplete=function(a){this._logger.debug(w,"#_onApiAdBreakComplete()");var b=a.data;this._checkCall("_onApiAdBreakComplete")&&this._inputDataValidator.validateFields(b,["playhead"])&&(this._flushLastInbandItem(b),this._restoreLastInbandItem())},e.prototype._onApiAdStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiAdStart(id="+b.adId+", player_name="+b.podPlayerName+", parent_name="+this._assetData.videoId()+", pod_pos="+b.adPosition+")"),this._checkCall("_onApiAdStart")&&this._inputDataValidator.validateFields(b,["playhead","podPosition","podPlayerName","adId","adPosition"])){var c=new r;c.adId(b.adId),c.adName(b.adName),c.adLength(b.adLength),c.resolver(b.podPlayerName),c.podId(f(this._assetData.videoId())+"_"+b.podPosition),c.podPosition(b.adPosition+""),c.podName(b.podName),c.podOffset(b.podSecond),c.sid(this._generateSessionId()),this._assetData.adData(c),this._assetData.type(o.TYPE_AD),this._updateQoSInfo(b);var d=g.merge(b.metaVideo,b.metaAd);d=b.metaNielsen?g.merge(d,b.metaNielsen):d,d=b.metaAdNielsen?g.merge(d,b.metaAdNielsen):d;var e=new t(this,n.EVENT_TYPE_START,b.playhead,d,b._eventData[E]);this._sendHit(e),this._restoreLastInbandItem();if(!!b.adGranularTracking){var h=b.adTrackingInterval?b.adTrackingInterval:this._reportingInterval;this._updateReportingInterval(h,!0)}}},e.prototype._onApiAdComplete=function(a){this._logger.debug(w,"#_onApiAdComplete()");var b=a.data;if(this._checkCall("_onApiAdComplete")&&this._inputDataValidator.validateFields(b,["playhead"])){if(this._assetData.type()!=o.TYPE_AD)return void this._logger.warn(w,"#_onApiAdComplete() > Ignoring the ad complete event, because we are no longer in an ad.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_COMPLETE,b.playhead,null,b._eventData[E]);this._sendHit(c),this._updateLastInbandItemToBuffering(),this._assetData.adData(null),this._assetData.type(o.TYPE_MAIN_CONTENT),this._updateReportingInterval(this._reportingInterval,!1)}},e.prototype._onApiAdSkip=function(a){this._logger.debug(w,"#_onApiAdSkip()");var b=a.data;if(this._checkCall("_onApiAdSkip")&&this._inputDataValidator.validateFields(b,["playhead"])){if(this._assetData.type()!=o.TYPE_AD)return void this._logger.warn(w,"#_onApiAdSkip() > Ignoring the ad skip event, because we are no longer in an ad.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_SKIP,b.playhead,null,b._eventData[E]);this._sendHit(c),this._updateLastInbandItemToBuffering(),this._assetData.adData(null),this._assetData.type(o.TYPE_MAIN_CONTENT),this._updateReportingInterval(this._reportingInterval,!1)}},e.prototype._onApiChapterStart=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiChapterStart(name="+b.chapterName+", length="+b.chapterLength+", position="+b.chapterPosition+", chapter_offset="+b.chapterOffset+")"),this._checkCall("_onApiChapterStart")&&this._inputDataValidator.validateFields(b,["playhead","chapterPosition","chapterOffset","chapterLength"])){var c=new s;c.id(f(this._assetData.videoId())+"_"+b.chapterPosition),c.name(b.chapterName),c.length(b.chapterLength),c.position(b.chapterPosition),c.offset(b.chapterOffset),c.sid(this._generateSessionId()),this._assetData.chapterData(c),this._updateQoSInfo(b);var d=g.merge(b.metaVideo,b.metaChapter),e=new t(this,n.EVENT_TYPE_CHAPTER_START,b.playhead,d,b._eventData[E]);e.assetData.adData(null),e.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(e)}},e.prototype._onApiChapterComplete=function(a){this._logger.debug(w,"#_onApiChapterComplete()");var b=a.data;if(this._checkCall("_onApiChapterComplete")&&this._inputDataValidator.validateFields(b,["playhead"])){if(!this._assetData.chapterData())return void this._logger.warn(w,"#_onApiChapterComplete() > Ignoring the chapter complete event, because we are no longer in a chapter.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_CHAPTER_COMPLETE,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c),this._assetData.chapterData(null)}},e.prototype._onApiChapterSkip=function(a){this._logger.debug(w,"#_onApiChapterSkip()");var b=a.data;if(this._checkCall("_onApiChapterSkip")&&this._inputDataValidator.validateFields(b,["playhead"])){if(!this._assetData.chapterData())return void this._logger.warn(w,"#_onApiChapterSkip() > Ignoring the chapter skip event, because we are no longer in a chapter.");this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_CHAPTER_SKIP,b.playhead,null,b._eventData[E]);c.assetData.adData(null),c.assetData.type(o.TYPE_MAIN_CONTENT),this._sendHit(c),this._assetData.chapterData(null)}},e.prototype._onApiBitrateChange=function(a){this._logger.debug(w,"#_onApiBitrateChange()");var b=a.data;if(this._checkCall("_onApiBitrateChange")&&this._inputDataValidator.validateFields(b,["playhead"])){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_BITRATE_CHANGE,b.playhead,null,b._eventData[E]);this._sendHit(c)}},e.prototype._onApiTrackError=function(a){var b=a.data;if(this._logger.debug(w,"#_onApiTrackError(source="+b._eventData.source+", err_id="+b._eventData.error_id+")"),!this._isTrackingSessionActive)return void this._logger.warn(w,"#_onApiTrackError() > No active tracking session.");if(this._trackExternalErrors||b._eventData.source===x){this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_ERROR,0,null,b._eventData[E]);c.eventData.id(b._eventData.error_id),c.eventData.source(b._eventData.source),this._sendHit(c)}},e.prototype._onApiTrackInternalError=function(a){var b=a.data;this._logger.debug(w,"#_onApiTrackInternalError(source="+b.source+", err_id="+b.error_id+")"),this._updateQoSInfo(b);var c=new t(this,n.EVENT_TYPE_ERROR,0);c.eventData.id(b.error_id),c.eventData.source(b.source),this._sendHit(c)},e.prototype._onApiQuantumEnd=function(a){this._logger.debug(w,"#_onApiQuantumEnd(interval="+this._channel.request(B)+")");var b=a.data;if(this._checkCall("_onApiQuantumEnd")&&this._inputDataValidator.validateFields(b,["playhead"])){var c=this._lastInBandItem;if(c){this._updateQoSInfo(b);var d=new t(this,c.eventData.type(),b.playhead,c.meta,c.callback);d.filterReport=c.filterReport,this._sendHit(d,!0)}}},e.prototype._onNetworkCheckStatusComplete=function(a){var b=a.data;this._trackExternalErrors=b[I],this._reportingInterval=b[J],this._reportingInterval||(this._reportingInterval=ma),this._logger.debug(w,"#_onNetworkCheckStatusComplete(track_ext_err="+this._trackExternalErrors+")")},e.prototype._onResetSessionId=function(a){var b=this._generateSessionId();this._sessionData=new i,this._sessionData.sessionId(b),this._logger.debug(w,"#_resetSessionId(new sessionId="+b+")")},e.prototype._installEventListeners=function(){this._channel.on(L,this._onApiAnalyticsStart,this),this._channel.on(M,this._onApiAnalyticsAdStart,this),this._channel.on(N,this._onApiVideoLoad,this),this._channel.on(O,this._onApiVideoUnload,this),this._channel.on(P,this._onApiVideoStart,this),this._channel.on(Q,this._onApiVideoComplete,this),this._channel.on(R,this._onApiVideoSkip,this),this._channel.on(S,this._onApiVideoResume,this),this._channel.on(T,this._onApiVideoSessionEnd,this),this._channel.on(U,this._onApiAdBreakStart,this),this._channel.on(V,this._onApiAdBreakComplete,this),this._channel.on(W,this._onApiAdStart,this),this._channel.on(X,this._onApiAdComplete,this),this._channel.on(Y,this._onApiAdSkip,this),this._channel.on(Z,this._onApiPlay,this),this._channel.on($,this._onApiPause,this),this._channel.on(_,this._onApiBufferStart,this),this._channel.on(aa,this._onApiChapterStart,this),this._channel.on(ba,this._onApiChapterComplete,this),this._channel.on(ca,this._onApiChapterSkip,this),this._channel.on(fa,this._onApiBitrateChange,this),this._channel.on(da,this._onApiTrackError,this),this._channel.on(ea,this._onApiTrackInternalError,this),this._channel.on(ga,this._onApiQuantumEnd,this),this._channel.on(ia,this._onNetworkCheckStatusComplete,this),this._channel.on(D,this._onResetSessionId,this),this._channel.reply(C,function(){return this._sessionData&&this._sessionData.sessionId()?this._sessionData.sessionId():null},this)},e.prototype._uninstallEventListeners=function(){this._channel.off(null,null,this)},e.prototype._resetInternalState=function(){this._logger.debug(w,"#_resetInternalState()"),this._isTrackingSessionActive=!1,this._isVideoComplete=!1,this._autoComputedStartupTime=0,this._lastInBandItem=null,this._stashedLastInBandItem=null,this._streamData=new p,this._qosData=new q,this._sessionData=new i,this._assetData=new o,this._cuserData=null},e.prototype._generateSessionId=function(){return""+(new Date).getTime()+Math.floor(1e9*Math.random())},e.prototype._updateQoSInfo=function(a){this._qosData.bitrate(a.bitrate||0),this._qosData.fps(a.fps||0),this._qosData.droppedFrames(a.droppedFrames||0),null==a.startupTime||isNaN(a.startupTime)?(this._qosData.startupTime(this._autoComputedStartupTime),this._qosData.isStartupTimeOverridden=!1):(this._qosData.startupTime(a.startupTime),this._qosData.isStartupTimeOverridden=!0)},e.prototype._checkCall=function(a){return this._isTrackingSessionActive?!this._isVideoComplete||"_onApiVideoSessionEnd"===a||(this._logger.warn(w,"#"+a+"() > The video content already completed."),!1):(this._logger.warn(w,"#"+a+"() > No active tracking session."),!1)},e.prototype._updateReportingInterval=function(a,b){var c={};c[K]=!!b,c[J]=a,this._channel.trigger(new h(ja,c))},e.prototype._updateLastInBandItem=function(a){var b=this._lastInBandItem,c=(new Date).getTime(),d=b.assetData.type()===o.TYPE_AD||a.assetData.type()===o.TYPE_AD,e=1e3*Math.abs(a.eventData.playhead()-b.eventData.playhead()),f=Math.abs(c-b.eventData.ts()),g=Math.abs(e-f),h=f;h>ka?(this._logger.warn(w," Resetting duration in lastInBandItem["+b.assetData.type()+":"+b.eventData.type()+"] call to 0 as calculated duration ("+h+")exceeds 10mins"),h=0):b.eventData.type()==n.EVENT_TYPE_PLAY&&!d&&!this._doNotOverrideEventDuration&&g>la&&(h=Math.min(e,f),this._logger.warn(w," Resetting duration in lastInBandItem["+b.assetData.type()+":"+b.eventData.type()+"] call to "+h+" as calculated error delta ("+g+")exceeds 2sec")),this._doNotOverrideEventDuration=!1,b.eventData.duration(h),b.eventData.ts(c),b.eventData.playhead(a.eventData.playhead()),b.qosData.startupTime(a.qosData.startupTime()),b.qosData.isStartupTimeOverridden=a.qosData.isStartupTimeOverridden},e.prototype._updateLastInbandItemToBuffering=function(){this._stashedLastInBandItem=this._lastInBandItem;var a=0;null!=this._lastInBandItem&&(this._lastInBandItem.assetData.type()==o.TYPE_MAIN_CONTENT&&this._lastInBandItem.eventData.type()==n.EVENT_TYPE_START&&(this._stashedMainMetadata=this._lastInBandItem.meta),a=this._lastInBandItem.eventData.playhead());var b=new t(this,n.EVENT_TYPE_BUFFER,a,null,null);b.assetData.adData(null),b.assetData.type(o.TYPE_MAIN_CONTENT),this._lastInBandItem=b},e.prototype._restoreLastInbandItem=function(){if(null!=this._stashedLastInBandItem){var a=null;this._stashedLastInBandItem.eventData.type()==n.EVENT_TYPE_START&&(this._lastInBandItem.assetData.type()==o.TYPE_AD?a=this._lastInBandItem.meta:(a=this._stashedMainMetadata,this._stashedMainMetadata=null));var b=new t(this,this._stashedLastInBandItem.eventData.type(),this._stashedLastInBandItem.eventData.playhead(),a,this._stashedLastInBandItem.callback);b.filterReport=this._stashedLastInBandItem.filterReport,this._lastInBandItem=b,this._stashedLastInBandItem=null}},e.prototype._flushLastInbandItem=function(a){if(this._lastInBandItem){this._updateQoSInfo(a);var b=new t(this,this._lastInBandItem.eventData.type(),a.playhead,this._lastInBandItem.meta,this._lastInBandItem.callback);this._sendHit(b,!0)}},e.prototype._createAndSendReport=function(a){var b=this._reportFactory.createReportForItem(a);b.qosData.isStartupTimeOverridden||b.qosData.startupTime(this._autoComputedStartupTime);var c={};if(c[G]=b,this._channel.trigger(new h(ha,c)),b.eventData.type()==n.EVENT_TYPE_START||b.eventData.type()==n.EVENT_TYPE_PLAY||b.eventData.type()==n.EVENT_TYPE_PAUSE||b.eventData.type()==n.EVENT_TYPE_STALL||b.eventData.type()==n.EVENT_TYPE_BUFFER){var d={};d[H]=!0,this._channel.command(z,d)}},e.prototype._sendHit=function(a,b){switch(a.eventData.type()){case n.EVENT_TYPE_START:case n.EVENT_TYPE_PLAY:case n.EVENT_TYPE_PAUSE:case n.EVENT_TYPE_STALL:case n.EVENT_TYPE_BUFFER:this._lastInBandItem?(this._updateLastInBandItem(a),this._lastInBandItem.eventData.type()==n.EVENT_TYPE_START&&this._lastInBandItem.assetData.type()==o.TYPE_MAIN_CONTENT&&(this._autoComputedStartupTime+=this._lastInBandItem.eventData.duration()),this._createAndSendReport(this._lastInBandItem),b&&this._lastInBandItem.eventData.type()==a.eventData.type()||this._createAndSendReport(a)):this._createAndSendReport(a),this._lastInBandItem=a;break;case n.EVENT_TYPE_COMPLETE:case n.EVENT_TYPE_SKIP:if(this._lastInBandItem&&(this._updateLastInBandItem(a),this._createAndSendReport(this._lastInBandItem)),a.eventData.type()!==n.EVENT_TYPE_SKIP&&this._createAndSendReport(a),a.assetData.type()==o.TYPE_MAIN_CONTENT){this._lastInBandItem=null,this._stashedLastInBandItem=null;var c={};c[H]=!0,this._channel.command(A,c)}else a.assetData.type()==o.TYPE_AD&&(this._lastInBandItem.assetData.adData(null),this._lastInBandItem.assetData.type(o.TYPE_MAIN_CONTENT),this._doNotOverrideEventDuration=!0);break;case n.EVENT_TYPE_CHAPTER_START:case n.EVENT_TYPE_CHAPTER_COMPLETE:case n.EVENT_TYPE_CHAPTER_SKIP:this._lastInBandItem&&(this._updateLastInBandItem(a),this._createAndSendReport(this._lastInBandItem)),a.eventData.type()!==n.EVENT_TYPE_CHAPTER_SKIP&&this._createAndSendReport(a),this._lastInBandItem&&(this._lastInBandItem.assetData.chapterData(a.eventData.type()==n.EVENT_TYPE_CHAPTER_START?new s(a.assetData.chapterData()):null),this._lastInBandItem.eventData.duration(0),this._createAndSendReport(this._lastInBandItem));break;default:this._createAndSendReport(a)}};var w="ah::Context",x="sourceErrorSDK",y="error",z="clock:reporting.resume",A="clock:reporting.pause",B="reporting_interval",C="session_id",D="reset_session_id",E="callback",F="filter_report",G="report",H="reset",I="track_external_errors",J="reporting_interval",K="do_not_override_interval",L="api:aa_start",M="api:aa_ad_start",N="api:video_load",O="api:video_unload",P="api:video_start",Q="api:video_complete",R="api:video_skip",S="api:video_resume",T="api:video_session_end",U="api:adbreak_start",V="api:adbreak_complete",W="api:ad_start",X="api:ad_complete",Y="api:ad_skip",Z="api:play",$="api:pause",_="api:buffer_start",aa="api:chapter_start",ba="api:chapter_complete",ca="api:chapter_skip",da="api:track_error",ea="api:track_internal_error",fa="api:bitrate_change",ga="api:quantum_end",ha="context:report_available",ia="net:check_status_complete",ja="reporting:update_interval",ka=6e5,la=2e3,ma=10;d.context.Context=e}(a.ADB.core,a.ADB.va,a.ADB.va.utils,b),function(a){"use strict";function b(a,b){this.trackingServer=a,this.publisher=b,this.ssl=!1,this.ovp=c,this.sdk=c,this.quietMode=!1,this.debugLogging=!1,this.__isPrimetime=!1,this.__psdkVersion=null}var c="unknown";a.AdobeHeartbeatPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.onError=function(a){},b.prototype.onTrackingDisabled=function(){},a.AdobeHeartbeatPluginDelegate=b}(b),function(a,b,c){"use strict";function d(a){d.__super__.constructor.call(this,q),this._radio=new i(this._logger),this._channel=this._radio.channel(y),this._delegate=a,this._context=new l(this._channel,this._logger),this._filter=new m(this._channel,this._logger),this._network=new n(this._channel,this._logger),this._setupDataResolver()}var e=a.Event,f=a.Trigger,g=a.plugin.BasePlugin,h=a.plugin.ParamMapping,i=a.radio.Radio,j=b.ErrorInfo,k=b.Version,l=c.context.Context,m=c.filter.ReportFilter,n=c.network.Network,o=c.clock.Clock,p=c.AdobeHeartbeatPluginConfig;a.extend(d,g),d.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof p))throw new Error("Expected config data to be instance of AdobeHeartbeatPluginConfig.");this._config=a,this._config.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure({trackingServer="+this._config.trackingServer+", publisher="+this._config.publisher+", quietMode="+this._config.quietMode+", ssl="+this._config.ssl+"})");var b=this._config.trackingServer+"/settings/",c={};c[ja]=this._config.trackingServer,c[ka]=b,c[la]=this._config.publisher,c[ma]=this._config.quietMode,c[na]=this._config.ssl,this._channel.trigger(new e(sa,c)),this._isConfigured=!0},d.prototype.bootstrap=function(a){d.__super__.bootstrap.call(this,a),this._channel.on(z,this._onError,this),this._clock=new o(this._pluginManager,this._channel,this._logger),this._channel.command(Ra),this._channel.trigger(new e(Ya)),this._channel.on(pa,this._onCheckStatusComplete,this),this._registerCommands(),this._registerBehaviours()},d.prototype._teardown=function(){this._logger.debug(this._logTag,"#_teardown()"),this._radio.shutdown(),this._context.destroy(),this._clock.destroy(),this._filter.destroy(),this._network.destroy()},d.prototype._canProcess=function(){return this._isConfigured?this._errorInfo?(this._logger.error(this._logTag,"_canProcess() > Plugin in ERROR state."),!1):d.__super__._canProcess.call(this):(this._logger.error(this._logTag,"_canProcess() > Plugin not configured."),!1)},d.prototype._cmdAnalyticsError=function(a){this._errorInfo||(this._errorInfo=new j("Internal error","AdobeAnalyticsPlugin is in ERROR state."),this._trigger(z,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo))},d.prototype._cmdAnalyticsStart=function(a){this._canProcess()&&this._channel.trigger(new e(qa,a))},d.prototype._cmdAnalyticsAdStart=function(a){this._canProcess()&&this._channel.trigger(new e(ra,a))},d.prototype._cmdVideoLoad=function(a){this._errorInfo=null,this._canProcess()&&(this._isTrackingSessionActive&&this._channel.trigger(new e(ua,a)),this._isTrackingSessionActive=!1,this._isPaused=!0,this._isSeeking=!1,this._isBuffering=!1,this._isVideoIdle=!1,this._filter.clear(),this._channel.trigger(new e(ta,a)),this._isTrackingSessionActive=!0)},d.prototype._cmdVideoUnload=function(a){this._errorInfo=null,this._canProcess()&&(this._channel.trigger(new e(ua,a)),this._filter.flush(),this._runReportingTimer(!1),this._runFlushFilterTimer(!1),this._runIdleTimer(!1),this._isTrackingSessionActive=!1)},d.prototype._cmdBeginReporting=function(a){this._canProcess()&&this._channel.trigger(new e(Pa,{}))},d.prototype._cmdVideoSessionEnd=function(a){this._canProcess()&&this._channel.trigger(new e(za,a))},d.prototype._cmdVideoStart=function(a){this._canProcess()&&(this._channel.trigger(new e(va,a)),this._filter.flush())},d.prototype._cmdVideoComplete=function(a){this._canProcess()&&this._channel.trigger(new e(wa,a))},d.prototype._cmdVideoSkip=function(a){this._canProcess()&&this._channel.trigger(new e(xa,a))},d.prototype._cmdVideoResume=function(a){this._canProcess()&&this._channel.trigger(new e(ya,a))},d.prototype._cmdPlay=function(a){this._canProcess()&&(this._isPaused=!1,this._resumePlaybackIfPossible(a))},d.prototype._cmdPause=function(a){this._canProcess()&&(this._channel.trigger(new e(Ga,a)),this._isPaused=!0,this._runIdleTimer(!0))},d.prototype._cmdAdBreakStart=function(a){this._canProcess()&&this._channel.trigger(new e(Aa,a))},d.prototype._cmdAdBreakComplete=function(a){this._canProcess()&&(this._channel.trigger(new e(Ba,a)),this._resumePlaybackIfPossible(a))},d.prototype._cmdAdStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ca,a)),this._resumePlaybackIfPossible(a))},d.prototype._cmdAdComplete=function(a){this._canProcess()&&this._channel.trigger(new e(Da,a))},d.prototype._cmdAdSkip=function(a){this._canProcess()&&this._channel.trigger(new e(Ea,a))},d.prototype._cmdBufferStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ha,a)),this._isBuffering=!0,this._runIdleTimer(!0))},d.prototype._cmdBufferComplete=function(a){this._canProcess()&&(this._isBuffering=!1,this._isPaused?this._channel.trigger(new e(Ga,a)):this._resumePlaybackIfPossible(a))},d.prototype._cmdSeekStart=function(a){this._canProcess()&&(this._channel.trigger(new e(Ga,a)),this._isSeeking=!0,this._runIdleTimer(!0))},d.prototype._cmdSeekComplete=function(a){this._canProcess()&&(this._isSeeking=!1,this._resumePlaybackIfPossible(a))},d.prototype._cmdChapterStart=function(a){this._canProcess()&&this._channel.trigger(new e(Ia,a))},d.prototype._cmdChapterComplete=function(a){this._canProcess()&&this._channel.trigger(new e(Ja,a))},d.prototype._cmdChapterSkip=function(a){this._canProcess()&&this._channel.trigger(new e(Ka,a))},d.prototype._cmdBitrateChange=function(a){this._canProcess()&&this._channel.trigger(new e(Na,a))},d.prototype._cmdTrackError=function(a){this._canProcess()&&this._channel.trigger(new e(La,a))},d.prototype._cmdClockReportingTick=function(a){this._canProcess()&&this._channel.trigger(new e(Oa,a))},d.prototype._onCheckStatusComplete=function(a){if(this._canProcess()){var b=!1;a&&a.data&&a.data[oa]&&(b=a.data[oa]),this._logger.debug(this._logTag,"#_onCheckStatusComplete(trackingDisabled="+b+")"),b&&this._delegate&&this._delegate.onTrackingDisabled()}},d.prototype._cmdIdleTick=function(a){this._canProcess()&&(this._isVideoIdle=!0,this._trigger(aa),this._channel.trigger(new e(za,a)),this._filter.flush(),this._runReportingTimer(!1),this._runFlushFilterTimer(!1),this._runIdleTimer(!1),this._trigger($))},d.prototype._onError=function(a){this._errorInfo=a.data;var b={};b[ha]=Qa,b[ia]=this._errorInfo.getMessage()+"|"+this._errorInfo.getDetails(),this._channel.trigger(new e(Ma,b)),this._runReportingTimer(!1),this._trigger(z,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo)},d.prototype._runIdleTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Wa,b):this._channel.command(Xa,b)},d.prototype._runFlushFilterTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Ua,b):this._channel.command(Va,b)},d.prototype._runReportingTimer=function(a){var b={};b[ga]=!0,a?this._channel.command(Sa,b):this._channel.command(Ta,b)},d.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleAnalyticsError",this._cmdAnalyticsError),this._pluginManager.comply(this,"handleAnalyticsStart",this._cmdAnalyticsStart),this._pluginManager.comply(this,"handleAnalyticsAdStart",this._cmdAnalyticsAdStart),this._pluginManager.comply(this,"handleVideoLoad",this._cmdVideoLoad),this._pluginManager.comply(this,"handleVideoUnload",this._cmdVideoUnload),this._pluginManager.comply(this,"handleBeginReporting",this._cmdBeginReporting),this._pluginManager.comply(this,"handleVideoSessionEnd",this._cmdVideoSessionEnd),this._pluginManager.comply(this,"handleVideoStart",this._cmdVideoStart),this._pluginManager.comply(this,"handleVideoComplete",this._cmdVideoComplete),this._pluginManager.comply(this,"handleVideoSkip",this._cmdVideoSkip),this._pluginManager.comply(this,"handleVideoResume",this._cmdVideoResume),this._pluginManager.comply(this,"handlePlay",this._cmdPlay),this._pluginManager.comply(this,"handlePause",this._cmdPause),this._pluginManager.comply(this,"handleAdBreakStart",this._cmdAdBreakStart),this._pluginManager.comply(this,"handleAdBreakComplete",this._cmdAdBreakComplete),this._pluginManager.comply(this,"handleAdStart",this._cmdAdStart),this._pluginManager.comply(this,"handleAdComplete",this._cmdAdComplete),this._pluginManager.comply(this,"handleAdSkip",this._cmdAdSkip),this._pluginManager.comply(this,"handleBufferStart",this._cmdBufferStart),this._pluginManager.comply(this,"handleBufferComplete",this._cmdBufferComplete),this._pluginManager.comply(this,"handleSeekStart",this._cmdSeekStart),this._pluginManager.comply(this,"handleSeekComplete",this._cmdSeekComplete),this._pluginManager.comply(this,"handleChapterStart",this._cmdChapterStart),this._pluginManager.comply(this,"handleChapterComplete",this._cmdChapterComplete),this._pluginManager.comply(this,"handleChapterSkip",this._cmdChapterSkip),this._pluginManager.comply(this,"handleBitrateChange",this._cmdBitrateChange),this._pluginManager.comply(this,"handleTrackError",this._cmdTrackError),this._pluginManager.comply(this,"handleClockReportingTick",this._cmdClockReportingTick),this._pluginManager.comply(this,"handleIdleTick",this._cmdIdleTick)},d.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new f(t,C),this,"handleVideoLoad",[new h(s,"rsid","rsid"),new h(s,"tracking_server","trackingServer")]),this._pluginManager.registerBehaviour(new f(t,D),this,"handleVideoUnload"),this._pluginManager.registerBehaviour(new f(t,ba),this,"handleBeginReporting"),this._pluginManager.registerBehaviour(new f(t,E),this,"handleVideoSessionEnd",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(t,F),this,"handleVideoStart",[new h(t,"video.id","videoId"),new h(t,"video.name","videoName"),new h(t,"video.length","videoLength"),new h(t,"video.playhead","playhead"),new h(t,"video.playerName","playerName"),new h(t,"video.streamType","streamType"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"rsid","rsid"),new h(s,"tracking_server","trackingServer"),new h(s,"channel","channel"),new h(s,"meta.video.*","metaVideo"),new h(s,"ssl","useSsl"),new h(u,"meta","metaNielsen"),new h(r,"publisher","publisher"),new h(r,"sdk","sdk"),new h(r,"ovp","ovp"),new h(r,"version","version"),new h(r,"api_level","apiLvl")]),this._pluginManager.registerBehaviour(new f(t,H),this,"handleVideoComplete",[new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,I),this,"handleVideoSkip",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,G),this,"handleVideoResume",[new h(t,"video.id","videoId"),new h(t,"video.name","videoName"),new h(t,"video.length","videoLength"),new h(t,"video.playhead","playhead"),new h(t,"video.playerName","playerName"),new h(t,"video.streamType","streamType")]),this._pluginManager.registerBehaviour(new f(t,J),this,"handlePlay",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,K),this,"handlePause",[new h(t,"video.playhead","playhead"),new h(t,"video.playheadStalled","playheadStalled"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,M),this,"handleAdBreakStart",[new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,N),this,"handleAdBreakComplete",[new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,O),this,"handleAdStart",[new h(t,"video.playhead","playhead"),new h(t,"ad.id","adId"),new h(t,"ad.name","adName"),new h(t,"ad.length","adLength"),new h(t,"ad.position","adPosition"),new h(t,"ad.granularTracking","adGranularTracking"),new h(t,"ad.trackingInterval","adTrackingInterval"),new h(t,"pod.name","podName"),new h(t,"pod.playerName","podPlayerName"),new h(t,"pod.position","podPosition"),new h(t,"pod.startTime","podSecond"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"meta.video.*","metaVideo"),new h(s,"meta.ad.*","metaAd"),new h(u,"meta","metaNielsen"),new h(u,"metaAd","metaAdNielsen")]),this._pluginManager.registerBehaviour(new f(t,P),this,"handleAdComplete",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Q),this,"handleAdSkip",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAdBreak","isInAdBreak"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,R),this,"handleBufferStart",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,S),this,"handleBufferComplete",[new h(t,"video.playhead","playhead"),new h(t,"video.playheadStalled","playheadStalled"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,T),this,"handleSeekStart",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(t,U),this,"handleSeekComplete",[new h(t,"video.playhead","playhead"),new h(t,"ad.isInAd","isInAd"),new h(t,"ad.id","adId"),new h(t,"ad.position","adPosition"),new h(t,"pod.playerName","podPlayerName"),new h(t,"pod.position","podPosition"),new h(t,"chapter.isInChapter","isInChapter"),new h(t,"chapter.position","chapterPosition"),new h(t,"chapter.name","chapterName"),new h(t,"chapter.length","chapterLength"),new h(t,"chapter.startTime","chapterOffset"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,V),this,"handleChapterStart",[new h(t,"video.playhead","playhead"),new h(t,"chapter.position","chapterPosition"),new h(t,"chapter.name","chapterName"),new h(t,"chapter.length","chapterLength"),new h(t,"chapter.startTime","chapterOffset"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime"),new h(s,"meta.video.*","metaVideo"),new h(s,"meta.chapter.*","metaChapter"),new h(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new f(t,W),this,"handleChapterComplete",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,X),this,"handleChapterSkip",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Y),this,"handleBitrateChange",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,Z),this,"handleTrackError"),this._pluginManager.registerBehaviour(new f(v,da),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(t,L),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(v,fa),this,"handleIdleTick",[new h(t,"video.playhead","playhead")]),this._pluginManager.registerBehaviour(new f(r,aa),this,"handleClockReportingTick",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(s,z),this,"handleAnalyticsError"),this._pluginManager.registerBehaviour(new f(s,A),this,"handleAnalyticsStart",[new h(s,"vid","vid"),new h(s,"aid","aid"),new h(s,"mid","mid"),new h(s,"customerIDs","customerIDs"),new h(s,"blob","blob"),new h(s,"loc_hint","loc_hint"),new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")]),this._pluginManager.registerBehaviour(new f(s,B),this,"handleAnalyticsAdStart",[new h(t,"video.playhead","playhead"),new h(t,"qos.fps","fps"),new h(t,"qos.droppedFrames","droppedFrames"),new h(t,"qos.bitrate","bitrate"),new h(t,"qos.startupTime","startupTime")])},d.prototype._setupDataResolver=function(){var a={},b=this;a.version=function(){return k.getVersion()},a.api_level=function(){return k.getApiLevel()},a.tracking_server=function(){return b._config?b._config.trackingServer:null},a.publisher=function(){return b._config?b._config.publisher:null},a.quiet_mode=function(){return!!b._config&&b._config.quietMode},a.ovp=function(){return b._config?b._config.ovp:null},a.sdk=function(){return b._config?b._config.sdk:null},a.is_primetime=function(){return!!b._config&&b._config.__isPrimetime},a.psdk_version=function(){return b._config?b._config.__psdkVersion:null},a.session_id=function(){return b._channel.request(w)},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];c=c||{},c[e]=a.hasOwnProperty(e)?a[e].call(this):null}return c}},d.prototype._resumePlaybackIfPossible=function(a){this._errorInfo||this._isPaused||this._isSeeking||this._isBuffering||(this._isVideoIdle?(this._isVideoIdle=!1,this._resumePlaybackFromIdle()):this._channel.trigger(new e(Fa,a)),this._runIdleTimer(!1))},d.prototype._resumePlaybackFromIdle=function(){this._trigger(aa),this._filter.clear(),this._channel.trigger(new e(x)),this._trigger(_),this._runReportingTimer(!0),this._runFlushFilterTimer(!0)};var q="adobe-heartbeat",r=q,s="adobe-analytics",t="player",u="nielsen",v="service.clock",w="session_id",x="reset_session_id",y="heartbeat-channel",z="error",A="aa_start",B="sc_ad_start",C="video_load",D="video_unload",E="video_session_end",F="video_start",G="video_resume",H="video_complete",I="video_skip",J="play",K="pause",L="content_start",M="adbreak_start",N="adbreak_complete",O="ad_start",P="ad_complete",Q="ad_skip",R="buffer_start",S="buffer_complete",T="seek_start",U="seek_complete",V="chapter_start",W="chapter_complete",X="chapter_skip",Y="bitrate_change",Z="track_error",$="video_idle_start",_="video_idle_resume",aa="quantum_close",ba="video_begin_reporting",ca="heartbeat.reporting",da=ca+".tick",ea="heartbeat.idle",fa=ea+".tick",ga="reset",ha="source",ia="error_id",ja="tracking_server",ka="check_status_server",la="publisher",ma="quiet_mode",na="ssl",oa="tracking_disabled",pa="net:check_status_complete",qa="api:aa_start",ra="api:aa_ad_start",sa="api:config",ta="api:video_load",ua="api:video_unload",va="api:video_start",wa="api:video_complete",xa="api:video_skip",ya="api:video_resume",za="api:video_session_end",Aa="api:adbreak_start",Ba="api:adbreak_complete",Ca="api:ad_start",Da="api:ad_complete",Ea="api:ad_skip",Fa="api:play",Ga="api:pause",Ha="api:buffer_start",Ia="api:chapter_start",Ja="api:chapter_complete",Ka="api:chapter_skip",La="api:track_error",Ma="api:track_internal_error",Na="api:bitrate_change",Oa="api:quantum_end",Pa="api:video_begin_reporting",Qa="sourceErrorHeartbeat",Ra="clock:check_status.resume",Sa="clock:reporting.resume",Ta="clock:reporting.pause",Ua="clock:flush_filter.resume",Va="clock:flush_filter.pause",Wa="clock:idle.resume",Xa="clock:idle.pause",Ya="clock:check_status.get_settings";c.AdobeHeartbeatPlugin=d}(a.ADB.core,a.ADB.va,b),a.ADB.va.plugins.ah||(a.ADB.va.plugins.ah=b)}(this);
|
|
66
|
+
|
|
67
|
+
// AdobeAnalyticsPlugin
|
|
68
|
+
!function(a){if(void 0===b)var b={};!function(a,b){"use strict";function c(a,b){this._onFail={fn:a,ctx:b}}var d=a.ErrorInfo;c.prototype.validateFields=function(a,b){if(!a)return this._fail("Data cannot be null");if(b)for(var c=0;c<b.length;c++){var d=b[c];switch(d){case"videoId":if(!a.hasOwnProperty("videoId"))return this._fail("The ID for the main video must be specified.");if("string"!=typeof a.videoId)return this._fail("The ID for the main video must be a String.");if(""===a.videoId)return this._fail("The ID for the main video cannot be an empty string.");break;case"mediaType":if(!a.hasOwnProperty("mediaType"))return this._fail("The media type for the main video must be specified.");if("string"!=typeof a.mediaType)return this._fail("The media type for the main video must be a String.");if(""===a.mediaType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"streamType":if(!a.hasOwnProperty("streamType"))return this._fail("The stream type for the main video must be specified.");if("string"!=typeof a.streamType)return this._fail("The stream type for the main video must be a String.");if(""===a.streamType)return this._fail("The stream type for the main video cannot be an empty string.");break;case"playerName":if(!a.hasOwnProperty("playerName"))return this._fail("The player name for the main video must be specified.");if("string"!=typeof a.playerName)return this._fail("The player name for the main video must be a String.");if(""===a.playerName)return this._fail("The player name for the main video cannot be an empty string.");break;case"videoLength":if(!a.hasOwnProperty("videoLength"))return this._fail("The length of the main video must be specified.");if("number"!=typeof a.videoLength)return this._fail("The length of the main video must be a Number.");if(isNaN(a.videoLength))return this._fail("The length of the main video cannot be NaN.");break;case"podPlayerName":if(!a.hasOwnProperty("podPlayerName"))return this._fail("The player name for the ad-break must be specified.");if("string"!=typeof a.podPlayerName)return this._fail("The player name for the ad-break must be a String.");if(""===a.podPlayerName)return this._fail("The player name for the ad-break cannot be an empty string.");break;case"podPosition":if(!a.hasOwnProperty("podPosition"))return this._fail("Position (index) of the ad-break must be specified.");if("number"!=typeof a.podPosition)return this._fail("Position (index) of the ad-break must be a Number.");if(isNaN(a.podPosition))return this._fail("Position (index) of the ad-break cannot be NaN.");break;case"adId":if(!a.hasOwnProperty("adId"))return this._fail("The ad ID must be specified.");if("string"!=typeof a.adId)return this._fail("The ad ID must be a String.");if(""===a.adId)return this._fail("The ad ID cannot be an empty string.");break;case"adPosition":if(!a.hasOwnProperty("adPosition"))return this._fail("Position (index) of the ad must be specified.");if("number"!=typeof a.adPosition)return this._fail("Position (index) of the ad must be a Number.");if(isNaN(a.adPosition))return this._fail("Position (index) of the ad cannot be NaN.");break;case"adLength":if(!a.hasOwnProperty("adLength"))return this._fail("The length of the ad must be specified.");if("number"!=typeof a.adLength)return this._fail("The length of the ad must be a Number.");if(isNaN(a.adLength))return this._fail("The length of the ad cannot be NaN.");break;default:return this._fail("Unable to validate unknown parameter: "+d)}}return!0},c.prototype._fail=function(a){var b=new d("Invalid input data",a);return this._onFail.fn&&this._onFail.fn.call(this._onFail.ctx,b),!1},b.InputDataValidator=c}(a.ADB.va,b),function(a){"use strict";function b(){this.channel=c,this.debugLogging=!1}var c="";a.AdobeAnalyticsPluginConfig=b}(b),function(a){"use strict";function b(){}b.prototype.onError=function(a){},a.AdobeAnalyticsPluginDelegate=b}(b),function(a,b,c,d){"use strict";function e(a){this._aaPlugin=a}function f(a,b){if(f.__super__.constructor.call(this,s),!a)throw new Error("The reference to the AppMeasurement object cannot be NULL.");if(a.unsupportedBrowser)throw new Error("AppMeasurement is not supported in current browser.");this._appMeasurement=a,this._appMeasurementBridge=new e(this),this._delegate=b,this._videoMetadata={},this._adMetadata={},this._chapterMetadata={},this._errorInfo=null,this._appMeasurementReady=!1,this._beginReporting=!1,this._workQueue=new l(!0,x),this._inputDataValidator=new r(function(a){this._errorInfo=a,this._logger.error(this._logTag,a.getMessage()+" | "+a.getDetails());var b=this;setTimeout(function(){b._trigger(y,a),b._delegate&&b._delegate.onError(b._errorInfo)},0)},this),this._appMeasurement.isReadyToTrack(),this._setupDataResolver()}var g=a.Trigger,h=a.plugin.BasePlugin,i=a.plugin.ParamMapping,j=a.radio.Channel,k=a.radio.Command,l=a.radio.CommandQueue,m=b.ErrorInfo,n=c.md5,o=c.StringUtils,p=c.ObjectUtils,q=d.AdobeAnalyticsPluginConfig,r=d.InputDataValidator;e.prototype.onAppMeasurementReady=function(){this._aaPlugin&&this._aaPlugin._onAppMeasurementReady()},e.prototype.release=function(){this._aaPlugin=null},a.extend(f,h),f.prototype.configure=function(a){if(!a)throw new Error("Reference to the configuration data cannot be NULL.");if(!(a instanceof q))throw new Error("Expected config data to be instance of AdobeAnalyticsPluginConfig.");this._config=a,this._config.debugLogging?this._logger.enable():this._logger.disable(),this._logger.debug(this._logTag,"#configure({trackingServer="+this._config.debugLogging+", channel="+this._config.channel+", ssl="+this._appMeasurement.ssl+"})")},f.prototype.bootstrap=function(a){f.__super__.bootstrap.call(this,a),this._registerCommands(),this._registerBehaviours()},f.prototype.setup=function(){this._appMeasurement.isReadyToTrack()?this._onAppMeasurementReady():this._appMeasurement.callbackWhenReadyToTrack(this._appMeasurementBridge,this._appMeasurementBridge.onAppMeasurementReady,[]),f.__super__.setup.call(this)},f.prototype.setVideoMetadata=function(a){this._videoMetadata=p.clone(a)},f.prototype.setAdMetadata=function(a){this._adMetadata=p.clone(a)},f.prototype.setChapterMetadata=function(a){this._chapterMetadata=p.clone(a)},f.prototype._teardown=function(){this._logger.debug(this._logTag,"#_teardown()"),this._appMeasurementBridge.release()},f.prototype._canProcess=function(){return this._errorInfo?(this._logger.error(this._logTag,"#_canProcess() > In ERROR state."),!1):f.__super__._canProcess.call(this)},f.prototype._cmdVideoLoad=function(a){this._errorInfo=null},f.prototype._cmdBeginReporting=function(a){this._logger.debug(this._logTag,"#_cmdBeginReporting()"),this._beginReporting=!0,this._resumeWorkQueue()},f.prototype._cmdVideoStart=function(a){this._logger.debug(this._logTag,"#_cmdVideoStart()"),this._canProcess()&&this._workQueue.addCommand(new k(this._executeOpen,this,[a]))},f.prototype._cmdAdStart=function(a){this._logger.debug(this._logTag,"#_cmdAdStart()"),this._canProcess()&&this._workQueue.addCommand(new k(this._executeOpenAd,this,[a]))},f.prototype._cmdHeartbeatPluginError=function(a){this._errorInfo||(this._errorInfo=new m("Internal error","HeartbeatPlugin is in ERROR state."),this._trigger(y,this._errorInfo),this._delegate&&this._delegate.onError(this._errorInfo))},f.prototype._track=function(a){try{var b=this._appMeasurement.linkTrackVars;this._appMeasurement.linkTrackVars="",this._appMeasurement.track(a),this._appMeasurement.linkTrackVars=b}catch(a){this._logger.warn(this._logTag,"appMeasurement.track() call threw an exception.")}},f.prototype._executeOpen=function(a){if(this._logger.debug(this._logTag,"#_executeOpen(id="+a.videoId+", videoName="+a.videoName+", mediaType="+a.mediaType+", streamType="+a.streamType+", length="+a.videoLength+", playerName="+a.playerName+", channel="+a.channel+", isPrimetime="+a.isPrimetime+", sessionId="+a.sessionId+")"),this._canProcess()&&this._inputDataValidator.validateFields(a,["videoId","mediaType","streamType","videoLength","playerName"])){var b={};for(var c in a.metaVideo)a.metaVideo.hasOwnProperty(c)&&(b[c]=a.metaVideo[c]);if(a.metaNielsen)for(var c in a.metaNielsen)a.metaNielsen.hasOwnProperty(c)&&(b[c]=a.metaNielsen[c]);b["a.contentType"]=a.streamType,b["a.media.name"]=a.videoId,b["a.media.friendlyName"]=a.videoName||"",b["a.media.length"]=Math.floor(a.videoLength)||"0.0",b["a.media.playerName"]=a.playerName,b["a.media.channel"]=a.channel||"",b["a.media.view"]=!0,b["a.media.vsid"]=a.sessionId;var d={};d.contextData=b,"audio"===a.mediaType?(d.pev3=B,d.ms_a="1"):d.pev3=z,d.pe=a.isPrimetime?E:D,this._track(d);var e=this;setTimeout(function(){e._trigger(H,a)},0)}},f.prototype._executeOpenAd=function(a){var b=n(a.videoId)+"_"+a.podPosition;if(this._logger.debug(this._logTag,"#_executeOpenAd(id="+a.adId+", mediaType="+a.mediaType+", streamType="+a.streamType+", length="+a.adLength+", podPlayerName="+a.podPlayerName+", parentId="+a.videoId+", podId="+b+", parentPodPosition="+a.adPosition+", podSecond="+a.podSecond+")"),this._canProcess()&&this._inputDataValidator.validateFields(a,["videoId","mediaType","streamType","playerName","adId","adLength","podPlayerName","adPosition"])){a.podSecond=null==a.podSecond||isNaN(a.podSecond)?a.playhead:a.podSecond;var c,d={};for(c in a.metaVideo)a.metaVideo.hasOwnProperty(c)&&(d[c]=a.metaVideo[c]);for(c in a.metaAd)a.metaAd.hasOwnProperty(c)&&(d[c]=a.metaAd[c]);if(a.metaNielsen)for(var c in a.metaNielsen)a.metaNielsen.hasOwnProperty(c)&&(d[c]=a.metaNielsen[c]);d["a.contentType"]=a.streamType,d["a.media.name"]=a.videoId,d["a.media.playerName"]=a.playerName,d["a.media.channel"]=a.channel||"",d["a.media.vsid"]=a.sessionId,d["a.media.friendlyName"]=a.videoName||"",d["a.media.length"]=Math.floor(a.videoLength)||"0.0",d["a.media.ad.name"]=a.adId,d["a.media.ad.friendlyName"]=a.adName||"",d["a.media.ad.podFriendlyName"]=a.podName||"",d["a.media.ad.length"]=Math.floor(a.adLength)||"0.0",d["a.media.ad.playerName"]=a.podPlayerName,d["a.media.ad.pod"]=b,d["a.media.ad.podPosition"]=Math.floor(a.adPosition)||"0.0",d["a.media.ad.podSecond"]=Math.floor(a.podSecond)||"0.0",d["a.media.ad.view"]=!0;var e={};e.contextData=d,"audio"===a.mediaType?(e.pev3=C,e.ms_a="1"):e.pev3=A,e.pe=a.isPrimetime?G:F,this._track(e);var f=this;setTimeout(function(){f._trigger(I,a)},0)}},f.prototype._setupDataResolver=function(){var a={},b=this;a.rsid=function(){return b._appMeasurement.account},a.tracking_server=function(){return b._appMeasurement.ssl&&b._appMeasurement.trackingServerSecure?b._appMeasurement.trackingServerSecure:b._appMeasurement.trackingServer},a.ssl=function(){return b._appMeasurement.ssl},a.vid=function(){return b._appMeasurement.visitorID},a.aid=function(){return b._appMeasurement.analyticsVisitorID},a.mid=function(){return b._appMeasurement.marketingCloudVisitorID},a.blob=function(){return b._appMeasurement.audienceManagerBlob},a.loc_hint=function(){return b._appMeasurement.audienceManagerLocationHint?parseInt(b._appMeasurement.audienceManagerLocationHint):""},a.customerIDs=function(){var a={},c=b._appMeasurement.visitor.getCustomerIDs();for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if("object"==typeof e){for(var f in e)e.hasOwnProperty(f)&&("authState"==f?a[d+".as"]=e[f]:a[d+"."+f]=e[f]);a[d+".as"]||(a[d+".as"]="0")}}return a},a.channel=function(){return b._config?b._config.channel:null},a.meta=function(a){var c=a.split(".");if(c.length<2)return null;var d=c.shift();switch(a=c.join("."),d){case"video":return a==j.WILDCARD?b._videoMetadata:b._videoMetadata[a];case"ad":return a==j.WILDCARD?b._adMetadata:b._adMetadata[a];case"chapter":return a==j.WILDCARD?b._chapterMetadata:b._chapterMetadata[a];default:return null}},this._dataResolver=function(b){if(!b||0==b.length)return null;for(var c=null,d=0;d<b.length;d++){var e=b[d];c=c||{},o.startsWith(e,"meta.")?c[e]=a.meta(e.split("meta.")[1]):c[e]=a.hasOwnProperty(e)?a[e].call(this):null}return c}},f.prototype._registerCommands=function(){this._pluginManager.comply(this,"handleVideoLoad",this._cmdVideoLoad),this._pluginManager.comply(this,"handleBeginReporting",this._cmdBeginReporting),this._pluginManager.comply(this,"handleVideoStart",this._cmdVideoStart),this._pluginManager.comply(this,"handleAdStart",this._cmdAdStart),this._pluginManager.comply(this,"handleHeartbeatPluginError",this._cmdHeartbeatPluginError)},f.prototype._registerBehaviours=function(){this._pluginManager.registerBehaviour(new g(v,J),this,"handleVideoLoad"),this._pluginManager.registerBehaviour(new g(v,M),this,"handleBeginReporting"),this._pluginManager.registerBehaviour(new g(v,K),this,"handleVideoStart",[new i(v,"video.id","videoId"),new i(v,"video.mediaType","mediaType"),new i(v,"video.streamType","streamType"),new i(v,"video.name","videoName"),new i(v,"video.length","videoLength"),new i(v,"video.playerName","playerName"),new i(v,"video.streamType","streamType"),new i(w,"is_primetime","isPrimetime"),new i(w,"session_id","sessionId"),new i(t,"channel","channel"),new i(t,"meta.video.*","metaVideo"),new i(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new g(v,L),this,"handleAdStart",[new i(v,"video.id","videoId"),new i(v,"video.mediaType","mediaType"),new i(v,"video.streamType","streamType"),new i(v,"video.playhead","playhead"),new i(v,"video.playerName","playerName"),new i(v,"video.name","videoName"),new i(v,"video.length","videoLength"),new i(v,"ad.id","adId"),new i(v,"ad.length","adLength"),new i(v,"ad.position","adPosition"),new i(v,"ad.name","adName"),new i(v,"pod.name","podName"),new i(v,"pod.position","podPosition"),new i(v,"pod.playerName","podPlayerName"),new i(v,"pod.startTime","podSecond"),new i(w,"is_primetime","isPrimetime"),new i(w,"session_id","sessionId"),new i(t,"channel","channel"),new i(t,"meta.video.*","metaVideo"),new i(t,"meta.ad.*","metaAd"),new i(u,"meta","metaNielsen")]),this._pluginManager.registerBehaviour(new g(w,y),this,"handleHeartbeatPluginError")},f.prototype._onAppMeasurementReady=function(){this._logger.debug(this._logTag,"#_onAppMeasurementReady"),this._appMeasurementReady=!0,this._resumeWorkQueue()},f.prototype._resumeWorkQueue=function(){this._appMeasurementReady&&this._beginReporting&&(this._logger.debug(this._logTag,"#_resumeWorkQueue"),this._workQueue.resume())};var s="adobe-analytics",t=s,u="nielsen",v="player",w="adobe-heartbeat",x=2e3,y="error",z="video",A="videoAd",B="audio",C="audioAd",D="ms_s",E="msp_s",F="msa_s",G="mspa_s",H="aa_start",I="sc_ad_start",J="video_load",K="video_start",L="ad_start",M="video_begin_reporting";d.AdobeAnalyticsPlugin=f}(a.ADB.core,a.ADB.va,a.ADB.va.utils,b),function(a){"use strict";var b={SHOW:"a.media.show",SEASON:"a.media.season",EPISODE:"a.media.episode",ASSET_ID:"a.media.asset",GENRE:"a.media.genre",FIRST_AIR_DATE:"a.media.airDate",FIRST_DIGITAL_DATE:"a.media.digitalDate",RATING:"a.media.rating",ORIGINATOR:"a.media.originator",NETWORK:"a.media.network",SHOW_TYPE:"a.media.type",AD_LOAD:"a.media.adLoad",MVPD:"a.media.pass.mvpd",AUTHORIZED:"a.media.pass.auth",DAY_PART:"a.media.dayPart",FEED:"a.media.feed",STREAM_FORMAT:"a.media.format"},c={ARTIST:"a.media.artist",ALBUM:"a.media.album",LABEL:"a.media.label",AUTHOR:"a.media.author",STATION:"a.media.station",PUBLISHER:"a.media.publisher"},d={ADVERTISER:"a.media.ad.advertiser",CAMPAIGN_ID:"a.media.ad.campaign",CREATIVE_ID:"a.media.ad.creative",PLACEMENT_ID:"a.media.ad.placement",SITE_ID:"a.media.ad.site",CREATIVE_URL:"a.media.ad.creativeURL"};a.VideoMetadataKeys=b,a.AudioMetadataKeys=c,a.AdMetadataKeys=d}(b),a.ADB.va.plugins.aa||(a.ADB.va.plugins.aa=b)}(this);
|
|
69
|
+
|
|
70
|
+
// MediaHeartbeat
|
|
71
|
+
!function(a){!function(a,b){"use strict";function c(){this._processAction=!0,this._store={}}function d(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._rules=[]}c.prototype.setRuleName=function(a){this._ruleName=a},c.prototype.getRuleName=function(a,b){return this._ruleName},c.prototype.setData=function(a,b){this._store[a]=b},c.prototype.getData=function(a){return this._store[a]},c.prototype.shouldProcessAction=function(){return this._processAction},c.prototype.stopProcessingAction=function(){this._processAction=!1},c.prototype.startProcessingAction=function(){this._processAction=!0},d.createContext=function(){return new c},d.createPredicate=function(a,b,c){return{fn:a,expectedValue:b,msg:c}},d.prototype.registerRule=function(a,b,c,d,e){this._rules.push({name:a,desc:b,preconditions:c,actions:d,scope:e})},d.prototype.registerEnterExitAction=function(a,b){this._enterAction=a,this._exitAction=b},d.prototype._handleFailure=function(a,b){this._logger.error(e,a.desc+" - "+b.msg)},d.prototype._getRule=function(a){for(var b=0;b<this._rules.length;++b)if(this._rules[b].name===a)return this._rules[b];return null},d.prototype.processRule=function(a,b){var c=!0,f=this._getRule(a);if(f){var g=f.scope;b||(b=d.createContext()),b.setRuleName(a);for(var h=!1,i=0;i<f.preconditions.length;++i){var j=f.preconditions[i];if(h=!!j.fn.call(g,b)!==j.expectedValue){this._handleFailure(f,j);break}}if(h)c=!1;else{b.startProcessingAction(),this._enterAction&&this._enterAction.call(g,b);for(var i=0;i<f.actions.length;++i){var k=f.actions[i];if(!b.shouldProcessAction()){this._logger.info(e,"Stopping actions for "+f.desc);break}k.call(g,b)}this._exitAction&&b.shouldProcessAction()&&this._exitAction.call(g,b)}}else this._logger.warn(e,"No registered event found for ruleName "+a),c=!1;return c};var e="RuleEngine";b._RuleEngine=d}(a.ADB.core,a.ADB.va),function(a,b){"use strict";function c(a,b,c){this.taskFn=a,this.scope=b,this.interval=c,this.remainingInterval=c}function d(a){if(!a)throw new Error("Reference to the logger object cannot be NULL");this._logger=a,this._tasks=[],this._pausedTasks=[]}c.prototype.elapsedTime=function(a){this.remainingInterval-=a},c.prototype.shouldExecute=function(){return this.remainingInterval<=0},c.prototype.execute=function(){this.taskFn.call(this.scope)},d.prototype._getCurrentTimeInMS=function(){return(new Date).getTime()},d.prototype._runTasksForTime=function(a){var b=[],c=a-this._lastTickTime;this._lastTickTime=a;for(var d=0;d<this._tasks.length;){var e=this._tasks[d];e.elapsedTime(c),e.shouldExecute()?(b.push(e),this._tasks.splice(d,1)):++d}this._checkStopTimer();for(var d=0;d<b.length;++d)b[d].execute()},d.prototype._onTick=function(){var a=this._getCurrentTimeInMS();this._runTasksForTime(a)},d.prototype._startTimer=function(){var a=this;this._timer||(this._logger.info(e,"#startTimer()"),a._lastTickTime=this._getCurrentTimeInMS(),this._timer=window.setInterval(function(){a._onTick()},f))},d.prototype._stopTimer=function(){this._timer&&(this._logger.info(e,"#stopTimer()"),window.clearInterval(this._timer),this._timer=null)},d.prototype._checkStartTimer=function(){this._tasks.length>0&&this._startTimer()},d.prototype._checkStopTimer=function(){0===this._tasks.length&&this._stopTimer()},d.prototype._removeTask=function(a,b){for(var c=0;c<a.length;++c)if(a[c]===b)return a.splice(c,1),!0;return!1},d.prototype.scheduleTask=function(a,b,d){if(this._logger.info(e,"#scheduleTask()"),!a)throw new Error("Reference to the taskFn cannot be NULL");var f=new c(a,b,d);return this._tasks.push(f),this._checkStartTimer(),f},d.prototype.cancelTask=function(a){this._logger.info(e,"#cancelTask()"),this._removeTask(this._tasks,a),this._checkStopTimer()},d.prototype.pauseTask=function(a){this._logger.info(e,"#pauseTask()"),this._removeTask(this._tasks,a)&&this._pausedTasks.push(a),this._checkStopTimer()},d.prototype.resumeTask=function(a){this._logger.info(e,"#resumeTask()"),this._removeTask(this._pausedTasks,a)&&this._tasks.push(a),this._checkStartTimer()},d.prototype.clearTasks=function(){this._stopTimer(),this._tasks=[],this._pausedTasks=[]};var e="TaskScheduler",f=250;b._TaskScheduler=d}(a.ADB.core,a.ADB.va),function(a){"use strict";function b(){this.trackingServer=void 0,this.channel=void 0,this.ovp=void 0,this.appVersion=void 0,this.playerName=void 0,this.ssl=!1,this.debugLogging=!1}a.MediaHeartbeatConfig=b,a.MediaHeartbeatConfig.sharedInstance=new b}(a.ADB.va),function(a){"use strict";function b(){this.data={}}var c=a.plugins.videoplayer.VideoInfo,d=a.plugins.videoplayer.AdBreakInfo,e=a.plugins.videoplayer.AdInfo,f=a.plugins.videoplayer.ChapterInfo,g=a.plugins.videoplayer.QoSInfo;b.MEDIAINFO_KEY_NAME="a.name",b.MEDIAINFO_KEY_VIDEOID="a.videoId",b.MEDIAINFO_KEY_ADID="a.adId",b.MEDIAINFO_KEY_LENGTH="a.length",b.MEDIAINFO_KEY_PLAYHEAD="a.playhead",b.MEDIAINFO_KEY_MEDIATYPE="a.mediaType",b.MEDIAINFO_KEY_STREAMTYPE="a.streamType",b.MEDIAINFO_KEY_POSITION="a.position",b.MEDIAINFO_KEY_STARTTIME="a.startTime",b.MEDIAINFO_KEY_BITRATE="a.bitrate",b.MEDIAINFO_KEY_FPS="a.fps",b.MEDIAINFO_KEY_DROPPEDFRAMES="a.droppedFrames",b.MEDIAINFO_KEY_STARTUPTIME="a.startupTime",b.MEDIAINFO_KEY_TIMEDMETADATA="a.timedMetadata",b.prototype.setValue=function(a,b){this.data[a]=b},b.prototype.getValue=function(a){return this.data.hasOwnProperty(a)?this.data[a]:null},b.prototype.createVideoInfo=function(){var a=new c;return a.id=null!=this.getValue(b.MEDIAINFO_KEY_VIDEOID)?this.getValue(b.MEDIAINFO_KEY_VIDEOID):"",a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.playhead=null!=this.getValue(b.MEDIAINFO_KEY_PLAYHEAD)?this.getValue(b.MEDIAINFO_KEY_PLAYHEAD):0,a.mediaType=null!=this.getValue(b.MEDIAINFO_KEY_MEDIATYPE)?this.getValue(b.MEDIAINFO_KEY_MEDIATYPE):"",a.streamType=null!=this.getValue(b.MEDIAINFO_KEY_STREAMTYPE)?this.getValue(b.MEDIAINFO_KEY_STREAMTYPE):"",a},b.prototype.createAdBreakInfo=function(){var a=new d;return a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a.startTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTTIME)?this.getValue(b.MEDIAINFO_KEY_STARTTIME):0,a},b.prototype.createAdInfo=function(){var a=new e;return a.id=null!=this.getValue(b.MEDIAINFO_KEY_ADID)?this.getValue(b.MEDIAINFO_KEY_ADID):"",a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a},b.prototype.createChapterInfo=function(){var a=new f;return a.name=null!=this.getValue(b.MEDIAINFO_KEY_NAME)?this.getValue(b.MEDIAINFO_KEY_NAME):"",a.length=null!=this.getValue(b.MEDIAINFO_KEY_LENGTH)?this.getValue(b.MEDIAINFO_KEY_LENGTH):0,a.startTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTTIME)?this.getValue(b.MEDIAINFO_KEY_STARTTIME):0,a.position=null!=this.getValue(b.MEDIAINFO_KEY_POSITION)?this.getValue(b.MEDIAINFO_KEY_POSITION):0,a},b.prototype.createQoSInfo=function(){var a=new g;return a.bitrate=null!=this.getValue(b.MEDIAINFO_KEY_BITRATE)?this.getValue(b.MEDIAINFO_KEY_BITRATE):0,a.fps=null!=this.getValue(b.MEDIAINFO_KEY_FPS)?this.getValue(b.MEDIAINFO_KEY_FPS):0,a.droppedFrames=null!=this.getValue(b.MEDIAINFO_KEY_DROPPEDFRAMES)?this.getValue(b.MEDIAINFO_KEY_DROPPEDFRAMES):0,a.startupTime=null!=this.getValue(b.MEDIAINFO_KEY_STARTUPTIME)?this.getValue(b.MEDIAINFO_KEY_STARTUPTIME):0,a},b.prototype.isEqual=function(a){if(this===a)return!0;if(!a||"object"!=typeof a||"function"!=typeof a.getValue)return!1;for(var c=[b.MEDIAINFO_KEY_NAME,b.MEDIAINFO_KEY_VIDEOID,b.MEDIAINFO_KEY_ADID,b.MEDIAINFO_KEY_LENGTH,b.MEDIAINFO_KEY_PLAYHEAD,b.MEDIAINFO_KEY_STREAMTYPE,b.MEDIAINFO_KEY_MEDIATYPE,b.MEDIAINFO_KEY_POSITION,b.MEDIAINFO_KEY_STARTTIME,b.MEDIAINFO_KEY_BITRATE,b.MEDIAINFO_KEY_FPS,b.MEDIAINFO_KEY_DROPPEDFRAMES,b.MEDIAINFO_KEY_STARTUPTIME,b.MEDIAINFO_KEY_TIMEDMETADATA],d=0;d<c.length;++d){var e=c[d];if(this.getValue(e)!==a.getValue(e))return!1}return!0},a.MediaObject=b}(a.ADB.va),function(a){"use strict";function b(a,c){if(!c)throw new Error("Visitor instance cannot be NULL");this._visitor=c,this._logger=a,this._status=b.OPT_UNKNOWN,this._optInFetchPermissionsCallback=this._optInFetchPermissionsCallback.bind(this)}var c="PrivacyManager";b.prototype.getStatus=function(){return this._status},b.prototype.configure=function(a){this.reset(),this._callback=a,this._optIn=window.adobe&&window.adobe.optIn?window.adobe.optIn:void 0,this._optIn&&this._optIn.doesOptInApply?(this._logger.info(c,"OptIn service enabled"),this._waitingForOptInCallback=!0,this._optInMediaApproved=!1):this._logger.info(c,"OptIn service does not apply"),this._waitingForVisitorCallback=!0,this._visitorOptOut=!1,this._fetchVisitorOptOut(),this._fetchOptIn(),this._updateStatus()},b.prototype.reset=function(){this._unsubscribeOptIn(),this._status=b.OPT_UNKNOWN,this._callback=null},b.prototype._fetchVisitorOptOut=function(){this._logger.info(c,"Fetching Visitor.isOptedOut");try{var a=this;this._visitor.isOptedOut(function(b){a._logger.info(c,"Visitor.isOptedOut : "+b),a._waitingForVisitorCallback=!1,a._visitorOptOut=b,a._updateStatus()},void 0,!0)}catch(a){this._logger.warn(c,"Error fetching Visitor.isOptedOut"),this._waitingForVisitorCallback=!1}},b.prototype._fetchOptIn=function(){try{if(!this._optIn||!this._optIn.doesOptInApply)return;this._logger.info(c,"Fetching permissions from OptIn service"),this._optInListenerRegistered||(this._optIn.fetchPermissions(this._optInFetchPermissionsCallback,!0),this._optInListenerRegistered=!0)}catch(a){this._logger.warn(c,"Error fetching permissions from OptIn service"),this._waitingForOptInCallback=!1}},b.prototype._unsubscribeOptIn=function(){try{this._optIn&&this._optInListenerRegistered&&(this._optIn.off("complete",this._optInFetchPermissionsCallback),this._optInListenerRegistered=!1)}catch(a){this._logger.error(c,"Error unsubscribing from OptIn service")}},b.prototype._optInFetchPermissionsCallback=function(){this._waitingForOptInCallback=!1;var a=this._optIn.isApproved(this._optIn.Categories.ECID),b=this._optIn.isApproved(this._optIn.Categories.ANALYTICS),d=void 0===this._optIn.Categories.MEDIA_ANALYTICS||this._optIn.isApproved(this._optIn.Categories.MEDIA_ANALYTICS);this._optInMediaApproved=a&&b&&d,this._logger.info(c,"OptIn fetchPermissions ECID : "+a+" Analytics : "+b+" Media : "+d),this._updateStatus()},b.prototype._updateStatus=function(){if(!(this._waitingForVisitorCallback||this._optIn&&this._optIn.doesOptInApply&&this._waitingForOptInCallback)){var a=this._visitorOptOut||this._optIn&&this._optIn.doesOptInApply&&!this._optInMediaApproved,d=a?b.OPT_OUT:b.OPT_IN;if(this._status!==d){this._logger.info(c,"Privacy changed from "+this._status+" to "+d),this._status=d;var e=this;setTimeout(function(){try{e._callback&&e._callback(d)}catch(a){}},0)}}},b.OPT_OUT="optout",b.OPT_IN="optin",b.OPT_UNKNOWN="optunknown",a._PrivacyManager=b}(a.ADB.va),function(a,b){"use strict";function c(a){c.__super__.constructor.call(this),this._heartbeat=a}function d(a){d.__super__.constructor.call(this),this._heartbeat=a}function e(a){e.__super__.constructor.call(this),this._heartbeat=a}function f(a){f.__super__.constructor.call(this),this._heartbeat=a}a.extend(c,b.plugins.aa.AdobeAnalyticsPluginDelegate),c.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},a.extend(d,b.plugins.ah.AdobeHeartbeatPluginDelegate),d.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},d.prototype.onTrackingDisabled=function(){this._heartbeat&&this._heartbeat._onDelegateTrackingDisabled()},a.extend(e,b.HeartbeatDelegate),e.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},a.extend(f,b.plugins.videoplayer.VideoPlayerPluginDelegate),f.prototype.getVideoInfo=function(){return this._heartbeat&&this._heartbeat._videoInfo?(this._heartbeat._delegate&&(this._heartbeat._videoInfo.playhead=this._heartbeat._delegate.getCurrentPlaybackTime()),this._heartbeat._videoInfo):null},f.prototype.getAdBreakInfo=function(){return this._heartbeat&&this._heartbeat._adBreakInfo?this._heartbeat._adBreakInfo:null},f.prototype.getAdInfo=function(){return this._heartbeat&&this._heartbeat._adInfo?this._heartbeat._adInfo:null},f.prototype.getChapterInfo=function(){return this._heartbeat&&this._heartbeat._chapterInfo?this._heartbeat._chapterInfo:null},f.prototype.getQoSInfo=function(){if(this._heartbeat&&this._heartbeat._delegate&&this._heartbeat._delegate.getQoSObject()){var a=this._heartbeat._delegate.getQoSObject();if(a&&"object"==typeof a&&a.setValue)return a.createQoSInfo()}return null},b._MediaAnalyticsPluginDelegate=c,b._MediaHeartbeatPluginDelegate=d,b._ADBMediaHeartbeatDelegate=e,b._MediaHeartbeatVideoPlayerPluginDelegate=f}(a.ADB.core,a.ADB.va),function(a,b){"use strict";function c(a,d){c.__super__.constructor.call(this),this._heartbeat=a,this._logger=d,this._validator=new b.plugins.nielsen.MetadataValidator(d)}var d="MediaHeartbeatNielsenPluginDelegate",e={NielsenContentMetadata:"media_nielsen_content_metadata",NielsenChannelMetadata:"media_nielsen_channel_metadata",NielsenAdMetadata:"media_nielsen_ad_metadata"};b.plugins.nielsen&&a.extend(c,b.plugins.nielsen.NielsenPluginDelegate),c.prototype.getMetadataInfo=function(){if(this._heartbeat&&this._heartbeat._currentMediaObject){var a=this._heartbeat._currentMediaObject.getValue(e.NielsenContentMetadata);if(a&&"object"==typeof a)return this._validator.validateContentMetadata(a,"MediaHeartbeat.NielsenContentMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenContentMetadata in MediaObject")}return null},c.prototype.getAdMetadataInfo=function(){if(this._heartbeat&&this._heartbeat._currentAdObject){var a=this._heartbeat._currentAdObject.getValue(e.NielsenAdMetadata);if(a&&"object"==typeof a)return this._validator.validateAdMetadata(a,"MediaHeartbeat.NielsenAdMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenAdMetadata in MediaObject")}return null},c.prototype.getChannelInfo=function(){if(this._heartbeat&&this._heartbeat._currentMediaObject){var a=this._heartbeat._currentMediaObject.getValue(e.NielsenChannelMetadata);if(a&&"object"==typeof a)return this._validator.validateChannelMetadata(a,"MediaHeartbeat.NielsenChannelMetadataKeys"),a;this._logger.warn(d,"We expect a valid object for MediaHeartbeat.MediaObjectKey.NielsenChannelMetadata in MediaObject")}return null},c.prototype.onError=function(a){this._heartbeat&&this._heartbeat._onDelegateError(a)},b.plugins.nielsen&&(b._NielsenObjectKey=e,b._NielsenPluginDelegate=c)}(a.ADB.core,a.ADB.va),function(b,c){"use strict";function d(){}function e(b,d,e){if(this._appMeasurement=e||a.s,!this._appMeasurement)throw new Error("MediaHeartbeat needs a valid AppMeasurement instance.");if(!this._appMeasurement.visitor||!this._appMeasurement.visitor.marketingCloudOrgID)throw new Error("MediaHeartbeat needs a valid visitor instance with marketingCloudOrgId set.");if(!b)throw new Error("MediaHeartbeat needs a valid delegate object.");if(!d||"object"!=typeof d||!d.trackingServer)throw new Error("MediaHeartbeat needs a valid config object with trackingServer set.");this._config=d,this._delegate=b,this._debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._logger=new f,this._debugLogging?this._logger.enable():this._logger.disable(),this._ruleEngine=new t(this._logger),this._taskScheduler=new u(this._logger),this._privacyManager=new v(this._logger,this._appMeasurement.visitor),this._resetState(),this._setupRules()}var f=b.Logger,g=c.MediaObject,h=c.Heartbeat,i=c.HeartbeatConfig,j=c._ADBMediaHeartbeatDelegate,k=c.plugins.videoplayer.VideoPlayerPlugin,l=c.plugins.videoplayer.VideoPlayerPluginConfig,m=c._MediaHeartbeatVideoPlayerPluginDelegate,n=c.plugins.aa.AdobeAnalyticsPlugin,o=c.plugins.aa.AdobeAnalyticsPluginConfig,p=c._MediaAnalyticsPluginDelegate,q=c.plugins.ah.AdobeHeartbeatPlugin,r=c.plugins.ah.AdobeHeartbeatPluginConfig,s=c._MediaHeartbeatPluginDelegate,t=c._RuleEngine,u=c._TaskScheduler,v=c._PrivacyManager,w=c.utils.ObjectUtils,x=c.utils.VersionUtils;if(d.prototype.getCurrentPlaybackTime=function(){return null},d.prototype.getQoSObject=function(){return null},e.MediaType={Video:"video",Audio:"audio"},e.Event={AdBreakStart:"adBreakStart",AdBreakComplete:"adBreakComplete",AdStart:"adStart",AdComplete:"adComplete",AdSkip:"adSkip",ChapterStart:"chapterStart",ChapterComplete:"chapterComplete",ChapterSkip:"chapterSkip",SeekStart:"seekStart",SeekComplete:"seekComplete",BufferStart:"bufferStart",BufferComplete:"bufferComplete",BitrateChange:"bitrateChange",TimedMetadataUpdate:"timedMetadataUpdate"},e.StreamType={VOD:"vod",LIVE:"live",LINEAR:"linear",PODCAST:"podcast",AUDIOBOOK:"audiobook",AOD:"aod"},e.MediaObjectKey={StandardVideoMetadata:"media_standard_content_metadata",StandardMediaMetadata:"media_standard_content_metadata",StandardAdMetadata:"media_standard_ad_metadata",VideoResumed:"resumed",MediaResumed:"resumed",PrerollTrackingWaitingTime:"preroll_tracking_waiting_time"},e.VideoMetadataKeys=c.plugins.aa.VideoMetadataKeys,e.AudioMetadataKeys=c.plugins.aa.AudioMetadataKeys,e.AdMetadataKeys=c.plugins.aa.AdMetadataKeys,e.createMediaObject=function(a,b,c,d,f){var h=new g;h.setValue(g.MEDIAINFO_KEY_VIDEOID,b),h.setValue(g.MEDIAINFO_KEY_NAME,a),h.setValue(g.MEDIAINFO_KEY_LENGTH,c),h.setValue(g.MEDIAINFO_KEY_PLAYHEAD,0);var i=d||e.StreamType.VOD;return h.setValue(g.MEDIAINFO_KEY_STREAMTYPE,i),("string"!=typeof f||f!=e.MediaType.Video&&f!=e.MediaType.Audio)&&(f=e.MediaType.Video),h.setValue(g.MEDIAINFO_KEY_MEDIATYPE,f),h},e.createAdBreakObject=function(a,b,c){var d=new g;return d.setValue(g.MEDIAINFO_KEY_NAME,a),d.setValue(g.MEDIAINFO_KEY_POSITION,b),d.setValue(g.MEDIAINFO_KEY_STARTTIME,c),d},e.createAdObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_NAME,a),e.setValue(g.MEDIAINFO_KEY_ADID,b),e.setValue(g.MEDIAINFO_KEY_POSITION,c),e.setValue(g.MEDIAINFO_KEY_LENGTH,d),e},e.createChapterObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_NAME,a),e.setValue(g.MEDIAINFO_KEY_POSITION,b),e.setValue(g.MEDIAINFO_KEY_LENGTH,c),e.setValue(g.MEDIAINFO_KEY_STARTTIME,d),e},e.createQoSObject=function(a,b,c,d){var e=new g;return e.setValue(g.MEDIAINFO_KEY_BITRATE,a),e.setValue(g.MEDIAINFO_KEY_FPS,c),e.setValue(g.MEDIAINFO_KEY_DROPPEDFRAMES,d),e.setValue(g.MEDIAINFO_KEY_STARTUPTIME,b),e},e.createTimedMetadataObject=function(a){var b=new g;return b.setValue(g.MEDIAINFO_KEY_TIMEDMETADATA,a),b},e.version=function(){return c.Version.getVersion()},e.prototype.trackSessionStart=function(a,b){this._logger.info(D,"#::trackSessionStart()");var c=t.createContext();c.setData(E,a),c.setData(J,this._cleanContextData(b)),this._processRule(B.SessionStart,c)},e.prototype.trackPlay=function(){this._logger.info(D,"#::trackPlay()"),this._processRule(B.Play)},e.prototype.trackPause=function(){this._logger.info(D,"#::trackPause()"),this._processRule(B.Pause)},e.prototype.trackComplete=function(){this._logger.info(D,"#::trackComplete()"),this._processRule(B.VideoComplete)},e.prototype.trackSessionEnd=function(){this._logger.info(D,"#::trackSessionEnd()"),this._processRule(B.SessionEnd)},e.prototype.trackError=function(a){this._logger.info(D,"#::trackError()");var b=t.createContext();b.setData(K,a),this._processRule(B.Error,b)},e.prototype.trackEvent=function(a,b,c){this._logger.info(D,"#::trackEvent() - "+a);var d,f=t.createContext();switch(a){case e.Event.AdBreakStart:f.setData(F,b),f.setData(J,this._cleanContextData(c)),d=B.AdBreakStart;break;case e.Event.AdBreakComplete:d=B.AdBreakComplete;break;case e.Event.AdStart:f.setData(G,b),f.setData(J,this._cleanContextData(c)),d=B.AdStart;break;case e.Event.AdComplete:d=B.AdComplete;break;case e.Event.AdSkip:d=B.AdSkip;break;case e.Event.SeekStart:d=B.SeekStart;break;case e.Event.SeekComplete:d=B.SeekComplete;break;case e.Event.ChapterStart:f.setData(H,b),f.setData(J,this._cleanContextData(c)),d=B.ChapterStart;break;case e.Event.ChapterComplete:d=B.ChapterComplete;break;case e.Event.ChapterSkip:d=B.ChapterSkip;break;case e.Event.BufferStart:d=B.BufferStart;break;case e.Event.BufferComplete:d=B.BufferComplete;break;case e.Event.BitrateChange:d=B.BitrateChange;break;case e.Event.TimedMetadataUpdate:d=B.TimedMetadataUpdate,f.setData(I,b);break;default:return void this._logger.error(D,"Incorrect event name.")}this._processRule(d,f)},c.plugins.nielsen){var y=c.MediaHeartbeatConfig;y.prototype.nielsenConfigKey=void 0,y.prototype.nielsenAppInfo=void 0;var z=c._NielsenObjectKey;e.MediaObjectKey.NielsenContentMetadata=z.NielsenContentMetadata,e.MediaObjectKey.NielsenAdMetadata=z.NielsenAdMetadata,e.MediaObjectKey.NielsenChannelMetadata=z.NielsenChannelMetadata,e.NielsenContentMetadataKeys=c.plugins.nielsen.ContentMetadataKeys,e.NielsenChannelMetadataKeys=c.plugins.nielsen.ChannelMetadataKeys,e.NielsenAdMetadataKeys=c.plugins.nielsen.AdMetadataKeys,e.prototype.nielsenLoadMetadata=function(a){this._nielsenPlugin&&this._nielsenPlugin.loadMetadata(a)}}e.prototype._setState=function(a,b){this._mediaState[a]=b},e.prototype._isInState=function(a){return this._mediaState[a]},e.prototype._isTrackingDisabled=function(a){return this._mediaHeartbeatDisabled},e.prototype._isInSession=function(a){return this._isInState(A.Session)},e.prototype._isInMedia=function(a){return this._isInState(A.Media)},e.prototype._isInAd=function(a){return this._isInState(A.Ad)},e.prototype._isInAdBreak=function(a){return this._isInState(A.AdBreak)},e.prototype._isInChapter=function(a){return this._isInState(A.Chapter)},e.prototype._isInPlay=function(a){return this._isInState(A.PlayPause)},e.prototype._isInPause=function(a){return!this._isInState(A.PlayPause)},e.prototype._isInBuffer=function(a){return this._isInState(A.Buffer)},e.prototype._isInSeek=function(a){return this._isInState(A.Seek)},e.prototype._isPlatformTrackingSupported=function(a){return!this._appMeasurement.unsupportedBrowser},e.prototype._isAudioTrackingSupported=function(a){return a.getData(E).getValue(g.MEDIAINFO_KEY_MEDIATYPE)!==e.MediaType.Audio||x.isGreaterThanEqual(this._appMeasurement.version,"2.11.0")},e.prototype._isValidMediaObject=function(a){var b=a.getData(E);if(b&&b instanceof g){var c=b.getValue(e.MediaObjectKey.MediaResumed);null!=c&&"boolean"!=typeof c&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.MediaResumed in MediaObject as we expect a boolean value");var d=b.getValue(e.MediaObjectKey.PrerollTrackingWaitingTime);if(null!=d){("string"==typeof d||"number"==typeof d)&&!isNaN(d)||this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.PrerollTrackingWaitingTime in MediaObject as we expect a valid duration as number in milliseconds.")}var f=b.getValue(e.MediaObjectKey.StandardMediaMetadata);return null!=f&&"object"!=typeof f&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.StandardMediaMetadata in MediaObject as we expect a valid object with kv pairs."),!0}return!1},e.prototype._isValidAdBreakObject=function(a){var b=a.getData(F);return b&&b instanceof g},e.prototype._isDifferentAdBreakObject=function(a){var b=a.getData(F);return!(this._currentAdBreakObject&&this._currentAdBreakObject.isEqual(b))},e.prototype._isValidAdObject=function(a){var b=a.getData(G);if(b&&b instanceof g){var c=b.getValue(N);null!=c&&"boolean"!=typeof c&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.GranularAdTracking in AdObject as we expect a boolean value.");var d=b.getValue(e.MediaObjectKey.StandardAdMetadata);return null!=d&&"object"!=typeof d&&this._logger.warn(D,"Ignoring value set for MediaHeartbeat.MediaObjectKey.StandardAdMetadata in AdObject as we expect a valid object with kv pairs."),!0}return!1},e.prototype._isDifferentAdObject=function(a){var b=a.getData(G);return!(this._currentAdObject&&this._currentAdObject.isEqual(b))},e.prototype._isValidChapterObject=function(a){var b=a.getData(H);return b&&b instanceof g},e.prototype._isDifferentChapterObject=function(a){var b=a.getData(H);return!(this._currentChapterObject&&this._currentChapterObject.isEqual(b))},e.prototype._isValidTimedMetadataObject=function(a){var b=a.getData(I);if(b&&b instanceof g){var c=b.getValue(g.MEDIAINFO_KEY_TIMEDMETADATA);return c&&"string"==typeof c}return!1},e.prototype._shouldAllowPlayerStateChange=function(a){return!(this._isInState(A.AdBreak)&&!this._isInState(A.Ad))},e.prototype._didBeginReporting=function(a){return this._isInState(A.Reporting)},e.prototype._deferredTrackPlay=function(){this._prerollWaitEnabled&&(this._logger.info(D,"Executing deferred API:trackPlay."),this._prerollWaitEnabled=!1,this._playTaskHandle=null,this._processRule(B.Play))},e.prototype._cmdEnterAction=function(a){var b=a.getRuleName();if(this._prerollWaitEnabled)if(this._playReceived)switch(b){case B.SeekStart:case B.BufferStart:this._logger.info(D,"Cancelling scheduled API:trackPlay because of SeekStart/BufferStart event"),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null;break;case B.SeekComplete:case B.BufferComplete:this._logger.info(D,"Rescheduled API:trackPlay after SeekComplete/BufferComplete event"),this._playTaskHandle=this._taskScheduler.scheduleTask(this._deferredTrackPlay,this,this._prerollWaitTime);break;case B.Play:this._logger.info(D,"Dropping API:trackPlay as we already have a API:trackPlay scheduled."),a.stopProcessingAction();break;case B.Pause:this._logger.info(D,"Cancelling scheduled API:trackPlay because of API:trackPause call."),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null,this._prerollWaitEnabled=!1;break;case B.AdBreakStart:this._logger.info(D,"Received API:trackEvent(AdBreakStart) within "+this._prerollWaitTime+" ms after API:trackPlay. We will track this as preroll AdBreak."),this._taskScheduler.cancelTask(this._playTaskHandle),this._playTaskHandle=null,this._prerollWaitEnabled=!1,this._playAfterAdStart=!0}else switch(b){case B.Play:this._logger.info(D,"Deferring API:trackPlay for "+this._prerollWaitTime+" ms."),this._playReceived=!0,this._playUnhandledFromPrerollWaitTime=!0,this._playTaskHandle=this._taskScheduler.scheduleTask(this._deferredTrackPlay,this,this._prerollWaitTime),a.stopProcessingAction();break;case B.Pause:this._logger.info(D,"Received trackPause before first trackPlay."),this._prerollWaitEnabled=!1;break;case B.AdBreakStart:this._logger.info(D,"Received trackEvent(AdBreakStart) before first trackPlay."),this._prerollWaitEnabled=!1}},e.prototype._cmdExitAction=function(a){var b=a.getRuleName();this._playAfterAdStart&&(b===B.AdStart?(this._cmdPlay(a),this._playAfterAdStart=!1):b===B.AdBreakComplete&&(this._playAfterAdStart=!1)),b!==B.AdStart||this._isInState(A.FPlayPause)||this._cmdPlay(a),this._prerollWaitEnabled||!this._playUnhandledFromPrerollWaitTime||b!==B.BufferComplete&&b!==B.SeekComplete&&b!==B.AdBreakComplete||this._isInState(A.FPlayPause)||this._isInState(A.Buffer)||this._isInState(A.Seek)||(this._logger.info(D,"Executing pending API:trackPlay. This case most likely happens tracking Preroll AdBreak without any Ads."),this._cmdPlay(a))},e.prototype._cmdConfigure=function(a){this._configureAdobeAnalyticsPlugin(),this._configureAdobeHearbeatPlugin(),this._configureVideoPlayerPlugin(),this._configureOtherPlugins(),this._configureHeartbeat(),this._privacyManager.configure(this._onPrivacyChange.bind(this))},e.prototype._cmdBeginReporting=function(a){this._playerPlugin&&this._playerPlugin.beginReporting(),this._setState(A.Reporting,!0)},e.prototype._cmdSessionStart=function(a){var b=a.getData(E),c=a.getData(J);this._currentMediaObject=b,this._videoInfo=b.createVideoInfo(),this._videoInfo.playerName=this._config.playerName?this._config.playerName:"";var d=b.getValue(e.MediaObjectKey.StandardMediaMetadata);d&&"object"==typeof d||(d=null);var f=b.getValue(e.MediaObjectKey.MediaResumed);"boolean"==typeof f&&(this._videoInfo.resumed=f);var g=b.getValue(e.MediaObjectKey.PrerollTrackingWaitingTime);"string"!=typeof g&&"number"!=typeof g||isNaN(g)||(this._prerollWaitTime=Number(g),this._prerollWaitTime<=0&&(this._prerollWaitEnabled=!1));var h=this._prepareMetadata(d,c);h[L]=this._videoInfo.mediaType,this._aaPlugin.setVideoMetadata(h),this._playerPlugin.trackVideoLoad(),this._playerPlugin.trackSessionStart(),this._setState(A.Session,!0),this._setState(A.Media,!0)},e.prototype._destroyHeartbeat=function(a,b){a&&a.trackVideoUnload(),b&&b.destroy()},e.prototype._cmdVideoEnd=function(a){var b=a.getRuleName()===B.VideoComplete;if(this._isInState(A.Reporting)){var c=this,d=this._heartbeat,e=this._playerPlugin;this._playerPlugin.trackComplete(function(){c._destroyHeartbeat(e,d)},b)}else this._destroyHeartbeat(this._playerPlugin,this._heartbeat);this._setState(A.Media,!1)},e.prototype._cmdHandleMediaComplete=function(a){this._isInMedia(a)||(this._logger.info(D,"API:trackComplete has already cleaned up Heartbeat instance."),this._cmdSessionEnd(a),a.stopProcessingAction())},e.prototype._cmdSessionEnd=function(a){this._setState(A.Session,!1),this._resetState()},e.prototype._cmdDisableTracking=function(a){this._logger.info(D,"#_cmdDisableTracking: ADBMediaHeartbeat Tracking Disabled Remotely."),this._mediaHeartbeatDisabled=!0},e.prototype._cmdBufferStart=function(a){this._playerPlugin.trackBufferStart(),this._setState(A.Buffer,!0)},e.prototype._cmdBufferComplete=function(a){this._isInState(A.Buffer)&&this._playerPlugin.trackBufferComplete(),this._setState(A.Buffer,!1)},e.prototype._cmdSeekStart=function(a){this._playerPlugin.trackSeekStart(),this._setState(A.Seek,!0)},e.prototype._cmdSeekComplete=function(a){this._isInState(A.Seek)&&this._playerPlugin.trackSeekComplete(),this._setState(A.Seek,!1)},e.prototype._cmdPlay=function(a){this._playerPlugin.trackPlay(),this._setState(A.PlayPause,!0),this._setState(A.FPlayPause,!0),this._playUnhandledFromPrerollWaitTime=!1},e.prototype._cmdPause=function(a){this._playerPlugin.trackPause(),this._setState(A.PlayPause,!1),this._setState(A.FPlayPause,!0)},e.prototype._cmdAdBreakStart=function(a){var b=a.getData(F);this._currentAdBreakObject=b,this._adBreakInfo=b.createAdBreakInfo(),this._adBreakInfo.playerName=this._config.playerName?this._config.playerName:"",this._playerPlugin.trackAdBreakStart(),this._setState(A.AdBreak,!0)},e.prototype._cmdAdBreakComplete=function(a){this._currentAdBreakObject=null,this._adBreakInfo=null,this._isInState(A.AdBreak)&&this._playerPlugin.trackAdBreakComplete(),this._setState(A.AdBreak,!1)},e.prototype._cmdAdStart=function(a){var b=a.getData(G),c=a.getData(J);this._currentAdObject=b,this._adInfo=b.createAdInfo();var d=b.getValue(N);"boolean"==typeof d&&(this._adInfo.granularTracking=d);var f=b.getValue(e.MediaObjectKey.StandardAdMetadata);f&&"object"==typeof f||(f=null);var g=this._prepareMetadata(f,c);this._aaPlugin.setAdMetadata(g),this._playerPlugin.trackAdStart(),this._setState(A.Ad,!0)},e.prototype._cmdAdComplete=function(a){this._currentAdObject=null,this._adInfo=null,this._isInState(A.Ad)&&this._playerPlugin.trackAdComplete(),this._setState(A.Ad,!1)},e.prototype._cmdAdSkip=function(a){this._currentAdObject=null,this._adInfo=null,this._isInState(A.Ad)&&this._playerPlugin.trackAdSkip(),this._setState(A.Ad,!1)},e.prototype._cmdChapterStart=function(a){var b=a.getData(H),c=a.getData(J);this._currentChapterObject=b,this._chapterInfo=b.createChapterInfo();var d=this._prepareMetadata(null,c);this._aaPlugin.setChapterMetadata(d),this._playerPlugin.trackChapterStart(),this._setState(A.Chapter,!0)},e.prototype._cmdChapterComplete=function(a){this._currentChapterObject=null,this._chapterInfo=null,this._isInState(A.Chapter)&&this._playerPlugin.trackChapterComplete(),this._setState(A.Chapter,!1)},e.prototype._cmdChapterSkip=function(a){this._currentChapterObject=null,this._chapterInfo=null,this._isInState(A.Chapter)&&this._playerPlugin.trackChapterSkip(),this._setState(A.Chapter,!1)},e.prototype._cmdError=function(a){var b=a.getData(K);b||(b="unknown_error_id"),this._playerPlugin.trackVideoPlayerError(b)},e.prototype._cmdBitrate=function(a){this._playerPlugin.trackBitrateChange()},e.prototype._cmdTimedMetadataUpdate=function(a){var b=a.getData(I),c=b.getValue(g.MEDIAINFO_KEY_TIMEDMETADATA);this._playerPlugin.trackTimedMetadata(c)},e.prototype._processRule=function(a,b){return this._ruleEngine.processRule(a,b)},e.prototype._setupRules=function(){this._ruleEngine.registerEnterExitAction(this._cmdEnterAction,this._cmdExitAction),this._ruleEngine.registerRule(B.SessionStart,"API:trackSessionStart",[t.createPredicate(this._isPlatformTrackingSupported,!0,C.ErrUnSupportedPlatform),t.createPredicate(this._isTrackingDisabled,!1,C.ErrTrackingDisabled),t.createPredicate(this._isInSession,!1,C.ErrInSession),t.createPredicate(this._isValidMediaObject,!0,C.ErrInvalidMediaObject),t.createPredicate(this._isAudioTrackingSupported,!0,C.ErrAudioTrackingNotSupported)],[this._cmdConfigure,this._cmdSessionStart],this),this._ruleEngine.registerRule(B.SessionEnd,"API:trackSessionEnd",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession)],[this._cmdHandleMediaComplete,this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdChapterSkip,this._cmdVideoEnd,this._cmdSessionEnd],this),this._ruleEngine.registerRule(B.VideoComplete,"API:trackComplete",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdChapterSkip,this._cmdVideoEnd],this),this._ruleEngine.registerRule(B.Error,"API:trackError",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdError],this),this._ruleEngine.registerRule(B.Play,"API:trackPlay",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState)],[this._cmdSeekComplete,this._cmdBufferComplete,this._cmdPlay],this),this._ruleEngine.registerRule(B.Pause,"API:trackPause",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer),t.createPredicate(this._isInSeek,!1,C.ErrInSeek)],[this._cmdPause],this),this._ruleEngine.registerRule(B.BufferStart,"API:trackEvent(BufferStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer),t.createPredicate(this._isInSeek,!1,C.ErrInSeek)],[this._cmdBufferStart],this),this._ruleEngine.registerRule(B.BufferComplete,"API:trackEvent(BufferComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInBuffer,!0,C.ErrNotInBuffer)],[this._cmdBufferComplete],this),this._ruleEngine.registerRule(B.SeekStart,"API:trackEvent(SeekStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInSeek,!1,C.ErrInSeek),t.createPredicate(this._isInBuffer,!1,C.ErrInBuffer)],[this._cmdSeekStart],this),this._ruleEngine.registerRule(B.SeekComplete,"API:trackEvent(SeekComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._shouldAllowPlayerStateChange,!0,C.ErrInvalidPlayerState),t.createPredicate(this._isInSeek,!0,C.ErrNotInSeek)],[this._cmdSeekComplete],this),this._ruleEngine.registerRule(B.AdBreakStart,"API:trackEvent(AdBreakStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidAdBreakObject,!0,C.ErrInvalidAdBreakObject),t.createPredicate(this._isDifferentAdBreakObject,!0,C.ErrDuplicateAdBreakObject)],[this._cmdAdSkip,this._cmdAdBreakComplete,this._cmdAdBreakStart],this),this._ruleEngine.registerRule(B.AdBreakComplete,"API:trackEvent(AdBreakComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak)],[this._cmdAdSkip,this._cmdAdBreakComplete],this),this._ruleEngine.registerRule(B.AdStart,"API:trackEvent(AdStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isValidAdObject,!0,C.ErrInvalidAdObject),t.createPredicate(this._isDifferentAdObject,!0,C.ErrDuplicateAdObject)],[this._cmdAdSkip,this._cmdAdStart],this),this._ruleEngine.registerRule(B.AdComplete,"API:trackEvent(AdComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isInAd,!0,C.ErrNotInAd)],[this._cmdAdComplete],this),this._ruleEngine.registerRule(B.AdSkip,"API:trackEvent(AdSkip)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInAdBreak,!0,C.ErrNotInAdBreak),t.createPredicate(this._isInAd,!0,C.ErrNotInAd)],[this._cmdAdSkip],this),this._ruleEngine.registerRule(B.ChapterStart,"API:trackEvent(ChapterStart)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidChapterObject,!0,C.ErrInvalidChapterObject),t.createPredicate(this._isDifferentChapterObject,!0,C.ErrDuplicateChapterObject)],[this._cmdChapterSkip,this._cmdChapterStart],this),this._ruleEngine.registerRule(B.ChapterComplete,"API:trackEvent(ChapterComplete)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInChapter,!0,C.ErrNotInChapter)],[this._cmdChapterComplete],this),this._ruleEngine.registerRule(B.ChapterSkip,"API:trackEvent(ChapterSkip)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isInChapter,!0,C.ErrNotInChapter)],[this._cmdChapterSkip],this),this._ruleEngine.registerRule(B.BitrateChange,"API:trackEvent(BitrateChange)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia)],[this._cmdBitrate],this),this._ruleEngine.registerRule(B.TimedMetadataUpdate,"API:trackEvent(TimedMetadataUpdate)",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._isValidTimedMetadataObject,!0,C.ErrInvalidTimedMetadataObject)],[this._cmdTimedMetadataUpdate],this),this._ruleEngine.registerRule(B.DisableTracking,"Internal::DisableTracking",[t.createPredicate(this._isTrackingDisabled,!1,C.ErrTrackingDisabled)],[this._cmdDisableTracking],this),this._ruleEngine.registerRule(B.BeginReporting,"Internal::BeginReporting",[t.createPredicate(this._isInSession,!0,C.ErrNotInSession),t.createPredicate(this._isInMedia,!0,C.ErrNotInMedia),t.createPredicate(this._didBeginReporting,!1,C.ErrBeginReporting)],[this._cmdBeginReporting],this)},e.prototype._configureAdobeAnalyticsPlugin=function(){this._aaPlugin=new n(this._appMeasurement,new p(this));var a=new o;a.channel=this._config.channel?this._config.channel:"",a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._aaPlugin.configure(a),this._plugins.push(this._aaPlugin)},e.prototype._configureAdobeHearbeatPlugin=function(){var a=this._appMeasurement.visitor?this._appMeasurement.visitor.marketingCloudOrgID:"";this._ahPlugin=new q(new s(this));var b=new r(this._config.trackingServer,a);b.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,b.ovp=this._config.ovp?this._config.ovp:"",b.ssl=this._config.ssl,b.sdk=this._config.appVersion?this._config.appVersion:"";var d=this._primetimeTVSDKVersion();d&&d.length>0&&(b.__primetime=!0,b.__psdkVersion=d),this._ahPlugin.configure(b),this._plugins.push(this._ahPlugin)},e.prototype._configureVideoPlayerPlugin=function(){this._playerPlugin=new k(new m(this));var a=new l;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._playerPlugin.configure(a),this._plugins.push(this._playerPlugin)},e.prototype._configureOtherPlugins=function(){if(c.plugins.nielsen&&this._config.nielsenConfigKey&&this._config.nielsenAppInfo){this._nielsenPlugin=new c.plugins.nielsen.NielsenPlugin(new c._NielsenPluginDelegate(this,this._logger));var a=new c.plugins.nielsen.NielsenPluginConfig;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,a.appInfo=this._config.nielsenAppInfo,a.configKey=this._config.nielsenConfigKey,this._nielsenPlugin.configure(a),this._plugins.push(this._nielsenPlugin)}},e.prototype._configureHeartbeat=function(){var a=new i;a.debugLogging=c.MediaHeartbeat._debugLogging||this._config.debugLogging,this._heartbeat=new h(new j(this),this._plugins),this._heartbeat.configure(a)},e.prototype._resetState=function(){this._taskScheduler.clearTasks(),this._privacyManager.reset(),this._mediaState={},this._plugins=[],this._playerPlugin=null,this._aaPlugin=null,this._ahPlugin=null,this._nielsenPlugin=null,this._heartbeat=null,this._currentMediaObject=null,this._currentAdBreakObject=null,this._currentAdObject=null,this._currentChapterObject=null,this._videoInfo=null,this._adBreakInfo=null,this._adInfo=null,this._chapterInfo=null,this._prerollWaitEnabled=!0,this._prerollWaitTime=O,this._playReceived=!1,this._playUnhandledFromPrerollWaitTime=!1,this._playTaskHandle=null,this._playAfterAdStart=!1},e.prototype._primetimeTVSDKVersion=function(){return this._currentMediaObject?this._currentMediaObject.getValue(M):null},e.prototype._cleanContextData=function(a){if(null==a||"object"!=typeof a)return null;var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];"number"!=typeof d&&"string"!=typeof d&&"boolean"!=typeof d||(b[c]=d)}return b},e.prototype._prepareMetadata=function(a,b){var c={};if(b&&w.append(c,b),a){var d=this._cleanContextData(a);w.append(c,d)}return delete c[L],c},e.prototype._onDelegateError=function(a){this._logger.error(D,a.getMessage()+" | "+a.getDetails())},e.prototype._onDelegateTrackingDisabled=function(){this._processRule(B.SessionEnd),this._processRule(B.DisableTracking)},e.prototype._onPrivacyChange=function(a){this._logger.info(D,"#_onPrivacyChange: Privacy Status: "+a),a===v.OPT_IN?this._processRule(B.BeginReporting):a===v.OPT_OUT&&this._processRule(B.SessionEnd)};var A={Session:0,Media:1,AdBreak:2,Ad:3,Chapter:4,PlayPause:5,Buffer:6,Seek:7,FPlayPause:8,Reporting:9},B={SessionStart:0,SessionEnd:1,VideoComplete:2,Play:3,Pause:4,Error:5,AdBreakStart:6,AdBreakComplete:7,AdStart:8,AdComplete:9,AdSkip:10,ChapterStart:11,ChapterComplete:12,ChapterSkip:13,SeekStart:14,SeekComplete:15,BufferStart:16,BufferComplete:17,BitrateChange:18,TimedMetadataUpdate:19,DisableTracking:20,BeginReporting:21},C={ErrUnSupportedPlatform:"MediaHeartbeat does not support tracking due to AppMeasurement or VisitorAPI not supporting the browser.",ErrNotInSession:'MediaHeartbeat is not in active tracking session, call "API:trackSessionStart" to begin a new tracking session.',ErrInSession:'MediaHeartbeat is in active tracking session, call "API:trackSessionEnd" to end current tracking session.',ErrNotInMedia:'MediaHeartbeat has completed tracking session, call "API:trackSessionEnd" first to end current session and then begin a new tracking session.',ErrInBuffer:'MediaHeartbeat is tracking buffer events, call "API:trackEvent(BufferComplete)" first to stop tracking buffer events.',ErrNotInBuffer:'MediaHeartbeat is not tracking buffer events, call "API:trackEvent(BufferStart)" before "API:trackEvent(BufferComplete)".',ErrInSeek:'MediaHeartbeat is tracking seek events, call "API:trackEvent(SeekComplete)" first to stop tracking seek events.',ErrNotInSeek:'MediaHeartbeat is not tracking seek events, call "API:trackEvent(SeekStart)" before "API:trackEvent(SeekComplete)".',ErrNotInAdBreak:'MediaHeartbeat is not tracking any AdBreak, call "API:trackEvent(AdBreakStart)" to begin tracking AdBreak',ErrNotInAd:'MediaHeartbeat is not tracking any Ad, call "API:trackEvent(AdStart)" to begin tracking Ad',ErrNotInChapter:'MediaHeartbeat is not tracking any Chapter, call "API:trackEvent(ChapterStart)" to begin tracking Chapter',ErrInvalidMediaObject:'MediaInfo passed into "API:trackSessionStart" is invalid.',ErrInvalidAdBreakObject:'AdBreakInfo passed into "API:trackEvent(AdBreakStart)" is invalid.',ErrDuplicateAdBreakObject:'MediaHeartbeat is currently tracking the AdBreak passed into "API:trackEvent(AdBreakStart)".',ErrInvalidAdObject:'AdInfo passed into "API:trackEvent(AdStart)" is invalid.',ErrDuplicateAdObject:'MediaHeartbeat is currently tracking the Ad passed into "API:trackEvent(AdStart)".',ErrInvalidChapterObject:'ChapterInfo passed into "API:trackEvent(ChapterStart)" is invalid.',ErrDuplicateChapterObject:'MediaHeartbeat is currently tracking the Chapter passed into "API:trackEvent(ChapterStart)".',ErrInvalidTimedMetadataObject:'TimedMetadata passed into "API:trackEvent(TimedMetadataUpdate)" is invalid.',ErrInvalidPlayerState:"MediaHeartbeat is tracking an AdBreak but not tracking any Ad and will drop any calls to track player state (Play, Pause, Buffer or Seek) in this state.",ErrAudioTrackingNotSupported:"Upgrade your AppMeasurement library to version >= '2.11.0' to support tracking audio content.",ErrTrackingDisabled:"MediaHeartbeat tracking is disabled for this publisher. Please contact Adobe Representative to enable tracking.",ErrBeginReporting:"MediaHeartbeat has already started reporting."},D="MediaHeartbeat",E="key_media_object",F="key_adbreak_object",G="key_ad_object",H="key_chapter_object",I="key_timed_metadata_object",J="key_custom_metadata",K="key_error_id",L="a.media.streamType",M="a.__pttvsdkVersion",N="granular_ad_tracking",O=250;c._MediaHeartbeatRule=B,c._MediaHeartbeatErrorMessage=C,c.MediaHeartbeatDelegate=d,c.MediaHeartbeat=e,c.MediaHeartbeat._debugLogging=!1}(a.ADB.core,a.ADB.va),a.ADB||(a.ADB={}),a.ADB.core||(a.ADB.core=core),a.ADB.va||(a.ADB.va=va),a.ADB.va.plugins||(a.ADB.va.plugins={})}(this);
|
|
72
|
+
|
|
73
|
+
}).call(lib);
|
|
74
|
+
exports.va = lib.ADB.va;
|
|
75
|
+
exports.core = lib.ADB.core;
|
|
76
|
+
}));
|