eb-player 2.0.19 → 2.0.20
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/dist/build/eb-player.css +9 -0
- package/dist/build/ebplayer.bundle.js +25 -1
- package/dist/build/ebplayer.bundle.js.map +1 -1
- package/dist/build/types/integrations/ads-manager.d.ts.map +1 -1
- package/dist/build/types/skin/skin-root.d.ts +8 -0
- package/dist/build/types/skin/skin-root.d.ts.map +1 -1
- package/dist/eb-player.css +9 -0
- package/package.json +19 -20
package/dist/build/eb-player.css
CHANGED
|
@@ -2539,6 +2539,15 @@
|
|
|
2539
2539
|
pointer-events: none;
|
|
2540
2540
|
}
|
|
2541
2541
|
|
|
2542
|
+
/* While an ad plays, raise the ads container above the player chrome (bars are
|
|
2543
|
+
z-index 30) and enable pointer-events so IMA's own ad UI — Skip button,
|
|
2544
|
+
click-through — receives clicks. At rest the container stays pointer-events:none
|
|
2545
|
+
so it never blocks clicks on the content video. */
|
|
2546
|
+
.eb-ad-playing .eb-ads-container {
|
|
2547
|
+
z-index: 40;
|
|
2548
|
+
pointer-events: auto;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2542
2551
|
/* ============================================================
|
|
2543
2552
|
Top bar
|
|
2544
2553
|
============================================================ */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EBPlayer = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
var __EB_PLAYER_VERSION__ = "2.0.
|
|
7
|
+
var __EB_PLAYER_VERSION__ = "2.0.20";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Finite State Machine for player playback state transitions.
|
|
@@ -3324,6 +3324,11 @@
|
|
|
3324
3324
|
state.on('controlsVisible', () => {
|
|
3325
3325
|
this.updateControlsVisibility();
|
|
3326
3326
|
}, { signal });
|
|
3327
|
+
// Toggle ad-playing class so the IMA ads container can receive clicks
|
|
3328
|
+
// (skip button, click-through) and sit above the player chrome during ads.
|
|
3329
|
+
state.on('adPlaying', () => {
|
|
3330
|
+
this.updateAdPlayingState();
|
|
3331
|
+
}, { signal });
|
|
3327
3332
|
}
|
|
3328
3333
|
/**
|
|
3329
3334
|
* Toggles poster image visibility based on playbackState.
|
|
@@ -3398,6 +3403,19 @@
|
|
|
3398
3403
|
inner.classList.toggle('eb-controls-visible', visible);
|
|
3399
3404
|
inner.classList.toggle('eb-controls-hidden', !visible);
|
|
3400
3405
|
}
|
|
3406
|
+
/**
|
|
3407
|
+
* Toggles the eb-ad-playing class on the player container. While an IMA ad
|
|
3408
|
+
* plays, CSS raises the ads container above the player chrome and enables
|
|
3409
|
+
* pointer-events on it so IMA's own ad UI (Skip button, click-through) is
|
|
3410
|
+
* clickable — the container is pointer-events:none at rest to avoid blocking
|
|
3411
|
+
* clicks on the content video.
|
|
3412
|
+
*/
|
|
3413
|
+
updateAdPlayingState() {
|
|
3414
|
+
const inner = this.el?.firstElementChild;
|
|
3415
|
+
if (inner == null)
|
|
3416
|
+
return;
|
|
3417
|
+
inner.classList.toggle('eb-ad-playing', this.state.adPlaying);
|
|
3418
|
+
}
|
|
3401
3419
|
/**
|
|
3402
3420
|
* Applies or removes the dir=rtl attribute without full re-render.
|
|
3403
3421
|
* More efficient than re-rendering the entire template for a simple attribute change.
|
|
@@ -3940,6 +3958,12 @@
|
|
|
3940
3958
|
// Wire event handlers for ad lifecycle
|
|
3941
3959
|
adsManager.addEventListener(ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, () => {
|
|
3942
3960
|
state.adPlaying = true;
|
|
3961
|
+
// Pause the content stream while the ad plays. IMA's integration
|
|
3962
|
+
// contract requires the publisher to pause its own content video on
|
|
3963
|
+
// CONTENT_PAUSE_REQUESTED; the symmetric CONTENT_RESUME_REQUESTED
|
|
3964
|
+
// handler below resumes it with video.play(). Without this the main
|
|
3965
|
+
// HLS/DASH stream keeps playing (audio + video) underneath the ad.
|
|
3966
|
+
video.pause();
|
|
3943
3967
|
});
|
|
3944
3968
|
adsManager.addEventListener(ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, () => {
|
|
3945
3969
|
state.adPlaying = false;
|