eb-player 2.3.1 → 2.4.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.
@@ -124,7 +124,7 @@
124
124
  /* Row 2: live-sync pushed to the right */
125
125
  [data-theme="forja"] .eb-player .eb-slot-live-sync {
126
126
  order: 1;
127
- margin-left: auto;
127
+ margin-inline-start: auto;
128
128
  }
129
129
 
130
130
  [data-theme="forja"] .eb-player .eb-slot-settings,
@@ -285,7 +285,7 @@
285
285
  [data-theme="forja"] .eb-player .eb-seekbar-thumb {
286
286
  width: 12px;
287
287
  height: 12px;
288
- right: -6px;
288
+ inset-inline-end: -6px;
289
289
  background: #FC013B;
290
290
  box-shadow: none;
291
291
  border-radius: 50%;
@@ -323,12 +323,12 @@
323
323
  height: 11px;
324
324
  background: #fff;
325
325
  box-shadow: none;
326
- transform: translate(-50%, -50%) scale(0);
326
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(0);
327
327
  transition: transform .15s;
328
328
  }
329
329
 
330
330
  [data-theme="forja"] .eb-player .eb-volume-control:hover .eb-volume-thumb {
331
- transform: translate(-50%, -50%) scale(1);
331
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(1);
332
332
  }
333
333
 
334
334
  /* ============================================================
@@ -767,7 +767,7 @@
767
767
  [data-theme="lequipe"] .eb-player .eb-seekbar-thumb {
768
768
  width: 14px;
769
769
  height: 14px;
770
- right: -7px;
770
+ inset-inline-end: -7px;
771
771
  background: #fff;
772
772
  box-shadow: 0 0 0 3px rgba(214,30,0,.45);
773
773
  }
@@ -808,7 +808,7 @@
808
808
  background: rgba(0,0,0,.45);
809
809
  border-radius: 1px;
810
810
  top: 50%;
811
- transform: translate(-50%, -50%);
811
+ transform: translate(var(--eb-chapter-marker-x, -50%), -50%);
812
812
  }
813
813
 
814
814
  /* ============================================================
@@ -817,7 +817,7 @@
817
817
  [data-theme="lequipe"] .eb-player .eb-volume-control {
818
818
  flex-direction: row;
819
819
  gap: 0;
820
- margin-right: 0;
820
+ margin-inline-end: 0;
821
821
  }
822
822
 
823
823
  [data-theme="lequipe"] .eb-player .eb-volume-track {
@@ -845,12 +845,12 @@
845
845
  height: 11px;
846
846
  background: #fff;
847
847
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
848
- transform: translate(-50%, -50%) scale(0);
848
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(0);
849
849
  transition: transform .15s;
850
850
  }
851
851
 
852
852
  [data-theme="lequipe"] .eb-player .eb-volume-control:hover .eb-volume-thumb {
853
- transform: translate(-50%, -50%) scale(1);
853
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(1);
854
854
  }
855
855
 
856
856
  /* ============================================================
@@ -971,7 +971,7 @@
971
971
  border: none;
972
972
  background: none;
973
973
  cursor: pointer;
974
- text-align: left;
974
+ text-align: start;
975
975
  }
976
976
 
977
977
  [data-theme="lequipe"] .eb-player .eb-settings-category:last-child {
@@ -1074,7 +1074,7 @@
1074
1074
  border-top: none;
1075
1075
  background: none;
1076
1076
  cursor: pointer;
1077
- text-align: left;
1077
+ text-align: start;
1078
1078
  }
1079
1079
 
1080
1080
  [data-theme="lequipe"] .eb-player .eb-settings-item:last-child {
@@ -1457,7 +1457,7 @@
1457
1457
  [data-theme="modern"] .eb-player .eb-seekbar-thumb {
1458
1458
  width: 14px;
1459
1459
  height: 14px;
1460
- right: -7px;
1460
+ inset-inline-end: -7px;
1461
1461
  background: #fff;
1462
1462
  box-shadow: 0 0 0 3px rgba(124,58,237,.45);
1463
1463
  }
@@ -1490,7 +1490,7 @@
1490
1490
  background: rgba(0,0,0,.45);
1491
1491
  border-radius: 1px;
1492
1492
  top: 50%;
1493
- transform: translate(-50%, -50%);
1493
+ transform: translate(var(--eb-chapter-marker-x, -50%), -50%);
1494
1494
  }
1495
1495
 
1496
1496
  /* ============================================================
@@ -1499,7 +1499,7 @@
1499
1499
  [data-theme="modern"] .eb-player .eb-volume-control {
1500
1500
  flex-direction: row;
1501
1501
  gap: 0;
1502
- margin-right: 0;
1502
+ margin-inline-end: 0;
1503
1503
  }
1504
1504
 
1505
1505
  [data-theme="modern"] .eb-player .eb-volume-track {
@@ -1527,12 +1527,12 @@
1527
1527
  height: 11px;
1528
1528
  background: #fff;
1529
1529
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
1530
- transform: translate(-50%, -50%) scale(0);
1530
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(0);
1531
1531
  transition: transform .15s;
1532
1532
  }
1533
1533
 
1534
1534
  [data-theme="modern"] .eb-player .eb-volume-control:hover .eb-volume-thumb {
1535
- transform: translate(-50%, -50%) scale(1);
1535
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(1);
1536
1536
  }
1537
1537
 
1538
1538
  /* ============================================================
@@ -1720,7 +1720,7 @@
1720
1720
  /* Time display sits before seekbar visually (after live badge) */
