@gcorevideo/player 2.22.14 → 2.22.15

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.
@@ -1,8 +1,16 @@
1
- <ul class="context-menu-list">
2
- <% if(options) { %>
3
- <% for (var i = 0; i < options.length; i++) { %>
4
- <li class="context-menu-list-item <%= options[i].class %>"
5
- data-<%= options[i].name %>><%= options[i].label %></li>
6
- <% } %>
1
+ <ul class="context-menu-list" role="menu" id="context-menu-options">
2
+ <% for (const item of options) { %>
3
+ <li class="context-menu-list-item <%= item.class %>">
4
+ <button role="menuitem" data-name="<%= item.name %>">
5
+ <% if (iconic) { %>
6
+ <span class="context-menu-list-item_icon"><%= item.icon || '' %></span>
7
+ <% } %>
8
+ <% if (item.labelKey) { %>
9
+ <%= i18n.t(item.labelKey) %>
10
+ <% } else { %>
11
+ <%= item.label %>
12
+ <% } %>
13
+ </button>
14
+ </li>
7
15
  <% } %>
8
16
  </ul>
@@ -22,10 +22,24 @@ $box-border-color: #666;
22
22
  border: 1px solid $box-border-color;
23
23
  border-radius: 4px;
24
24
 
25
- .context-menu-list-item {
26
- color: white;
27
- padding: 5px;
28
- cursor: pointer;
25
+ &-item {
26
+ button {
27
+ border: none;
28
+ background-color: transparent;
29
+ padding: 0;
30
+ color: white;
31
+ display: flex;
32
+ gap: 8px;
33
+ align-items: center;
34
+ justify-content: center;
35
+ cursor: pointer;
36
+ padding: 5px;
37
+ width: 100%;
38
+ }
39
+ &_icon {
40
+ width: 20px;
41
+ height: 20px;
42
+ }
29
43
  }
30
44
  }
31
45
  }
package/dist/core.js CHANGED
@@ -42133,16 +42133,6 @@ class HlsPlayback extends BasePlayback {
42133
42133
  this.seek(seekTo);
42134
42134
  }
42135
42135
  seek(time) {
42136
- // trace(`${T} seek`, {
42137
- // time,
42138
- // duration: this._duration,
42139
- // startTime: this._startTime,
42140
- // currentTimestamp: this.currentTimestamp,
42141
- // playbackType: this.getPlaybackType(),
42142
- // dvrEnabled: this.dvrEnabled,
42143
- // durationExcludesAfterLiveSyncPoint: this._durationExcludesAfterLiveSyncPoint,
42144
- // minDvrSize: this._minDvrSize,
42145
- // })
42146
42136
  if (time < 0) {
42147
42137
  Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.');
42148
42138
  time = this.getDuration();
@@ -42294,11 +42284,6 @@ class HlsPlayback extends BasePlayback {
42294
42284
  return;
42295
42285
  }
42296
42286
  this._lastTimeUpdate = update;
42297
- // trace(`${T} _onTimeUpdate`, {
42298
- // current: update.current,
42299
- // total: update.total,
42300
- // firstFragDateTime: update.firstFragDateTime,
42301
- // })
42302
42287
  this.trigger(Events$1.PLAYBACK_TIMEUPDATE, update, this.name);
42303
42288
  }
42304
42289
  _onDurationChange() {
@@ -42569,12 +42554,6 @@ class HlsPlayback extends BasePlayback {
42569
42554
  this.trigger(Events$1.PLAYBACK_LEVEL_SWITCH_END);
42570
42555
  }
42571
42556
  get dvrEnabled() {
42572
- // trace(`${T} dvrEnabled`, {
42573
- // durationExcludesAfterLiveSyncPoint: this._durationExcludesAfterLiveSyncPoint,
42574
- // duration: this._duration,
42575
- // minDvrSize: this._minDvrSize,
42576
- // playbackType: this.getPlaybackType(),
42577
- // })
42578
42557
  // enabled when:
42579
42558
  // - the duration does not include content after hlsjs's live sync point
42580
42559
  // - the playable region duration is longer than the configured duration to enable dvr after
@@ -42863,6 +42842,9 @@ class Player {
42863
42842
  * ```
42864
42843
  */
42865
42844
  attachTo(playerElement) {
42845
+ trace(`${T} attachTo`, {
42846
+ player: !!this.player,
42847
+ });
42866
42848
  assert.ok(!this.player, 'Player already initialized');
42867
42849
  assert.ok(playerElement, 'Player container element is required');
42868
42850
  if (this.config.debug === 'all' || this.config.debug === 'clappr') {
@@ -43074,9 +43056,9 @@ class Player {
43074
43056
  trace(`${T} initPlayer`, {
43075
43057
  autoPlay: coreOptions.autoPlay,
43076
43058
  sources: coreOptions.sources,
43059
+ player: !!this.player,
43077
43060
  // TODO selected options
43078
43061
  });
43079
- assert.ok(!this.player, 'Player already initialized');
43080
43062
  const player = new Player$1(coreOptions);
43081
43063
  this.player = player;
43082
43064
  this.bindCoreListeners();
@@ -43239,7 +43221,7 @@ class Player {
43239
43221
  }
43240
43222
  }
43241
43223
 
43242
- var version$1 = "2.22.14";
43224
+ var version$1 = "2.22.15";
43243
43225
 
43244
43226
  var packages = {
43245
43227
  "node_modules/@clappr/core": {