@gcorevideo/player 2.22.13 → 2.22.14

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.
Files changed (31) hide show
  1. package/assets/bottom-gear/gear.scss +20 -13
  2. package/assets/clappr-nerd-stats/button.ejs +2 -2
  3. package/assets/clappr-nerd-stats/clappr-nerd-stats.scss +0 -43
  4. package/assets/level-selector/button.ejs +3 -3
  5. package/assets/level-selector/style.scss +0 -5
  6. package/assets/playback-rate/button.ejs +2 -2
  7. package/dist/core.js +22 -1
  8. package/dist/index.css +599 -630
  9. package/dist/index.js +56 -40
  10. package/dist/plugins/index.css +1485 -1516
  11. package/dist/plugins/index.js +35 -40
  12. package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
  13. package/lib/playback/hls-playback/HlsPlayback.js +21 -0
  14. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
  15. package/lib/plugins/media-control/MediaControl.d.ts +4 -1
  16. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  17. package/lib/plugins/media-control/MediaControl.js +30 -14
  18. package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
  19. package/lib/plugins/playback-rate/PlaybackRate.js +1 -22
  20. package/package.json +1 -1
  21. package/src/playback/hls-playback/HlsPlayback.ts +22 -0
  22. package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +0 -1
  23. package/src/plugins/level-selector/__tests__/__snapshots__/QualityLevels.test.ts.snap +3 -3
  24. package/src/plugins/media-control/MediaControl.ts +36 -15
  25. package/src/plugins/media-control/__tests__/MediaControl.test.ts +43 -10
  26. package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +20 -20
  27. package/src/plugins/playback-rate/PlaybackRate.ts +1 -24
  28. package/src/plugins/playback-rate/__tests__/PlaybackRate.test.ts +2 -1
  29. package/tsconfig.tsbuildinfo +1 -1
  30. package/assets/clappr-nerd-stats/options-list.ejs +0 -9
  31. package/assets/clappr-nerd-stats/settings.ejs +0 -12
package/dist/index.js CHANGED
@@ -42219,6 +42219,16 @@ class HlsPlayback extends BasePlayback {
42219
42219
  this.seek(seekTo);
42220
42220
  }