1721
1721
  [data-theme="modern"] .eb-player .eb-slot-time {
1722
1722
  order: -1;
1723
- margin-left: auto;
1723
+ margin-inline-start: auto;
1724
1724
  }
1725
1725
 
1726
1726
  /* Live sync badge before time */
@@ -1730,7 +1730,7 @@
1730
1730
 
1731
1731
  /* Move settings + pip to right end of control row */
1732
1732
  [data-theme="modern"] .eb-player .eb-slot-settings {
1733
- margin-left: auto;
1733
+ margin-inline-start: auto;
1734
1734
  }
1735
1735
 
1736
1736
  /* ============================================================
@@ -1903,7 +1903,7 @@
1903
1903
 
1904
1904
  /* Align row 1 with the seekbar: offset by play-pause width (38px) + gap (8px) */
1905
1905
  [data-theme="v2"] .eb-player .eb-slot-live-sync {
1906
- margin-left: calc(38px + 8px);
1906
+ margin-inline-start: calc(38px + 8px);
1907
1907
  }
1908
1908
 
1909
1909
  /* Invisible full-width flex break between row 1 and row 2 */
@@ -2117,7 +2117,7 @@
2117
2117
  [data-theme="v2"] .eb-player .eb-seekbar-thumb {
2118
2118
  width: 14px;
2119
2119
  height: 14px;
2120
- right: -7px;
2120
+ inset-inline-end: -7px;
2121
2121
  background: #fff;
2122
2122
  box-shadow: 0 0 0 3px rgba(61,64,151,.45);
2123
2123
  }
@@ -2158,7 +2158,7 @@
2158
2158
  background: rgba(0,0,0,.45);
2159
2159
  border-radius: 1px;
2160
2160
  top: 50%;
2161
- transform: translate(-50%, -50%);
2161
+ transform: translate(var(--eb-chapter-marker-x, -50%), -50%);
2162
2162
  }
2163
2163
 
