vidply 1.0.31 → 1.0.32

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.
@@ -109,7 +109,7 @@
109
109
  "format": "esm"
110
110
  },
111
111
  "src/controls/ControlBar.js": {
112
- "bytes": 144875,
112
+ "bytes": 145861,
113
113
  "imports": [
114
114
  {
115
115
  "path": "src/utils/DOMUtils.js",
@@ -346,7 +346,7 @@
346
346
  "format": "esm"
347
347
  },
348
348
  "src/renderers/HLSRenderer.js": {
349
- "bytes": 9900,
349
+ "bytes": 10310,
350
350
  "imports": [
351
351
  {
352
352
  "path": "src/renderers/HTML5Renderer.js",
@@ -362,7 +362,7 @@
362
362
  "format": "esm"
363
363
  },
364
364
  "src/core/Player.js": {
365
- "bytes": 209146,
365
+ "bytes": 214379,
366
366
  "imports": [
367
367
  {
368
368
  "path": "src/utils/EventEmitter.js",
@@ -473,7 +473,7 @@
473
473
  "format": "esm"
474
474
  },
475
475
  "src/features/PlaylistManager.js": {
476
- "bytes": 48411,
476
+ "bytes": 49922,
477
477
  "imports": [
478
478
  {
479
479
  "path": "src/utils/DOMUtils.js",
@@ -529,7 +529,7 @@
529
529
  },
530
530
  "bytes": 4730
531
531
  },
532
- "dist/prod/vidply.HLSRenderer-3CG7BZKA.min.js": {
532
+ "dist/prod/vidply.HLSRenderer-VWNJD2CB.min.js": {
533
533
  "imports": [
534
534
  {
535
535
  "path": "dist/prod/vidply.HTML5Renderer-KKW3OLHM.min.js",
@@ -542,10 +542,10 @@
542
542
  "entryPoint": "src/renderers/HLSRenderer.js",
543
543
  "inputs": {
544
544
  "src/renderers/HLSRenderer.js": {
545
- "bytesInOutput": 5781
545
+ "bytesInOutput": 5884
546
546
  }
547
547
  },
548
- "bytes": 5925
548
+ "bytes": 6028
549
549
  },
550
550
  "dist/prod/vidply.SoundCloudRenderer-MOR2CUFH.min.js": {
551
551
  "imports": [],
@@ -584,7 +584,7 @@
584
584
  "kind": "dynamic-import"
585
585
  },
586
586
  {
587
- "path": "dist/prod/vidply.HLSRenderer-3CG7BZKA.min.js",
587
+ "path": "dist/prod/vidply.HLSRenderer-VWNJD2CB.min.js",
588
588
  "kind": "dynamic-import"
589
589
  },
590
590
  {
@@ -609,7 +609,7 @@
609
609
  "bytesInOutput": 1009
610
610
  },
611
611
  "src/controls/ControlBar.js": {
612
- "bytesInOutput": 61881
612
+ "bytesInOutput": 62339
613
613
  },
614
614
  "src/controls/CaptionManager.js": {
615
615
  "bytesInOutput": 7279
@@ -624,7 +624,7 @@
624
624
  "bytesInOutput": 19117
625
625
  },
626
626
  "src/core/Player.js": {
627
- "bytesInOutput": 76504
627
+ "bytesInOutput": 76547
628
628
  },
629
629
  "src/features/PlaylistManager.js": {
630
630
  "bytesInOutput": 21345
@@ -633,7 +633,7 @@
633
633
  "bytesInOutput": 1869
634
634
  }
635
635
  },
636
- "bytes": 203700
636
+ "bytes": 204201
637
637
  },
638
638
  "dist/prod/vidply.de-FR3XX54P.min.js": {
639
639
  "imports": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vidply",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "Universal, accessible video & audio player with ES6 modules",
5
5
  "type": "module",
6
6
  "main": "dist/prod/vidply.esm.min.js",
@@ -715,7 +715,22 @@ export class ControlBar {
715
715
  }
716
716
 
717
717
  // 4. Playback speed button
718
- if (this.player.options.speedButton) {
718
+ // IMPORTANT: Don't rely on renderer.constructor.name here.
719
+ // In production builds, class names are minified (e.g. "class s"), which would break the check.
720
+ // Instead, detect HLS by the current source URL.
721
+ const src = this.player.currentSource
722
+ || this.player.element?.getAttribute?.('src')
723
+ || this.player.element?.currentSrc
724
+ || this.player.element?.src
725
+ || this.player.element?.querySelector?.('source')?.getAttribute?.('src')
726
+ || this.player.element?.querySelector?.('source')?.src
727
+ || '';
728
+ const isHlsSource = typeof src === 'string' && src.includes('.m3u8');
729
+ const isVideoElement = this.player.element?.tagName?.toLowerCase() === 'video';
730
+ const hideSpeedForThisPlayer =
731
+ (!!this.player.options.hideSpeedForHls && isHlsSource)
732
+ || (!!this.player.options.hideSpeedForHlsVideo && isHlsSource && isVideoElement);
733
+ if (this.player.options.speedButton && !hideSpeedForThisPlayer) {
719
734
  const btn = this.createSpeedButton();
720
735
  btn.dataset.overflowPriority = '1';
721
736
  btn.dataset.overflowPriorityMobile = '3';