42221
42221
  seek(time) {
42222
+ // trace(`${T} seek`, {
42223
+ // time,
42224
+ // duration: this._duration,
42225
+ // startTime: this._startTime,
42226
+ // currentTimestamp: this.currentTimestamp,
42227
+ // playbackType: this.getPlaybackType(),
42228
+ // dvrEnabled: this.dvrEnabled,
42229
+ // durationExcludesAfterLiveSyncPoint: this._durationExcludesAfterLiveSyncPoint,
42230
+ // minDvrSize: this._minDvrSize,
42231
+ // })
42222
42232
  if (time < 0) {
42223
42233
  Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.');
42224
42234
  time = this.getDuration();
@@ -42370,6 +42380,11 @@ class HlsPlayback extends BasePlayback {
42370
42380
  return;
42371
42381
  }
42372
42382
  this._lastTimeUpdate = update;
42383
+ // trace(`${T} _onTimeUpdate`, {
42384
+ // current: update.current,
42385
+ // total: update.total,
42386
+ // firstFragDateTime: update.firstFragDateTime,
42387
+ // })
42373
42388
  this.trigger(Events$1.PLAYBACK_TIMEUPDATE, update, this.name);
42374
42389
  }
42375
42390
  _onDurationChange() {
@@ -42640,6 +42655,12 @@ class HlsPlayback extends BasePlayback {
42640
42655
  this.trigger(Events$1.PLAYBACK_LEVEL_SWITCH_END);
42641
42656
  }
42642
42657
  get dvrEnabled() {
42658
+ // trace(`${T} dvrEnabled`, {
42659
+ // durationExcludesAfterLiveSyncPoint: this._durationExcludesAfterLiveSyncPoint,
42660
+ // duration: this._duration,
42661
+ // minDvrSize: this._minDvrSize,
42662
+ // playbackType: this.getPlaybackType(),
42663
+ // })
42643
42664
  // enabled when:
42644
42665
  // - the duration does not include content after hlsjs's live sync point
42645
42666
  // - the playable region duration is longer than the configured duration to enable dvr after
@@ -43304,7 +43325,7 @@ class Player {
43304
43325
  }
43305
43326
  }
43306
43327
 
43307
- var version$1 = "2.22.13";
43328
+ var version$1 = "2.22.14";
43308
43329
 
43309
43330
  var packages = {
43310
43331
  "node_modules/@clappr/core": {
@@ -45952,7 +45973,7 @@ function rankConnectionSpeed(dlSpeed) {
45952
45973
 
45953
45974
  const pluginHtml$4 = "<% general = metrics.general %>\n<% counters = metrics.counters %>\n<% timers = metrics.timers %>\n<% extra = metrics.extra %>\n<% custom = metrics.custom %>\n\n<div class=\"stats-box\">\n <div class=\"stats-box-top\">\n <a class=\"close-button gplayer-lite-btn\" data-close-button>\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n <g clip-path=\"url(#clip0_184_1489)\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.41376 6.00013L13.7068 -0.292872C14.0978 -0.683872 14.0978 -1.31587 13.7068 -1.70687C13.3158 -2.09787 12.6838 -2.09787 12.2928 -1.70687L5.99976 4.58613L-0.293238 -1.70687C-0.684238 -2.09787 -1.31624 -2.09787 -1.70724 -1.70687C-2.09824 -1.31587 -2.09824 -0.683872 -1.70724 -0.292872L4.58576 6.00013L-1.70724 12.2931C-2.09824 12.6841 -2.09824 13.3161 -1.70724 13.7071C-1.51224 13.9021 -1.25624 14.0001 -1.00024 14.0001C-0.744238 14.0001 -0.488238 13.9021 -0.293238 13.7071L5.99976 7.41413L12.2928 13.7071C12.4878 13.9021 12.7438 14.0001 12.9998 14.0001C13.2558 14.0001 13.5118 13.9021 13.7068 13.7071C14.0978 13.3161 14.0978 12.6841 13.7068 12.2931L7.41376 6.00013Z\"\n fill=\"white\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_184_1489\">\n <rect width=\"12\" height=\"12\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </a>\n </div>\n <div class=\"stats-box-main\">\n <ul>\n <li class=\"title\"><span>General</span></li>\n <li>\n Display resolution:\n <div><span><%= general.displayResolution %></span></div>\n </li>\n <li>\n Volume:\n <div><span><%= general.volume %></span></div>\n </li>\n <li>\n Connection speed:\n <div><span id=\"dlText\"><%= custom.connectionSpeed %></span> Mbps</div>\n </li>\n <li class=\"canvas-wrapper\">\n <canvas id=\"speedTestCanvas\" width=\"190\" height=\"20\"></canvas>\n </li>\n <li>\n Ping:\n <div><span id=\"pingText\"><%= custom.ping %></span> ms</div>\n </li>\n <li>\n Jitter:\n <div><span id=\"jitterText\"><%= custom.jitter %></span> ms</div>\n </li>\n </ul>\n\n <ul>\n <li class=\"title\"><span>Counters</span></li>\n <li>\n Plays:\n <div><span><%= counters.play %></span></div>\n </li>\n <li>\n Pauses:\n <div><span><%= counters.pause %></span></div>\n </li>\n <li>\n Errors:\n <div><span><%= counters.error %></span></div>\n </li>\n <li>\n Bufferings:\n <div><span><%= counters.buffering %></span></div>\n </li>\n <li>\n Decoded frames:\n <div><span><%= counters.decodedFrames %></span></div>\n </li>\n <li>\n Dropped frames:\n <div><span><%= counters.droppedFrames %></span></div>\n </li>\n <li>\n Frames per second:\n <div><span><%= counters.fps %></span></div>\n </li>\n <li>\n Bitrate changes:\n <div><span><%= counters.changeLevel %></span></div>\n </li>\n <li>\n Seeks:\n <div><span><%= counters.seek %></span></div>\n </li>\n <li>\n Fullscreen:\n <div><span><%= counters.fullscreen %></span></div>\n </li>\n <li>\n DVR seeks:\n <div><span><%= counters.dvrUsage %></span></div>\n </li>\n </ul>\n\n <ul>\n <li class=\"title\"><span>Timers</span></li>\n <li>\n Startup time:\n <div><span><%= timers.startup %></span></div>\n </li>\n <li>\n Watching time:\n <div><span><%= timers.watch %></span></div>\n </li>\n <li>\n Pause time:\n <div><span><%= timers.pause %></span></div>\n </li>\n <li>\n Buffering time:\n <div><span><%= timers.buffering %></span></div>\n </li>\n <li>\n Session time:\n <div><span><%= timers.session %></span></div>\n </li>\n <!-- <li>-->\n <!-- Latency:-->\n <!-- <div><span><%= timers.latency %></span></div>-->\n <!-- </li>-->\n </ul>\n\n <ul>\n <li class=\"title\"><span>Extra</span></li>\n <li>\n Playback:\n <div><span><%= extra.playbackName %></span></div>\n </li>\n <li>\n Playback type:\n <div><span><%= extra.playbackType %></span></div>\n </li>\n <li>\n Buffer size:\n <div><span><%= extra.buffersize %></span></div>\n </li>\n <li>\n Video duration:\n <div><span><%= extra.duration %></span></div>\n </li>\n <li>\n Current time:\n <div><span><%= extra.currentTime %></span></div>\n </li>\n <li>\n Bitrate weighted mean:\n <div><span><%= extra.bitrateWeightedMean %></span></div>\n </li>\n <li>\n Bitrate most used:\n <div><span><%= extra.bitrateMostUsed %></span></div>\n </li>\n <li>\n % Watched:\n <div><span><%= extra.watchedPercentage %></span></div>\n </li>\n <li>\n % Buffering:\n <div><span><%= extra.bufferingPercentage %></span></div>\n </li>\n </ul>\n </div>\n <div class=\"speedtest-summary\">\n <div class=\"speedtest-summary-header\">Your internet quality summary</div>\n <div class=\"speedtest-summary-block\">\n <div class=\"speedtest-summary-subblock\">\n <div class=\"speedtest-summary-subblock-content\">\n <div class=\"speedtest-quality\">\n <div class=\"speedtest-quality-header\">VOD: <%= custom.vodQuality %></div>\n <div class=\"speedtest-quality-content\" data-streaming-type=\"vod\">\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"speedtest-summary-subblock\">\n <div class=\"speedtest-summary-subblock-content\">\n <div class=\"speedtest-quality\">\n <div class=\"speedtest-quality-header\">Live: <%= custom.liveQuality %></div>\n <div class=\"speedtest-quality-content\" data-streaming-type=\"live\">\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"speedtest-footer\">\n <!-- <a class=\"speedtest-footer-about-link\" href=\"\" target=\"_blank\">I am not a nerd, what's this all about?</a>-->\n <button class=\"gplayer-lite-btn speedtest-btn speedtest-footer-refresh\" data-refresh-button type=\"button\">\n <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\">\n <path\n d=\"M6.03968 0.124998C3.64268 0.124998 1.67268 1.9565 1.48068 4.2915H1.00018C0.925833 4.29146 0.853156 4.31353 0.791378 4.35489C0.729601 4.39625 0.681511 4.45503 0.653218 4.52378C0.624925 4.59253 0.617705 4.66814 0.632476 4.74101C0.647248 4.81387 0.683343 4.88069 0.736177 4.933L1.57618 5.766C1.64641 5.83561 1.74129 5.87467 1.84018 5.87467C1.93906 5.87467 2.03395 5.83561 2.10418 5.766L2.94418 4.933C2.99701 4.88069 3.03311 4.81387 3.04788 4.74101C3.06265 4.66814 3.05543 4.59253 3.02714 4.52378C2.99884 4.45503 2.95075 4.39625 2.88898 4.35489C2.8272 4.31353 2.75452 4.29146 2.68018 4.2915H2.23368C2.42368 2.376 4.05268 0.874998 6.03968 0.874998C6.6948 0.873639 7.33932 1.04039 7.91158 1.35931C8.48384 1.67822 8.9647 2.13863 9.30818 2.6965C9.33331 2.73978 9.36686 2.7776 9.40684 2.80771C9.44682 2.83783 9.49243 2.85963 9.54097 2.87184C9.58951 2.88405 9.64001 2.88643 9.68948 2.87881C9.73895 2.8712 9.7864 2.85377 9.82902 2.82753C9.87165 2.80129 9.90859 2.76679 9.93767 2.72605C9.96675 2.68531 9.98739 2.63916 9.99835 2.59032C10.0093 2.54148 10.0104 2.49095 10.0015 2.44168C9.99264 2.39242 9.974 2.34544 9.94668 2.3035C9.53615 1.63664 8.96146 1.08621 8.27752 0.704805C7.59359 0.323402 6.82277 0.123774 6.03968 0.124998ZM10.4207 4.2335C10.3505 4.16419 10.2558 4.12532 10.1572 4.12532C10.0585 4.12532 9.96386 4.16419 9.89368 4.2335L9.05018 5.0665C8.9972 5.11874 8.96096 5.18557 8.94608 5.25847C8.93119 5.33137 8.93833 5.40705 8.96658 5.47588C8.99483 5.54472 9.04292 5.60359 9.10473 5.64501C9.16654 5.68644 9.23927 5.70853 9.31368 5.7085H9.76318C9.57218 7.6235 7.93768 9.125 5.94118 9.125C5.28399 9.12683 4.63729 8.96035 4.06269 8.64141C3.48808 8.32247 3.00473 7.86169 2.65868 7.303C2.63281 7.26107 2.59893 7.22465 2.55899 7.19582C2.51904 7.16699 2.47381 7.14631 2.42587 7.13495C2.37793 7.1236 2.32823 7.1218 2.27959 7.12966C2.23096 7.13752 2.18435 7.15488 2.14243 7.18075C2.05776 7.233 1.99731 7.31674 1.97438 7.41355C1.95146 7.51037 1.96793 7.61233 2.02018 7.697C2.43345 8.36457 3.01076 8.91521 3.69713 9.29647C4.38349 9.67772 5.15604 9.87689 5.94118 9.875C8.34518 9.875 10.3237 8.045 10.5162 5.7085H11.0002C11.0746 5.70853 11.1473 5.68644 11.2091 5.64501C11.2709 5.60359 11.319 5.54472 11.3473 5.47588C11.3755 5.40705 11.3827 5.33137 11.3678 5.25847C11.3529 5.18557 11.3167 5.11874 11.2637 5.0665L10.4207 4.2335Z\"\n fill=\"white\"/>\n </svg>\n Refresh\n </button>\n </div>\n</div>\n";
45954
45975
 
45955
- const buttonHtml$3 = "<button class='nerd-button gplayer-lite-btn gcore-skin-text-color gear-option' id=\"nerd-stats-button\">\n <span class=\"stats-icon\"><%= icon %></span>\n <span><%= i18n.t('statistics') %></span>\n</button>\n";
45976
+ const buttonHtml$3 = "<button class='nerd-button gplayer-lite-btn gcore-skin-text-color gear-option' id=\"nerd-stats-button\">\n <span class=\"gear-option_icon\"><%= icon %></span>\n <span class=\"gear-option_label\"><%= i18n.t('statistics') %></span>\n</button>\n";
45956
45977
 
45957
45978
  const statsIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M9.16675 14.1667H10.8334V9.16666H9.16675V14.1667ZM10.0001 7.5C10.2362 7.5 10.4342 7.42 10.5942 7.26C10.7542 7.1 10.834 6.90222 10.8334 6.66666C10.8334 6.43055 10.7534 6.2325 10.5934 6.0725C10.4334 5.9125 10.2356 5.83278 10.0001 5.83333C9.76397 5.83333 9.56591 5.91333 9.40591 6.07333C9.24591 6.23333 9.16619 6.43111 9.16675 6.66666C9.16675 6.90278 9.24675 7.10083 9.40675 7.26083C9.56675 7.42083 9.76453 7.50055 10.0001 7.5ZM10.0001 18.3333C8.8473 18.3333 7.76397 18.1144 6.75008 17.6767C5.73619 17.2389 4.85425 16.6453 4.10425 15.8958C3.35425 15.1458 2.76064 14.2639 2.32341 13.25C1.88619 12.2361 1.6673 11.1528 1.66675 10C1.66675 8.84722 1.88564 7.76389 2.32341 6.75C2.76119 5.73611 3.3548 4.85416 4.10425 4.10416C4.85425 3.35416 5.73619 2.76055 6.75008 2.32333C7.76397 1.88611 8.8473 1.66722 10.0001 1.66666C11.1529 1.66666 12.2362 1.88555 13.2501 2.32333C14.264 2.76111 15.1459 3.35472 15.8959 4.10416C16.6459 4.85416 17.2398 5.73611 17.6776 6.75C18.1154 7.76389 18.334 8.84722 18.3334 10C18.3334 11.1528 18.1145 12.2361 17.6767 13.25C17.239 14.2639 16.6454 15.1458 15.8959 15.8958C15.1459 16.6458 14.264 17.2397 13.2501 17.6775C12.2362 18.1153 11.1529 18.3339 10.0001 18.3333ZM10.0001 16.6667C11.8612 16.6667 13.4376 16.0208 14.7292 14.7292C16.0209 13.4375 16.6667 11.8611 16.6667 10C16.6667 8.13889 16.0209 6.5625 14.7292 5.27083C13.4376 3.97916 11.8612 3.33333 10.0001 3.33333C8.13897 3.33333 6.56258 3.97916 5.27091 5.27083C3.97925 6.5625 3.33341 8.13889 3.33341 10C3.33341 11.8611 3.97925 13.4375 5.27091 14.7292C6.56258 16.0208 8.13897 16.6667 10.0001 16.6667Z\" fill=\"#FFFFFF\"/>\n</svg>\n";
45958
45979
 
@@ -47990,8 +48011,10 @@ class MediaControl extends UICorePlugin {
47990
48011
  kibo;
47991
48012
  lastMouseX = 0;
47992
48013
  lastMouseY = 0;
47993
- needsUpdate = false;
48014
+ metadataLoaded = false;
48015
+ hasUpdate = false;
47994
48016
  persistConfig;
48017
+ renderTimerId = null;
47995
48018
  rendered = false;
47996
48019
  settings = INITIAL_SETTINGS;
47997
48020
  userDisabled = false;
@@ -48177,8 +48200,10 @@ class MediaControl extends UICorePlugin {
48177
48200
  this.listenTo(this.core.activeContainer, Events$1.CONTAINER_ENDED, this.ended);
48178
48201
  this.listenTo(this.core.activeContainer, Events$1.CONTAINER_VOLUME, this.onVolumeChanged);
48179
48202
  this.listenTo(this.core.activeContainer, Events$1.CONTAINER_OPTIONS_CHANGE, this.setInitialVolume);
48180
- // wait until the metadata has loaded and then check if fullscreen on video tag is supported
48181
- this.listenToOnce(this.core.activeContainer, Events$1.CONTAINER_LOADEDMETADATA, this.onLoadedMetadata);
48203
+ this.listenTo(this.core.activeContainer, Events$1.CONTAINER_LOADEDMETADATA, this.onLoadedMetadata);
48204
+ this.listenTo(this.core, Events$1.CONTAINER_DESTROYED, () => {
48205
+ this.cancelRenderTimer();
48206
+ });
48182
48207
  }
48183
48208
  /**
48184
48209
  * Hides the media control UI
@@ -48221,13 +48246,17 @@ class MediaControl extends UICorePlugin {
48221
48246
  // TODO sort out, use single utility function
48222
48247
  this.fullScreenOnVideoTagSupported = true;
48223
48248
  }
48224
- this.updateSettings();
48225
- if (this.core.activeContainer.getPlaybackType() === Playback.LIVE) {
48226
- this.$el.addClass('live');
48227
- }
48228
- else {
48229
- this.$el.removeClass('live');
48230
- }
48249
+ this.renderTimerId = setTimeout(() => {
48250
+ this.renderTimerId = null;
48251
+ this.metadataLoaded = true;
48252
+ this.render();
48253
+ if (this.core.activeContainer.getPlaybackType() === Playback.LIVE) {
48254
+ this.$el.addClass('live');
48255
+ }
48256
+ else {
48257
+ this.$el.removeClass('live');
48258
+ }
48259
+ }, 25);
48231
48260
  }
48232
48261
  updateVolumeUI() {
48233
48262
  // this will be called after a render
@@ -48451,6 +48480,7 @@ class MediaControl extends UICorePlugin {
48451
48480
  }
48452
48481
  onActiveContainerChanged() {
48453
48482
  this.fullScreenOnVideoTagSupported = false;
48483
+ this.metadataLoaded = false;
48454
48484
  // set the new container to match the volume of the last one
48455
48485
  this.setInitialVolume();
48456
48486
  this.changeTogglePlay();
@@ -48672,7 +48702,7 @@ class MediaControl extends UICorePlugin {
48672
48702
  const settingsChanged = serializeSettings(this.settings) !== serializeSettings(newSettings);
48673
48703
  if (settingsChanged) {
48674
48704
  this.settings = newSettings;
48675
- this.needsUpdate = true;
48705
+ this.hasUpdate = true;
48676
48706
  this.render();
48677
48707
  }
48678
48708
  }
@@ -48901,6 +48931,7 @@ class MediaControl extends UICorePlugin {
48901
48931
  * @internal
48902
48932
  */
48903
48933
  destroy() {
48934
+ this.cancelRenderTimer();
48904
48935
  $(document).unbind('mouseup', this.stopDrag);
48905
48936
  $(document).unbind('mousemove', this.updateDrag);
48906
48937
  $(document).unbind('touchend', this.stopDrag);
@@ -48908,6 +48939,12 @@ class MediaControl extends UICorePlugin {
48908
48939
  this.unbindKeyEvents();
48909
48940
  return super.destroy();
48910
48941
  }
48942
+ cancelRenderTimer() {
48943
+ if (this.renderTimerId) {
48944
+ clearTimeout(this.renderTimerId);
48945
+ this.renderTimerId = null;
48946
+ }
48947
+ }
48911
48948
  configure() {
48912
48949
  this.trigger(Events$1.MEDIACONTROL_OPTIONS_CHANGE);
48913
48950
  }
@@ -48915,8 +48952,8 @@ class MediaControl extends UICorePlugin {
48915
48952
  * @internal
48916
48953
  */
48917
48954
  render() {
48918
- trace(`${T$a} render`, { needsUpdate: this.needsUpdate });
48919
- if (!this.needsUpdate) {
48955
+ trace(`${T$a} render`, { needsUpdate: this.hasUpdate, metadataLoaded: this.metadataLoaded });
48956
+ if (!this.hasUpdate || !this.metadataLoaded) {
48920
48957
  return this;
48921
48958
  }
48922
48959
  const timeout = this.options.hideMediaControlDelay || 2000;
@@ -48966,7 +49003,7 @@ class MediaControl extends UICorePlugin {
48966
49003
  this.core.$el.append(this.el);
48967
49004
  this.rendered = true;
48968
49005
  this.updateVolumeUI();
48969
- this.needsUpdate = false;
49006
+ this.hasUpdate = false;
48970
49007
  // TODO setTimeout?
48971
49008
  this.trigger(Events$1.MEDIACONTROL_RENDERED);
48972
49009
  return this;
@@ -49541,7 +49578,7 @@ class PictureInPicture extends UICorePlugin {
49541
49578
  }
49542
49579
  }
49543
49580
 
49544
- const buttonHtml$1 = "<button class='gplayer-lite-btn gcore-skin-text-color gear-option' id=\"playback-rate-button\">\n <span class=\"gear-option_speed-icon\"><%= speedIcon %></span>\n <span class=\"gear-option_label\"><%= i18n.t('playback_rate') %></span>\n <span class=\"gear-option_arrow-right-icon\"><%= arrowRightIcon %></span>\n <span class='gear-option_value'><%= title %></span>\n</button>\n";
49581
+ const buttonHtml$1 = "<button class='gplayer-lite-btn gcore-skin-text-color gear-option' id=\"playback-rate-button\">\n <span class=\"gear-option_speed-icon gear-option_icon\"><%= speedIcon %></span>\n <span class=\"gear-option_label\"><%= i18n.t('playback_rate') %></span>\n <span class='gear-option_value'><%= title %></span>\n <span class=\"gear-option_arrow-right-icon\"><%= arrowRightIcon %></span>\n</button>\n";
49545
49582
 
49546
49583
  const listHtml$1 = "<button class=\"gplayer-lite-btn go-back gcore-skin-text-color\" id=\"playback-rate-back-button\">\n <span class=\"arrow-left-icon\"><%= arrowLeftIcon %></span>\n <%= i18n.t('playback_rate') %>\n</button>\n<ul class=\"gear-sub-menu\" id=\"playback-rate-menu\">\n <% for (const item of playbackRates) { %>\n <li<%= item.value === current ? ' class=\"current\"' : '' %>>\n <a href=\"#\" class=\"gear-sub-menu_btn gcore-skin-text-color<%= item.value === current ? ' gcore-skin-active' : '' %>\" data-rate=\"<%= item.value %>\">\n <span class=\"check-icon\"><%= checkIcon %></span>\n <%= item.label %>\n </a>\n </li>\n <% } %>\n</ul>";
49547
49584
 
@@ -49600,7 +49637,6 @@ class PlaybackRate extends UICorePlugin {
49600
49637
  // private prevSelectedRate: string | undefined
49601
49638
  selectedRate = DEFAULT_PLAYBACK_RATE;
49602
49639
  metadataLoaded = false;
49603
- // private playbackSettingsUpdateReceived = false
49604
49640
  mountTimerId = null;
49605
49641
  /**
49606
49642
  * @internal
@@ -49661,14 +49697,8 @@ class PlaybackRate extends UICorePlugin {
49661
49697
  onActiveContainerChange() {
49662
49698
  trace(`${T$7} onActiveContainerChange`);
49663
49699
  this.metadataLoaded = false;
49664
- // this.playbackSettingsUpdateReceived = false
49665
49700
  this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_STOP, this.onStop);
49666
49701
  this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
49667
- // this.listenTo(
49668
- // this.core.activePlayback,
49669
- // Events.PLAYBACK_SETTINGSUPDATE,
49670
- // this.onSettingsUpdate,
49671
- // )
49672
49702
  this.listenTo(this.core.activePlayback, PlaybackEvents.PLAYBACK_RATE_CHANGED, this.onPlaybackRateChange);
49673
49703
  this.listenTo(this.core.activeContainer, Events$1.CONTAINER_LOADEDMETADATA, this.onMetaDataLoaded);
49674
49704
  }
@@ -49697,27 +49727,13 @@ class PlaybackRate extends UICorePlugin {
49697
49727
  i18n: this.core.i18n,
49698
49728
  })));
49699
49729
  }
49700
- // private onSettingsUpdate() {
49701
- // trace(`${T} onSettingsUpdate`, {
49702
- // playbackType: this.core.activePlayback.getPlaybackType(),
49703
- // dvrEnabled: this.core.activePlayback.dvrEnabled,
49704
- // })
49705
- // this.playbackSettingsUpdateReceived = true
49706
- // if (this.metadataLoaded) {
49707
- // if (this.mountTimerId) {
49708
- // clearTimeout(this.mountTimerId)
49709
- // this.mountTimerId = null
49710
- // }
49711
- // this.mount()
49712
- // }
49713
- // }
49714
49730
  onMetaDataLoaded() {
49715
49731
  trace(`${T$7} onMetaDataLoaded`, {
49716
49732
  playbackType: this.core.activePlayback.getPlaybackType(),
49717
49733
  dvrEnabled: this.core.activePlayback.dvrEnabled,
49718
49734
  });
49719
- this.metadataLoaded = true;
49720
49735
  this.mountTimerId = setTimeout(() => {
49736
+ this.metadataLoaded = true;
49721
49737
  this.mountTimerId = null;
49722
49738
  this.mount();
49723
49739
  }, 25);
@@ -50140,7 +50156,7 @@ class Poster extends UIContainerPlugin {
50140
50156
  }
50141
50157
  }
50142
50158
 
50143
- const buttonHtml = "<button class='gplayer-lite-btn gcore-skin-text-color gear-option' aria-haspopup=\"menu\">\n <span class=\"gear-option_hd-icon<%= isHd ? '' : ' hidden' %>\"><%= hdIcon %></span>\n <span><%= i18n.t('quality') %></span>\n <span class=\"gear-option_arrow-right-icon\"><%= arrowRightIcon %></span>\n <span class='gear-option_value'><%= currentText %></span>\n</button>\n";
50159
+ const buttonHtml = "<button class='gplayer-lite-btn gcore-skin-text-color gear-option' aria-haspopup=\"menu\">\n <span class=\"gear-option_icon<%= isHd ? '' : ' hidden' %>\"><%= hdIcon %></span>\n <span class=\"gear-option_label\"><%= i18n.t('quality') %></span>\n <span class='gear-option_value'><%= currentText %></span>\n <span class=\"gear-option_arrow-right-icon\"><%= arrowRightIcon %></span>\n</button>\n";
50144
50160
 
50145
50161
  const listHtml = "<button class=\"gplayer-lite-btn go-back gcore-skin-text-color\" id=\"level-selector-back-button\">\n <span class=\"arrow-left-icon\"><%= arrowLeftIcon %></span>\n <%= i18n.t('quality') %>\n</button>\n<ul class=\"gear-sub-menu quality-levels\" id=\"level-selector-menu\" role=\"menu\">\n <% if (!removeAuto) { %>\n <li>\n <a href=\"#\" class='gear-sub-menu_btn gcore-skin-text-color' data-id=\"-1\" id=\"level_selector_auto\">\n <span class=\"check-icon\"><%= checkIcon %></span>\n <%= i18n.t('auto') %>\n </a>\n </li>\n <% } %>\n <% for (const item of levels.slice().reverse()) {\n var disabled = maxLevel >= 0 && item.level > maxLevel\n var checked = item.level === current\n %>\n <li class=\"<%= disabled ? ' disabled' : ''%><%=checked ? ' current' : ''%>\">\n <a href=\"#\"\n class=\"gear-sub-menu_btn gcore-skin-text-color<%= checked ? ' gcore-skin-active' : '' %>\"\n data-id=\"<%= item.level %>\"\n data-disabled=\"<%= disabled %>\"\n data-checked=\"<%= checked %>\"\n role=\"menuitemradio\"\n id=\"level_selector_<%= item.width > item.height ? item.height : item.width %>\"\n >\n <span class=\"check-icon\"><%= checkIcon %></span>\n <%= labels[item.level] %>\n </a>\n </li>\n <% } %>\n</ul>\n";
50146
50162