@gcorevideo/player 2.18.3 → 2.19.0
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/assets/audio-selector/style.scss +156 -0
- package/assets/audio-selector/track-selector.ejs +12 -0
- package/assets/big-mute-button/big-mute-button.ejs +3 -0
- package/assets/big-mute-button/big-mute-button.scss +57 -0
- package/assets/bottom-gear/bottomgear.ejs +12 -0
- package/assets/bottom-gear/gear-sub-menu.scss +95 -0
- package/assets/bottom-gear/gear.scss +79 -0
- package/assets/clappr-nerd-stats/button.ejs +4 -0
- package/assets/clappr-nerd-stats/clappr-nerd-stats.ejs +212 -0
- package/assets/clappr-nerd-stats/clappr-nerd-stats.scss +488 -0
- package/assets/clappr-nerd-stats/options-list.ejs +9 -0
- package/assets/clappr-nerd-stats/settings.ejs +12 -0
- package/assets/clappr-nerd-stats/speedtest/speedtest.worker.js +775 -0
- package/assets/clips/clips.scss +3 -0
- package/assets/context-menu/context_menu.ejs +8 -0
- package/assets/context-menu/context_menu.scss +31 -0
- package/assets/dvr-controls/dvr_controls.scss +136 -0
- package/assets/dvr-controls/index.ejs +2 -0
- package/assets/error-screen/error_screen.ejs +13 -0
- package/assets/error-screen/error_screen.scss +40 -0
- package/assets/icons/new/arrow-left.svg +5 -0
- package/assets/icons/new/arrow-right.svg +5 -0
- package/assets/icons/new/check.svg +5 -0
- package/assets/icons/new/close.svg +12 -0
- package/assets/icons/new/full.svg +8 -0
- package/assets/icons/new/fullscreen-off.svg +14 -0
- package/assets/icons/new/fullscreen-on.svg +14 -0
- package/assets/icons/new/gear-hd.svg +16 -0
- package/assets/icons/new/gear.svg +12 -0
- package/assets/icons/new/hd.svg +8 -0
- package/assets/icons/new/pause.svg +5 -0
- package/assets/icons/new/pip.svg +5 -0
- package/assets/icons/new/play.svg +10 -0
- package/assets/icons/new/replayleft.svg +5 -0
- package/assets/icons/new/replayright.svg +5 -0
- package/assets/icons/new/speed.svg +5 -0
- package/assets/icons/new/stats.svg +3 -0
- package/assets/icons/new/stop.svg +3 -0
- package/assets/icons/new/subtitles-off.svg +5 -0
- package/assets/icons/new/subtitles-on.svg +6 -0
- package/assets/icons/new/volume-max.svg +5 -0
- package/assets/icons/new/volume-min.svg +5 -0
- package/assets/icons/new/volume-off.svg +5 -0
- package/assets/icons/old/cardboard.svg +4 -0
- package/assets/icons/old/close-share.svg +13 -0
- package/assets/icons/old/close.svg +13 -0
- package/assets/icons/old/fb.svg +13 -0
- package/assets/icons/old/fullscreen.svg +12 -0
- package/assets/icons/old/language.svg +1 -0
- package/assets/icons/old/pause.svg +12 -0
- package/assets/icons/old/play.svg +12 -0
- package/assets/icons/old/quality-arrow.svg +13 -0
- package/assets/icons/old/reload.svg +4 -0
- package/assets/icons/old/share.svg +13 -0
- package/assets/icons/old/sound-off.svg +15 -0
- package/assets/icons/old/sound-on.svg +15 -0
- package/assets/icons/old/streams.svg +3 -0
- package/assets/icons/old/twitter.svg +13 -0
- package/assets/icons/old/wn.svg +15 -0
- package/assets/icons/standard/01-play.svg +3 -0
- package/assets/icons/standard/02-pause.svg +3 -0
- package/assets/icons/standard/03-stop.svg +3 -0
- package/assets/icons/standard/04-volume.svg +3 -0
- package/assets/icons/standard/05-mute.svg +3 -0
- package/assets/icons/standard/06-expand.svg +3 -0
- package/assets/icons/standard/07-shrink.svg +3 -0
- package/assets/icons/standard/08-hd.svg +3 -0
- package/assets/icons/standard/09-cc.svg +8 -0
- package/assets/icons/standard/10-reload.svg +4 -0
- package/assets/level-selector/button.ejs +8 -0
- package/assets/level-selector/list.ejs +22 -0
- package/assets/level-selector/style.scss +4 -0
- package/assets/logo/styles/logo.scss +10 -0
- package/assets/logo/templates/logo.ejs +3 -0
- package/assets/media-control/closed-hand.cur +0 -0
- package/assets/media-control/container.scss +57 -0
- package/assets/media-control/media-control.ejs +133 -0
- package/assets/media-control/media-control.scss +390 -0
- package/assets/media-control/plugins.scss +94 -0
- package/assets/media-control/width270.scss +50 -0
- package/assets/media-control/width370.scss +263 -0
- package/assets/multi-camera/multicamera.ejs +29 -0
- package/assets/multi-camera/style.scss +176 -0
- package/assets/picture-in-picture/button.ejs +3 -0
- package/assets/picture-in-picture/button.scss +11 -0
- package/assets/playback-rate/button.ejs +6 -0
- package/assets/playback-rate/list.ejs +14 -0
- package/assets/playback-rate/playback-rate-selector.ejs +9 -0
- package/assets/poster/poster.ejs +1 -0
- package/assets/poster/poster.scss +32 -0
- package/assets/seek-time/seek-time.html +2 -0
- package/assets/seek-time/seek-time.scss +38 -0
- package/assets/share/share.ejs +37 -0
- package/assets/share/style.scss +104 -0
- package/assets/skip-time/skip-time.ejs +8 -0
- package/assets/skip-time/style.scss +24 -0
- package/assets/spinner-three-bounce/spinner.ejs +3 -0
- package/assets/spinner-three-bounce/spinner.scss +44 -0
- package/assets/style/main.scss +50 -0
- package/assets/style/theme.scss +42 -0
- package/assets/style/variables.scss +7 -0
- package/assets/subtitles/combobox copy.ejs +16 -0
- package/assets/subtitles/combobox.ejs +16 -0
- package/assets/subtitles/string.ejs +3 -0
- package/assets/subtitles/style.scss +99 -0
- package/assets/thumbnails/scrub-thumbnails.ejs +10 -0
- package/assets/thumbnails/style.scss +75 -0
- package/assets/vast-ads/style.scss +112 -0
- package/assets/video360/button.ejs +1 -0
- package/assets/video360/style.scss +8 -0
- package/build/vite-raw-plugin.js +18 -0
- package/dist/index.js +1 -1
- package/dist/plugins/index.css +2164 -0
- package/dist/plugins/index.js/index.plugins.js +40837 -0
- package/dist/plugins/index.plugins.js +40837 -0
- package/lib/index.core.d.ts +15 -0
- package/lib/index.core.d.ts.map +1 -0
- package/lib/index.core.js +14 -0
- package/lib/index.d.ts +2 -14
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -14
- package/lib/index.plugins.d.ts +38 -0
- package/lib/index.plugins.d.ts.map +1 -0
- package/lib/index.plugins.js +40 -0
- package/lib/plugins/audio-selector/AudioSelector.d.ts +3 -3
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +6 -12
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +2 -2
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +7 -12
- package/lib/plugins/bottom-gear/BottomGear.d.ts +4 -3
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +11 -16
- package/lib/plugins/build.d.ts +2 -0
- package/lib/plugins/build.d.ts.map +1 -0
- package/lib/plugins/build.js +1 -0
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +44 -0
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +294 -0
- package/lib/plugins/clappr-nerd-stats/formatter.d.ts +8 -0
- package/lib/plugins/clappr-nerd-stats/formatter.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/formatter.js +91 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.d.ts +54 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.js +335 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/index.d.ts +9 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/index.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/index.js +154 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/types.d.ts +6 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/types.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/types.js +1 -0
- package/lib/plugins/clappr-nerd-stats/types.d.ts +4 -0
- package/lib/plugins/clappr-nerd-stats/types.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/types.js +1 -0
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +56 -0
- package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -0
- package/lib/plugins/clappr-stats/ClapprStats.js +332 -0
- package/lib/plugins/clappr-stats/types.d.ts +50 -0
- package/lib/plugins/clappr-stats/types.d.ts.map +1 -0
- package/lib/plugins/clappr-stats/types.js +5 -0
- package/lib/plugins/clappr-stats/utils.d.ts +3 -0
- package/lib/plugins/clappr-stats/utils.d.ts.map +1 -0
- package/lib/plugins/clappr-stats/utils.js +40 -0
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +2 -2
- package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +4 -6
- package/lib/plugins/clips/Clips.d.ts +23 -0
- package/lib/plugins/clips/Clips.d.ts.map +1 -0
- package/lib/plugins/clips/Clips.js +109 -0
- package/lib/plugins/context-menu/ContextMenu.d.ts +36 -0
- package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -0
- package/lib/plugins/context-menu/ContextMenu.js +102 -0
- package/lib/plugins/disable-controls/DisableControls.d.ts +1 -1
- package/lib/plugins/disable-controls/DisableControls.d.ts.map +1 -1
- package/lib/plugins/disable-controls/DisableControls.js +3 -5
- package/lib/plugins/dvr-controls/DVRControls.d.ts +4 -4
- package/lib/plugins/dvr-controls/DVRControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DVRControls.js +5 -4
- package/lib/plugins/error-screen/ErrorScreen.d.ts +44 -0
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -0
- package/lib/plugins/error-screen/ErrorScreen.js +179 -0
- package/lib/plugins/favicon/Favicon.d.ts +24 -0
- package/lib/plugins/favicon/Favicon.d.ts.map +1 -0
- package/lib/plugins/favicon/Favicon.js +106 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts +30 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts.map +1 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.js +114 -0
- package/lib/plugins/index.d.ts +38 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/index.js +40 -0
- package/lib/plugins/kibo/index.d.ts +23 -0
- package/lib/plugins/kibo/index.d.ts.map +1 -0
- package/lib/plugins/kibo/index.js +199 -0
- package/lib/plugins/level-selector/LevelSelector.d.ts +48 -17
- package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +169 -155
- package/lib/plugins/logo/Logo.d.ts +29 -0
- package/lib/plugins/logo/Logo.d.ts.map +1 -0
- package/lib/plugins/logo/Logo.js +181 -0
- package/lib/plugins/logo/utils/index.d.ts +22 -0
- package/lib/plugins/logo/utils/index.d.ts.map +1 -0
- package/lib/plugins/logo/utils/index.js +32 -0
- package/lib/plugins/media-control/MediaControl.d.ts +20 -25
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +136 -106
- package/lib/plugins/multi-camera/MultiCamera.d.ts +59 -0
- package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -0
- package/lib/plugins/multi-camera/MultiCamera.js +353 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +20 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.js +68 -0
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +42 -0
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -0
- package/lib/plugins/playback-rate/PlaybackRate.js +205 -0
- package/lib/plugins/poster/Poster.d.ts +18 -17
- package/lib/plugins/poster/Poster.d.ts.map +1 -1
- package/lib/plugins/poster/Poster.js +83 -37
- package/lib/plugins/seek-time/SeekTime.d.ts +38 -0
- package/lib/plugins/seek-time/SeekTime.d.ts.map +1 -0
- package/lib/plugins/seek-time/SeekTime.js +153 -0
- package/lib/plugins/share/Share.d.ts +38 -0
- package/lib/plugins/share/Share.d.ts.map +1 -0
- package/lib/plugins/share/Share.js +122 -0
- package/lib/plugins/skip-time/SkipTime.d.ts +28 -0
- package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -0
- package/lib/plugins/skip-time/SkipTime.js +86 -0
- package/lib/plugins/source-controller/SourceController.d.ts +41 -0
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -0
- package/lib/plugins/source-controller/SourceController.js +199 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +26 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +117 -0
- package/lib/plugins/statistics/Statistics.d.ts +52 -0
- package/lib/plugins/statistics/Statistics.d.ts.map +1 -0
- package/lib/plugins/statistics/Statistics.js +130 -0
- package/lib/plugins/subtitles/Subtitles.d.ts +61 -0
- package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -0
- package/lib/plugins/subtitles/Subtitles.js +354 -0
- package/lib/plugins/thumbnails/Thumbnails.d.ts +47 -0
- package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -0
- package/lib/plugins/thumbnails/Thumbnails.js +414 -0
- package/lib/plugins/types.d.ts +8 -0
- package/lib/plugins/types.d.ts.map +1 -0
- package/lib/plugins/types.js +1 -0
- package/lib/plugins/utils.d.ts +5 -0
- package/lib/plugins/utils.d.ts.map +1 -0
- package/lib/plugins/utils.js +68 -0
- package/lib/plugins/vast-ads/VastAds.d.ts +72 -0
- package/lib/plugins/vast-ads/VastAds.d.ts.map +1 -0
- package/lib/plugins/vast-ads/VastAds.js +686 -0
- package/lib/plugins/vast-ads/loaderxml.d.ts +32 -0
- package/lib/plugins/vast-ads/loaderxml.d.ts.map +1 -0
- package/lib/plugins/vast-ads/loaderxml.js +226 -0
- package/lib/plugins/vast-ads/roll.d.ts +60 -0
- package/lib/plugins/vast-ads/roll.d.ts.map +1 -0
- package/lib/plugins/vast-ads/roll.js +415 -0
- package/lib/plugins/vast-ads/rollmanager.d.ts +62 -0
- package/lib/plugins/vast-ads/rollmanager.d.ts.map +1 -0
- package/lib/plugins/vast-ads/rollmanager.js +347 -0
- package/lib/plugins/vast-ads/sctemanager.d.ts +18 -0
- package/lib/plugins/vast-ads/sctemanager.d.ts.map +1 -0
- package/lib/plugins/vast-ads/sctemanager.js +116 -0
- package/lib/plugins/vast-ads/types.d.ts +12 -0
- package/lib/plugins/vast-ads/types.d.ts.map +1 -0
- package/lib/plugins/vast-ads/types.js +1 -0
- package/lib/plugins/vast-ads/urlhandler.d.ts +4 -0
- package/lib/plugins/vast-ads/urlhandler.d.ts.map +1 -0
- package/lib/plugins/vast-ads/urlhandler.js +30 -0
- package/lib/plugins/vast-ads/xmlhttprequest.d.ts +6 -0
- package/lib/plugins/vast-ads/xmlhttprequest.d.ts.map +1 -0
- package/lib/plugins/vast-ads/xmlhttprequest.js +39 -0
- package/lib/plugins/vast-ads/xmlmerge.d.ts +12 -0
- package/lib/plugins/vast-ads/xmlmerge.d.ts.map +1 -0
- package/lib/plugins/vast-ads/xmlmerge.js +82 -0
- package/lib/plugins/volume-fade/VolumeFade.d.ts +21 -0
- package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -0
- package/lib/plugins/volume-fade/VolumeFade.js +90 -0
- package/package.json +10 -2
- package/rollup.config.js +32 -2
- package/src/index.core.ts +15 -0
- package/src/index.plugins.ts +42 -0
- package/src/index.ts +2 -15
- package/src/plugins/audio-selector/AudioSelector.ts +370 -0
- package/src/plugins/big-mute-button/BigMuteButton.ts +187 -0
- package/src/plugins/bottom-gear/BottomGear.ts +122 -0
- package/src/plugins/build.ts +1 -0
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +369 -0
- package/src/plugins/clappr-nerd-stats/formatter.ts +109 -0
- package/src/plugins/clappr-nerd-stats/speedtest/Speedtest.ts +414 -0
- package/src/plugins/clappr-nerd-stats/speedtest/index.ts +183 -0
- package/src/plugins/clappr-nerd-stats/speedtest/types.ts +5 -0
- package/src/plugins/clappr-nerd-stats/types.ts +3 -0
- package/src/plugins/clappr-stats/ClapprStats.ts +441 -0
- package/src/plugins/clappr-stats/types.ts +52 -0
- package/src/plugins/clappr-stats/utils.ts +42 -0
- package/src/plugins/click-to-pause/ClickToPause.ts +93 -0
- package/src/plugins/clips/Clips.ts +152 -0
- package/src/plugins/context-menu/ContextMenu.ts +134 -0
- package/src/plugins/disable-controls/DisableControls.ts +81 -0
- package/src/plugins/dvr-controls/DvrControls.ts +131 -0
- package/src/plugins/error-screen/ErrorScreen.ts +241 -0
- package/src/plugins/favicon/Favicon.ts +137 -0
- package/src/plugins/ga-events/GaEvents.js +395 -0
- package/src/plugins/ga-events/ga-tracking.js +46 -0
- package/src/plugins/google-analytics/GoogleAnalytics.ts +147 -0
- package/src/plugins/index.ts +42 -0
- package/src/plugins/kibo/index.ts +244 -0
- package/src/plugins/level-selector/LevelSelector.ts +400 -0
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +72 -0
- package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +11 -0
- package/src/plugins/logo/Logo.ts +233 -0
- package/src/plugins/logo/utils/index.ts +46 -0
- package/src/plugins/media-control/MediaControl.ts +1383 -0
- package/src/plugins/multi-camera/MultiCamera copy.xts +414 -0
- package/src/plugins/multi-camera/MultiCamera.ts +426 -0
- package/src/plugins/picture-in-picture/PictureInPicture.ts +87 -0
- package/src/plugins/playback-rate/PlaybackRate.ts +269 -0
- package/src/plugins/poster/Poster.ts +298 -0
- package/src/plugins/seek-time/SeekTime.ts +191 -0
- package/src/plugins/share/Share.ts +148 -0
- package/src/plugins/skip-time/SkipTime.ts +109 -0
- package/src/plugins/source-controller/SourceController.ts +239 -0
- package/src/plugins/source-controller/__tests__/SourceController.test.ts +230 -0
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +135 -0
- package/src/plugins/statistics/Statistics copy.xts +296 -0
- package/src/plugins/statistics/Statistics.ts +207 -0
- package/src/plugins/subtitles/Subtitles.ts +505 -0
- package/src/plugins/thumbnails/Thumbnails.ts +530 -0
- package/src/plugins/types.ts +7 -0
- package/src/plugins/typings/globals.d.ts +10 -0
- package/src/plugins/typings/parse-srt.d.ts +14 -0
- package/src/plugins/typings/workers.d.ts +3 -0
- package/src/plugins/utils.ts +77 -0
- package/src/plugins/vast-ads/VastAds.ts +915 -0
- package/src/plugins/vast-ads/loaderxml.ts +260 -0
- package/src/plugins/vast-ads/roll.ts +492 -0
- package/src/plugins/vast-ads/rollmanager.ts +403 -0
- package/src/plugins/vast-ads/sctemanager.ts +134 -0
- package/src/plugins/vast-ads/types.ts +14 -0
- package/src/plugins/vast-ads/urlhandler.ts +37 -0
- package/src/plugins/vast-ads/xmlhttprequest.ts +44 -0
- package/src/plugins/vast-ads/xmlmerge.ts +96 -0
- package/src/plugins/video360/VRControls.js +104 -0
- package/src/plugins/video360/VREffect.js +422 -0
- package/src/plugins/video360/Video360.js +979 -0
- package/src/plugins/video360/orbit-oriention-controls.js +1002 -0
- package/src/plugins/video360/utils.js +49 -0
- package/src/plugins/volume-fade/VolumeFade.ts +109 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
// import LogManager from '../../utils/LogManager';
|
|
2
|
+
import { $, Events, Log } from '@clappr/core';
|
|
3
|
+
import { reportError } from '@gcorevideo/utils';
|
|
4
|
+
import assert from 'assert';
|
|
5
|
+
export default class Roll extends Events {
|
|
6
|
+
mute;
|
|
7
|
+
core;
|
|
8
|
+
container;
|
|
9
|
+
$skipAd;
|
|
10
|
+
$muteIcon;
|
|
11
|
+
$areaClick;
|
|
12
|
+
_playback;
|
|
13
|
+
_volume;
|
|
14
|
+
_prevValueVolume;
|
|
15
|
+
_useDummyMp4Video = false;
|
|
16
|
+
firstRemaininTime = 0;
|
|
17
|
+
intervalTimer = null;
|
|
18
|
+
_isAdStartedTriggered;
|
|
19
|
+
extension;
|
|
20
|
+
_adsManager;
|
|
21
|
+
url = '';
|
|
22
|
+
// _events: Record<string, Function>;
|
|
23
|
+
constructor({ core, $skipAd, $muteIcon, $areaClick, mute, volume, prevVolume }) {
|
|
24
|
+
super();
|
|
25
|
+
this.mute = mute;
|
|
26
|
+
this.core = core;
|
|
27
|
+
this.container = this.core.activeContainer;
|
|
28
|
+
this.$skipAd = $skipAd;
|
|
29
|
+
this.$muteIcon = $muteIcon;
|
|
30
|
+
this.$areaClick = $areaClick;
|
|
31
|
+
this._playback = this.core.activePlayback;
|
|
32
|
+
this._volume = volume;
|
|
33
|
+
this._prevValueVolume = prevVolume;
|
|
34
|
+
this._isAdStartedTriggered = false;
|
|
35
|
+
// this._events = {};
|
|
36
|
+
}
|
|
37
|
+
static _adContainer;
|
|
38
|
+
static _adDisplayContainer;
|
|
39
|
+
static _imaContainer;
|
|
40
|
+
static _contentElement = null;
|
|
41
|
+
static createAdDisplayContainer() {
|
|
42
|
+
Roll.createImaContainer();
|
|
43
|
+
assert('google' in window, 'Google IMA SDK not found');
|
|
44
|
+
Roll._adDisplayContainer = new window.google.ima.AdDisplayContainer(Roll._imaContainer, Roll._contentElement);
|
|
45
|
+
}
|
|
46
|
+
static createImaContainer() {
|
|
47
|
+
Roll.destroyImaContainer();
|
|
48
|
+
// IMA does not clean ad container when finished
|
|
49
|
+
// For the sake of simplicity, wrap into a <div> element
|
|
50
|
+
if (Roll._adContainer) {
|
|
51
|
+
Roll._imaContainer = document.createElement('div');
|
|
52
|
+
Roll._adContainer.appendChild(Roll._imaContainer);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
static destroyImaContainer() {
|
|
56
|
+
if (Roll._imaContainer && Roll._adContainer) {
|
|
57
|
+
Roll._adContainer.removeChild(Roll._imaContainer);
|
|
58
|
+
delete Roll._imaContainer;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
_onAdError(adErrorEvent) {
|
|
62
|
+
try {
|
|
63
|
+
const googleError = adErrorEvent.getError();
|
|
64
|
+
const error = new Error(googleError.getMessage() + ' ' + googleError.getErrorCode());
|
|
65
|
+
error.name = googleError.getType();
|
|
66
|
+
// LogManager.exception(error);
|
|
67
|
+
reportError(error);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
// LogManager.exception(error);
|
|
71
|
+
reportError(error);
|
|
72
|
+
}
|
|
73
|
+
Log.debug('Advertisement', 'advertisement error');
|
|
74
|
+
this._cleverContinueAd(true);
|
|
75
|
+
}
|
|
76
|
+
async _playAds() {
|
|
77
|
+
await Roll._adDisplayContainer.initialize();
|
|
78
|
+
try {
|
|
79
|
+
assert('google' in window, 'Google IMA SDK not found');
|
|
80
|
+
assert(Roll._contentElement, 'content element not found');
|
|
81
|
+
this._adsManager.init(Roll._contentElement.offsetWidth, Roll._contentElement.offsetHeight, window.google.ima.ViewMode.NORMAL);
|
|
82
|
+
this._adsManager.start();
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
// LogManager.exception(error);
|
|
86
|
+
reportError(error);
|
|
87
|
+
this._imaEvent('error', error);
|
|
88
|
+
this._playVideoContent();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
_setVolume(volume) {
|
|
92
|
+
try {
|
|
93
|
+
if (this._adsManager) {
|
|
94
|
+
this._adsManager.setVolume(volume / 100);
|
|
95
|
+
}
|
|
96
|
+
if (typeof this.core.mediaControl.setVolume === 'function') {
|
|
97
|
+
this.core.options.mute = !volume;
|
|
98
|
+
this.trigger('volume', {
|
|
99
|
+
volume,
|
|
100
|
+
mute: this.core.options.mute
|
|
101
|
+
});
|
|
102
|
+
if (this.container.advertisement.type !== 'scteroll') {
|
|
103
|
+
this.core.mediaControl.setVolume(volume, true);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
if (volume) {
|
|
107
|
+
this.container.advertisement.isMuted = true;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.core.mediaControl.setVolume(volume, true);
|
|
111
|
+
this.container.advertisement.isMuted = false;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
this._volume = volume;
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
// LogManager.exception(error);
|
|
119
|
+
reportError(error);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
_playVideoContent() {
|
|
123
|
+
this.destroy();
|
|
124
|
+
this.trigger('advertisement_finish');
|
|
125
|
+
}
|
|
126
|
+
_hideControls() {
|
|
127
|
+
if (this.extension && this.extension.controls === '0') {
|
|
128
|
+
this.$skipAd.css({ opacity: 0, visibility: 'hidden' });
|
|
129
|
+
this.$muteIcon.css({ opacity: 0, visibility: 'hidden' });
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
this.$skipAd.css({ opacity: 1, visibility: 'visible' });
|
|
133
|
+
this.$muteIcon.css({ opacity: 1, visibility: 'visible' });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
_requestAd({ xml, url, extension }) {
|
|
137
|
+
this.extension = extension;
|
|
138
|
+
assert('google' in window, 'Google IMA SDK not found');
|
|
139
|
+
const adsLoader = new window.google.ima.AdsLoader(Roll._adDisplayContainer);
|
|
140
|
+
adsLoader.addEventListener(window.google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, (e) => {
|
|
141
|
+
this._onAdsManagerLoaded(e);
|
|
142
|
+
});
|
|
143
|
+
adsLoader.addEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, (e) => {
|
|
144
|
+
this._onAdError(e);
|
|
145
|
+
});
|
|
146
|
+
const adsRequest = new window.google.ima.AdsRequest();
|
|
147
|
+
if (xml) {
|
|
148
|
+
adsRequest.adTagUrl = '';
|
|
149
|
+
adsRequest.adsResponse = xml;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
if (url) {
|
|
153
|
+
adsRequest.adTagUrl = url;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
throw 'no ad url';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
this.url = url;
|
|
160
|
+
assert(Roll._contentElement, 'content element not found');
|
|
161
|
+
adsRequest.linearAdSlotWidth = Roll._contentElement.offsetWidth;
|
|
162
|
+
adsRequest.linearAdSlotHeight = Roll._contentElement.offsetHeight;
|
|
163
|
+
adsRequest.nonLinearAdSlotWidth = Roll._contentElement.offsetWidth;
|
|
164
|
+
adsRequest.nonLinearAdSlotHeight = Roll._contentElement.offsetHeight;
|
|
165
|
+
adsLoader.requestAds(adsRequest);
|
|
166
|
+
}
|
|
167
|
+
playerResize() {
|
|
168
|
+
assert(Roll._contentElement, 'content element not found');
|
|
169
|
+
assert('google' in window, 'Google IMA SDK not found');
|
|
170
|
+
this._adsManager && this._adsManager.resize(Roll._contentElement.offsetWidth, Roll._contentElement.offsetHeight, window.google.ima.ViewMode.NORMAL);
|
|
171
|
+
}
|
|
172
|
+
_onAdsManagerLoaded(adsManagerLoadedEvent) {
|
|
173
|
+
assert('google' in window, 'Google IMA SDK not found');
|
|
174
|
+
const adsRenderingSettings = new window.google.ima.AdsRenderingSettings();
|
|
175
|
+
adsRenderingSettings.loadVideoTimeout = process.env.MINIMIZE ? 4000 : 8000;
|
|
176
|
+
adsRenderingSettings.bitrate = 100000;
|
|
177
|
+
// Plugin will handle playback state when ad has completed
|
|
178
|
+
this._adsManager = adsManagerLoadedEvent.getAdsManager(Roll._contentElement, adsRenderingSettings);
|
|
179
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.LOADED, () => {
|
|
180
|
+
if (this.mute) {
|
|
181
|
+
this._setVolume(0);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this._setVolume(this._volume);
|
|
185
|
+
}
|
|
186
|
+
this.changeIconVolume();
|
|
187
|
+
});
|
|
188
|
+
this._adsManager.addEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, (e) => {
|
|
189
|
+
const adType = this.container.advertisement.type;
|
|
190
|
+
if (!((adType === 'middleroll' || adType === 'repeatableroll') && !this._playback.isPlaying())) {
|
|
191
|
+
this._onAdError(e);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, () => {
|
|
195
|
+
this._imaEvent('content_resume_requested');
|
|
196
|
+
});
|
|
197
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, () => {
|
|
198
|
+
this._imaEvent('content_pause_requested');
|
|
199
|
+
this._triggerStartAd(this.url);
|
|
200
|
+
});
|
|
201
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.CLICK, () => {
|
|
202
|
+
this._imaEvent('click');
|
|
203
|
+
});
|
|
204
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.IMPRESSION, () => {
|
|
205
|
+
this._imaEvent('impression');
|
|
206
|
+
});
|
|
207
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.STARTED, (adEvent) => {
|
|
208
|
+
this._triggerStartAd(this.url);
|
|
209
|
+
this.trigger('advertisement_played');
|
|
210
|
+
const ad = adEvent.getAd();
|
|
211
|
+
try {
|
|
212
|
+
assert(Roll._contentElement, 'content element not found');
|
|
213
|
+
assert('google' in window, 'Google IMA SDK not found');
|
|
214
|
+
this._adsManager && this._adsManager.resize(Roll._contentElement.offsetWidth, Roll._contentElement.offsetHeight, window.google.ima.ViewMode.NORMAL);
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
// LogManager.exception(error);
|
|
218
|
+
reportError(error);
|
|
219
|
+
}
|
|
220
|
+
if (this.mute) {
|
|
221
|
+
this._setVolume(0);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
this._setVolume(this._volume);
|
|
225
|
+
}
|
|
226
|
+
if (ad.isLinear()) {
|
|
227
|
+
// For a linear ad, a timer can be started to poll for
|
|
228
|
+
// the remaining time.
|
|
229
|
+
this.intervalTimer = setInterval(() => {
|
|
230
|
+
this._remainingTime(ad);
|
|
231
|
+
}, 300); // every 300ms
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.FIRST_QUARTILE, () => {
|
|
235
|
+
this._imaEvent('first_quartile');
|
|
236
|
+
});
|
|
237
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.MIDPOINT, () => {
|
|
238
|
+
this._imaEvent('midpoint');
|
|
239
|
+
});
|
|
240
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.THIRD_QUARTILE, () => {
|
|
241
|
+
this._imaEvent('third_quartile');
|
|
242
|
+
});
|
|
243
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.COMPLETE, () => {
|
|
244
|
+
this._imaEvent('complete');
|
|
245
|
+
this._useDummyMp4Video = false;
|
|
246
|
+
});
|
|
247
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED, () => {
|
|
248
|
+
this._imaEvent('all_ads_completed');
|
|
249
|
+
this._cleverContinueAd();
|
|
250
|
+
this._useDummyMp4Video = false;
|
|
251
|
+
});
|
|
252
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.PAUSED, () => {
|
|
253
|
+
this._imaEvent('paused');
|
|
254
|
+
});
|
|
255
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.RESUMED, () => {
|
|
256
|
+
this._imaEvent('resumed');
|
|
257
|
+
});
|
|
258
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.SKIPPED, () => {
|
|
259
|
+
this._imaEvent('skipped');
|
|
260
|
+
if (this.extension && this.extension.skipAd) {
|
|
261
|
+
this._trackUrl(this.extension.skipAd);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.VOLUME_CHANGED, () => {
|
|
265
|
+
this._imaEvent('volume_change');
|
|
266
|
+
this.changeIconVolume();
|
|
267
|
+
});
|
|
268
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.VOLUME_MUTED, () => {
|
|
269
|
+
this._imaEvent('volume_muted');
|
|
270
|
+
this.changeIconVolume();
|
|
271
|
+
});
|
|
272
|
+
this._adsManager.addEventListener(window.google.ima.AdEvent.Type.USER_CLOSE, () => {
|
|
273
|
+
this._imaEvent('user_close');
|
|
274
|
+
});
|
|
275
|
+
if (this.mute) {
|
|
276
|
+
this._setVolume(0);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
this._setVolume(this._volume);
|
|
280
|
+
}
|
|
281
|
+
this._setupOverlay();
|
|
282
|
+
}
|
|
283
|
+
_triggerStartAd(url) {
|
|
284
|
+
if (!this._isAdStartedTriggered) {
|
|
285
|
+
this._isAdStartedTriggered = true;
|
|
286
|
+
this.trigger('advertisement_started', {
|
|
287
|
+
url
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
_remainingTime(ad) {
|
|
292
|
+
if (!ad || !this._adsManager) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const remainingTime = Math.abs(this._adsManager.getRemainingTime());
|
|
296
|
+
const duration = ad.getDuration() || ad.getMinSuggestedDuration();
|
|
297
|
+
if (!this.firstRemaininTime) {
|
|
298
|
+
this.firstRemaininTime = this._adsManager.getRemainingTime();
|
|
299
|
+
}
|
|
300
|
+
const shouldShowSkip = remainingTime < this.firstRemaininTime &&
|
|
301
|
+
this.extension.timeOffset > -1 &&
|
|
302
|
+
this.firstRemaininTime > this.extension.timeOffset &&
|
|
303
|
+
!(duration > 0 && Math.abs(duration) < this.extension.timeOffset);
|
|
304
|
+
if (!shouldShowSkip) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
this.$skipAd.show();
|
|
308
|
+
const offset = Math.round(this.extension.timeOffset - Math.abs(this.firstRemaininTime - remainingTime));
|
|
309
|
+
if (offset > 0) {
|
|
310
|
+
this.$skipAd.addClass('skip-ad-time');
|
|
311
|
+
this.$skipAd.text(this.core.i18n.t('you_can_skip_ad') + ' ' + offset);
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
this.$skipAd.removeClass('skip-ad-time');
|
|
315
|
+
this.$skipAd.text(this.core.i18n.t('skip_ad'));
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
_cleverContinueAd(error) {
|
|
319
|
+
try {
|
|
320
|
+
this.destroy();
|
|
321
|
+
}
|
|
322
|
+
catch (error) {
|
|
323
|
+
// LogManager.exception(error);
|
|
324
|
+
reportError(error);
|
|
325
|
+
}
|
|
326
|
+
this.trigger('continue_ad', { error });
|
|
327
|
+
}
|
|
328
|
+
_imaEvent(eventName, e) {
|
|
329
|
+
$.isFunction(this._events[eventName]) && this._events[eventName](e);
|
|
330
|
+
}
|
|
331
|
+
changeIconVolume() {
|
|
332
|
+
if (!this._adsManager) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
this.$muteIcon.show();
|
|
336
|
+
if (this._adsManager.getVolume() === 0) {
|
|
337
|
+
if (!this._volume && this._adsManager.getVolume()) {
|
|
338
|
+
this._volume = this._adsManager.getVolume() * 100;
|
|
339
|
+
}
|
|
340
|
+
this.$muteIcon.find('.mute-off-ad-icon').show();
|
|
341
|
+
this.$muteIcon.find('.mute-on-ad-icon').hide();
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
this._volume = this._adsManager.getVolume() * 100;
|
|
345
|
+
this.$muteIcon.find('.mute-on-ad-icon').show();
|
|
346
|
+
this.$muteIcon.find('.mute-off-ad-icon').hide();
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
_setupOverlay() {
|
|
350
|
+
this.$muteIcon.off('click');
|
|
351
|
+
this.$skipAd.off('click');
|
|
352
|
+
this.$areaClick.off('click');
|
|
353
|
+
this.$muteIcon.off();
|
|
354
|
+
this.$skipAd.off();
|
|
355
|
+
this.$areaClick.off();
|
|
356
|
+
this.$muteIcon.on('click', () => {
|
|
357
|
+
if (this._adsManager) {
|
|
358
|
+
if (this._adsManager.getVolume() === 0) {
|
|
359
|
+
this._setVolume((this._prevValueVolume ? this._prevValueVolume : this._volume));
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
this._setVolume(0);
|
|
363
|
+
}
|
|
364
|
+
this.changeIconVolume();
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
this.$skipAd.on('click', () => {
|
|
368
|
+
if (this.extension.skipEvents) {
|
|
369
|
+
this._trackUrls(this.extension.skipEvents);
|
|
370
|
+
}
|
|
371
|
+
if (this.extension.progressEvents) {
|
|
372
|
+
this._trackUrls(this.extension.progressEvents);
|
|
373
|
+
}
|
|
374
|
+
if (this.extension && this.extension.skipAd) {
|
|
375
|
+
this._trackUrl(this.extension.skipAd);
|
|
376
|
+
}
|
|
377
|
+
this._adsManager.stop();
|
|
378
|
+
console.warn('skip ad');
|
|
379
|
+
});
|
|
380
|
+
if (this.extension.clickThrough) {
|
|
381
|
+
this.$areaClick.show();
|
|
382
|
+
this.$areaClick.on('click', () => {
|
|
383
|
+
window.open(this.extension.clickThrough, '_blank');
|
|
384
|
+
console.warn(this.extension.clickTrackings);
|
|
385
|
+
if (this.extension.clickTrackings.length) {
|
|
386
|
+
this._trackUrls(this.extension.clickTrackings);
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
this._hideControls();
|
|
391
|
+
this._playAds();
|
|
392
|
+
}
|
|
393
|
+
_trackUrls(urls) {
|
|
394
|
+
for (let i = 0; i < urls.length; i++) {
|
|
395
|
+
this._trackUrl(urls[i]);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
_trackUrl(url) {
|
|
399
|
+
if (url) {
|
|
400
|
+
const i = new Image();
|
|
401
|
+
i.src = url;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
destroy() {
|
|
405
|
+
if (this.intervalTimer) {
|
|
406
|
+
clearInterval(this.intervalTimer);
|
|
407
|
+
this.intervalTimer = null;
|
|
408
|
+
}
|
|
409
|
+
if (Roll._adDisplayContainer) {
|
|
410
|
+
if (this._adsManager) {
|
|
411
|
+
this._adsManager.destroy();
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Core, Events } from '@clappr/core';
|
|
2
|
+
import { ZeptoResult } from '../types.js';
|
|
3
|
+
import { AdRollDesc, AdRollType } from './types.js';
|
|
4
|
+
type CoreOptions = Record<string, unknown>;
|
|
5
|
+
export default class RollManager extends Events {
|
|
6
|
+
private core;
|
|
7
|
+
private options;
|
|
8
|
+
private $skipAd;
|
|
9
|
+
private $muteIcon;
|
|
10
|
+
private $areaClick;
|
|
11
|
+
private _adContainer;
|
|
12
|
+
private type;
|
|
13
|
+
private countRoll;
|
|
14
|
+
private volume;
|
|
15
|
+
private prevVolume;
|
|
16
|
+
private _allURLRequest;
|
|
17
|
+
private _container;
|
|
18
|
+
private container;
|
|
19
|
+
private _options;
|
|
20
|
+
private vastAdsOptions;
|
|
21
|
+
private _playback;
|
|
22
|
+
private _contentElement;
|
|
23
|
+
private _posterPlugin;
|
|
24
|
+
private _clickToPausePlugin;
|
|
25
|
+
private adTemplates;
|
|
26
|
+
private extension;
|
|
27
|
+
private firstRemaininTime;
|
|
28
|
+
private _imaContainer;
|
|
29
|
+
private isPlaying;
|
|
30
|
+
private loadXML;
|
|
31
|
+
private _pr;
|
|
32
|
+
private roll;
|
|
33
|
+
constructor(core: Core, options: CoreOptions, $skipAd: ZeptoResult, $muteIcon: ZeptoResult, $areaClick: ZeptoResult, _adContainer: HTMLElement, type: AdRollType, countRoll: number, volume: number, prevVolume: number);
|
|
34
|
+
private initializeRoll;
|
|
35
|
+
playerResize(_: {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}): void;
|
|
39
|
+
private onAdStarted;
|
|
40
|
+
onAdPlayed(): void;
|
|
41
|
+
private removeContainer;
|
|
42
|
+
private changeVolume;
|
|
43
|
+
_createImaContainer(): void;
|
|
44
|
+
_destroyImaContainer(): void;
|
|
45
|
+
setupRoll(): Promise<void>;
|
|
46
|
+
startAd(type: AdRollType, roll: AdRollDesc): Promise<void>;
|
|
47
|
+
_disableControls(): void;
|
|
48
|
+
private parseAdUrl;
|
|
49
|
+
paramsUrl(url: string): string;
|
|
50
|
+
loadAd(url: string): Promise<void>;
|
|
51
|
+
_onAdError(adErrorEvent: any): void;
|
|
52
|
+
_imaEvent(eventName: string, e: any): void;
|
|
53
|
+
/**
|
|
54
|
+
* определяет, что дальше будет запускаться реклама или контент
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
_cleverContinueAd(data: any): Promise<void>;
|
|
58
|
+
_playVideoContent(): void;
|
|
59
|
+
destroyRoll(): void;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=rollmanager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollmanager.d.ts","sourceRoot":"","sources":["../../../src/plugins/vast-ads/rollmanager.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,IAAI,EAAE,MAAM,EAAuD,MAAM,cAAc,CAAC;AAMzI,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAc,UAAU,EAAkB,MAAM,YAAY,CAAC;AAEhF,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAAM;IAqC3C,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,UAAU;IA7CpB,OAAO,CAAC,cAAc,CAAS;IAE/B,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,SAAS,CAAY;IAE7B,OAAO,CAAC,QAAQ,CAAc;IAE9B,OAAO,CAAC,cAAc,CAAiB;IAEvC,OAAO,CAAC,SAAS,CAAW;IAE5B,OAAO,CAAC,eAAe,CAAmB;IAE1C,OAAO,CAAC,aAAa,CAAoB;IAEzC,OAAO,CAAC,mBAAmB,CAAkB;IAE7C,OAAO,CAAC,WAAW,CAA6B;IAIhD,OAAO,CAAC,SAAS,CAA8B;IAE/C,OAAO,CAAC,iBAAiB,CAAK;IAE9B,OAAO,CAAC,aAAa,CAA4B;IAEjD,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,OAAO,CAA0B;IAEzC,OAAO,CAAC,GAAG,CAAS;IAEpB,OAAO,CAAC,IAAI,CAAqB;gBAGvB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,EAAE,WAAW,EACvB,YAAY,EAAE,WAAW,EACzB,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM;IAqB5B,OAAO,CAAC,cAAc;IA6BtB,YAAY,CAAC,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAMjD,OAAO,CAAC,WAAW;IAInB,UAAU;IAIV,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,YAAY;IAUpB,mBAAmB;IAUnB,oBAAoB;IAOd,SAAS;IA+BT,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU;IAmDhD,gBAAgB;IAOhB,OAAO,CAAC,UAAU;IAQlB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAgCxB,MAAM,CAAC,GAAG,EAAE,MAAM;IAwDxB,UAAU,CAAC,YAAY,EAAE,GAAG;IAiB5B,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG;IAInC;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,GAAG;IAcjC,iBAAiB;IAejB,WAAW;CASZ"}
|