2164
2164
  /* ============================================================
@@ -2167,7 +2167,7 @@
2167
2167
  [data-theme="v2"] .eb-player .eb-volume-control {
2168
2168
  flex-direction: row;
2169
2169
  gap: 0;
2170
- margin-right: 0;
2170
+ margin-inline-end: 0;
2171
2171
  }
2172
2172
 
2173
2173
  [data-theme="v2"] .eb-player .eb-volume-track {
@@ -2195,12 +2195,12 @@
2195
2195
  height: 11px;
2196
2196
  background: #fff;
2197
2197
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
2198
- transform: translate(-50%, -50%) scale(0);
2198
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(0);
2199
2199
  transition: transform .15s;
2200
2200
  }
2201
2201
 
2202
2202
  [data-theme="v2"] .eb-player .eb-volume-control:hover .eb-volume-thumb {
2203
- transform: translate(-50%, -50%) scale(1);
2203
+ transform: translate(var(--eb-volume-thumb-x, -50%), -50%) scale(1);
2204
2204
  }
2205
2205
 
2206
2206
  /* ============================================================
@@ -2581,7 +2581,7 @@
2581
2581
  display: flex;
2582
2582
  align-items: center;
2583
2583
  gap: 4px;
2584
- margin-left: auto;
2584
+ margin-inline-start: auto;
2585
2585
  }
2586
2586
 
2587
2587
  /* ============================================================
@@ -2718,7 +2718,7 @@
2718
2718
 
2719
2719
  .eb-extension-controls-extra {
2720
2720
  bottom: 0;
2721
- right: 0;
2721
+ inset-inline-end: 0;
2722
2722
  display: flex;
2723
2723
  align-items: center;
2724
2724
  gap: 4px;
@@ -2757,7 +2757,7 @@
2757
2757
  display: flex;
2758
2758
  align-items: center;
2759
2759
  gap: 4px;
2760
- margin-right: 8px;
2760
+ margin-inline-end: 8px;
2761
2761
  }
2762
2762
 
2763
2763
  .eb-volume-track {
@@ -2772,7 +2772,7 @@
2772
2772
  .eb-volume-fill {
2773
2773
  position: absolute;
2774
2774
  top: 0;
2775
- left: 0;
2775
+ inset-inline-start: 0;
2776
2776
  height: 100%;
2777
2777
  background: var(--eb-color-volume, var(--eb-color-primary, #fff));
2778
2778
  border-radius: 2px;
@@ -2786,7 +2786,9 @@
2786
2786
  height: 10px;
2787
2787
  border-radius: 50%;
2788
2788
  background: var(--eb-color-volume, var(--eb-color-primary, #fff));
2789
- transform: translate(-50%, -50%);
2789
+ /* Centre on the inline-start offset; the sign flips under RTL (see RTL block) */
2790
+ --eb-volume-thumb-x: -50%;
2791
+ transform: translate(var(--eb-volume-thumb-x), -50%);
2790
2792
  pointer-events: none;
2791
2793
  }
2792
2794
 
@@ -2865,7 +2867,7 @@
2865
2867
  color: #fff;
2866
2868
  cursor: pointer;
2867
2869
  font-size: 12px;
2868
- text-align: left;
2870
+ text-align: start;
2869
2871
  }
2870
2872
 
