eb-player 2.3.0 → 2.3.1

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.
@@ -3341,6 +3341,26 @@
3341
3341
  flex-direction: row-reverse;
3342
3342
  }
3343
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
+ [dir="rtl"] .eb-chapter-marker {
3356
+ transform: translateX(50%);
3357
+ }
3358
+
3359
+ [dir="rtl"] .eb-epg-segment {
3360
+ border-right: none;
3361
+ border-left: 1px solid rgba(255, 255, 255, 0.3);
3362
+ }
3363
+
3344
3364
  /* ============================================================
3345
3365
  Responsive: ensure container fills parent
3346
3366
  ============================================================ */
@@ -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.0";
7
+ var __EB_PLAYER_VERSION__ = "2.3.1";
8
8
 
9
9
  /**
10
10
  * Finite State Machine for player playback state transitions.
@@ -1525,7 +1525,7 @@
1525
1525
  return null;
1526
1526
  }
1527
1527
  // ---- EPG helpers ----
1528
- renderEpgSegments(programs) {
1528
+ renderEpgSegments(programs, isRtl) {
1529
1529
  if (programs.length === 0)
1530
1530
  return [];
1531
1531
  // Compute the time window from first program start to last program end
@@ -1536,13 +1536,18 @@
1536
1536
  return [];
1537
1537
  const now = Date.now();
1538
1538
  return programs.map((program) => {
1539
- const leftPercent = ((program.start - windowStart) / windowDuration) * 100;
1539
+ const startPercent = ((program.start - windowStart) / windowDuration) * 100;
1540
1540
  const widthPercent = ((program.end - program.start) / windowDuration) * 100;
1541
1541
  const isCurrent = now >= program.start && now < program.end;
1542
+ // RTL mirrors the timeline: anchor from the track's inline-start edge
1543
+ // (right in RTL) instead of always anchoring from the physical left.
1544
+ const positionStyle = isRtl
1545
+ ? `right: ${startPercent.toFixed(2)}%; width: ${widthPercent.toFixed(2)}%`
1546
+ : `left: ${startPercent.toFixed(2)}%; width: ${widthPercent.toFixed(2)}%`;
1542
1547
  return b `
1543
1548
  <div
1544
1549
  class="eb-epg-segment${isCurrent ? ' eb-epg-current' : ''}"
1545
- style="left: ${leftPercent.toFixed(2)}%; width: ${widthPercent.toFixed(2)}%"
1550
+ style="${positionStyle}"
1546
1551
  title="${program.title}"
1547
1552
  ></div>
1548
1553
  `;
@@ -1550,7 +1555,7 @@
1550
1555
  }
1551
1556
  // ---- Template ----
1552
1557
  template() {
1553
- const { currentTime, duration, bufferedEnd, adPlaying, introStreamPlaying, chapters, epgPrograms } = this.state;
1558
+ const { currentTime, duration, bufferedEnd, adPlaying, introStreamPlaying, chapters, epgPrograms, isRtl } = this.state;
1554
1559
  const isSeekbarHidden = !this.config.seekbar;
1555
1560
  const isDisabled = adPlaying || introStreamPlaying;
1556
1561
  // Progress percentage — use dragValue during drag to prevent live-update jitter
@@ -1563,12 +1568,17 @@
1563
1568
  const activeChapter = this.findActiveChapter(chapters);
1564
1569
  const skippableEntry = activeChapter !== null ? this.findSkippableChapter(activeChapter) : null;
1565
1570
  const chapterMarkers = chapters.map((chapter) => {
1566
- const leftPercent = duration > 0 ? (chapter.startTime / duration) * 100 : 0;
1571
+ const positionPercent = duration > 0 ? (chapter.startTime / duration) * 100 : 0;
1567
1572
  const isActive = chapter === activeChapter;
1573
+ // RTL mirrors the timeline: anchor from the track's inline-start edge
1574
+ // (right in RTL) instead of always anchoring from the physical left.
1575
+ const positionStyle = isRtl
1576
+ ? `right: ${positionPercent.toFixed(2)}%`
1577
+ : `left: ${positionPercent.toFixed(2)}%`;
1568
1578
  return b `
1569
1579
  <div
1570
1580
  class="eb-chapter-marker${isActive ? ' eb-chapter-active' : ''}"
1571
- style="left: ${leftPercent.toFixed(2)}%"
1581
+ style="${positionStyle}"
1572
1582
  title="${chapter.title}"
1573
1583
  ></div>
1574
1584
  `;
@@ -1583,7 +1593,7 @@
1583
1593
  `
1584
1594
  : b ``;
1585
1595
  // EPG segments
1586
- const epgSegments = this.renderEpgSegments(epgPrograms);
1596
+ const epgSegments = this.renderEpgSegments(epgPrograms, isRtl);
1587
1597
  // Tooltip — for live streams, show wall-clock time at hovered position
1588
1598
  const tooltipTimeText = this.state.isLive && Number.isFinite(duration)
1589
1599
  ? formatWallClock(Date.now() - (duration - this.tooltipTime) * 1000)