2871
2873
  .eb-settings-back {
@@ -2912,7 +2914,7 @@
2912
2914
  .eb-seekbar-buffered {
2913
2915
  position: absolute;
2914
2916
  top: 0;
2915
- left: 0;
2917
+ inset-inline-start: 0;
2916
2918
  height: 100%;
2917
2919
  background: rgba(255, 255, 255, 0.4);
2918
2920
  border-radius: 2px;
@@ -2922,7 +2924,7 @@
2922
2924
  .eb-seekbar-progress {
2923
2925
  position: absolute;
2924
2926
  top: 0;
2925
- left: 0;
2927
+ inset-inline-start: 0;
2926
2928
  height: 100%;
2927
2929
  background: var(--eb-color-progress, var(--eb-color-primary, #e53935));
2928
2930
  border-radius: 2px;
@@ -2931,7 +2933,7 @@
2931
2933
 
2932
2934
  .eb-seekbar-thumb {
2933
2935
  position: absolute;
2934
- right: -6px;
2936
+ inset-inline-end: -6px;
2935
2937
  top: 50%;
2936
2938
  width: 12px;
2937
2939
  height: 12px;
@@ -2991,7 +2993,9 @@
2991
2993
  width: 3px;
2992
2994
  height: 100%;
2993
2995
  background: rgba(255, 255, 255, 0.6);
2994
- transform: translateX(-50%);
2996
+ /* Centre on the inline-start offset; the sign flips under RTL (see RTL block) */
2997
+ --eb-chapter-marker-x: -50%;
2998
+ transform: translateX(var(--eb-chapter-marker-x));
2995
2999
  pointer-events: none;
2996
3000
  }
2997
3001
 
@@ -3001,7 +3005,7 @@
3001
3005
 
3002
3006
  .eb-chapter-skip {
3003
3007
  position: absolute;
3004
- right: 0;
3008
+ inset-inline-end: 0;
3005
3009
  bottom: calc(100% + 4px);
3006
3010
  background: rgba(0, 0, 0, 0.7);
3007
3011
  color: #fff;
@@ -3020,7 +3024,7 @@
3020
3024
  position: absolute;
3021
3025
  top: 0;
3022
3026
  height: 100%;
3023
- border-right: 1px solid rgba(255, 255, 255, 0.3);
3027
+ border-inline-end: 1px solid rgba(255, 255, 255, 0.3);
3024
3028
  pointer-events: none;
3025
3029
  }
3026
3030
 
@@ -3332,33 +3336,19 @@
3332
3336
 
3333
3337
  /* ============================================================
3334
3338
  RTL support
3339
+ dir="rtl" on .eb-player mirrors the whole UI natively: flex rows lay out
3340
+ right-to-left and the logical properties above (margin-inline-*,
3341
+ inset-inline-*, text-align: start) flip with it. Do not add row-reverse
3342
+ here — it cancels the native mirroring. Only elements positioned with a
3343
+ physical inline style (chapter markers use right: N% under RTL) need an
3344
+ explicit override.
3335
3345
  ============================================================ */
3336
- [dir="rtl"] .eb-bottom-bar__controls-row {
3337
- flex-direction: row-reverse;
3338
- }
3339
-
3340
- [dir="rtl"] .eb-top-bar {
3341
- flex-direction: row-reverse;
3342
- }
3343
-
3344
- [dir="rtl"] .eb-seekbar-buffered,
3345
- [dir="rtl"] .eb-seekbar-progress {
3346
- left: auto;
3347
- right: 0;
3348
- }
3349
-
3350
- [dir="rtl"] .eb-seekbar-thumb {
3351
- right: auto;
3352
- left: -6px;
3353
- }
3354
-
3355
3346
  [dir="rtl"] .eb-chapter-marker {
3356
- transform: translateX(50%);
3347
+ --eb-chapter-marker-x: 50%;
3357
3348
  }
3358
3349
 
3359
- [dir="rtl"] .eb-epg-segment {
3360
- border-right: none;
3361
- border-left: 1px solid rgba(255, 255, 255, 0.3);
3350
+ [dir="rtl"] .eb-volume-thumb {
3351
+ --eb-volume-thumb-x: 50%;
3362
3352
  }
3363
3353
 
3364
3354
  /* ============================================================
@@ -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.3.1";
7
+ var __EB_PLAYER_VERSION__ = "2.4.0";
8
8
 
9
9
  /**
10
10
  * Finite State Machine for player playback state transitions.
@@ -459,6 +459,7 @@
459
459
  hasPlaylistPicker: false,
460
460
  disableCustomAbr: true,
461
461
  lang: undefined,
462
+ rtl: undefined,
462
463
  // EPG
463
464
  epgContentId: undefined,
464
465
  epgPolling: null,
@@ -1250,7 +1251,9 @@
1250
1251
  }
1251
1252
  eventToVolume(clientX) {
1252
1253
  const rawValue = (clientX - this.trackRect.left) / this.trackRect.width;
1253
- return Math.min(1, Math.max(0, rawValue));
1254
+ // The track fills from the inline-start edge, which is the right edge under RTL.
1255
+ const value = this.state.isRtl ? 1 - rawValue : rawValue;
1256
+ return Math.min(1, Math.max(0, value));
1254
1257
  }
1255
1258
  handlePointerDown(event) {
1256
1259
  const track = event.currentTarget;
@@ -1294,7 +1297,7 @@
1294
1297
  @pointerdown="${(event) => this.handlePointerDown(event)}"
1295
1298
  >
1296
1299
  <div class="eb-volume-fill" style="width: ${fillPercent}"></div>
1297
- <div class="eb-volume-thumb" style="left: ${fillPercent}"></div>
1300
+ <div class="eb-volume-thumb" style="inset-inline-start: ${fillPercent}"></div>
1298
1301
  </div>
1299
1302
  </div>
1300
1303
  `;
@@ -4667,7 +4670,9 @@
4667
4670
  container.style.setProperty('--eb-color-volume', skinColors.volumeBar);
4668
4671
  }
4669
4672
  // Set config-derived state flags
4670
- this.state.isRtl = this.config.lang === 'ar';
4673
+ // `rtl` decouples direction from language. Undefined (the default) falls back
4674
+ // to deriving it from `lang`, preserving pre-2.4.0 behaviour exactly.
4675
+ this.state.isRtl = this.config.rtl ?? (this.config.lang === 'ar');
4671
4676
  this.state.isRadio = this.config.radio === true;
4672
4677
  // Step 3: Create SkinRoot. This runs on EVERY mount, including noUi —
4673
4678
  // SkinRoot is the only creator of the <video> element, and its own