@profitlich/template-toolkit 2.18.0 → 2.18.2

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.
@@ -74,8 +74,11 @@ export class MuxPlayer {
74
74
  if (this.#noLowRes) {
75
75
  const cssWidth = container.getBoundingClientRect().width;
76
76
  const physicalWidth = cssWidth * window.devicePixelRatio;
77
- const [arW, arH] = aspectRatio.split('/').map(s => parseFloat(s.trim()));
78
- const physicalHeight = physicalWidth * (arH / arW);
77
+ // aspectRatio funktioniert mit Zahl und mit Verhältnis (x/y)
78
+ const arRatio = aspectRatio.includes('/')
79
+ ? (([w, h]) => parseFloat(w) / parseFloat(h))(aspectRatio.split('/'))
80
+ : parseFloat(aspectRatio);
81
+ const physicalHeight = physicalWidth / arRatio;
79
82
  const tiers = [
80
83
  [270, '270p'], [360, '360p'], [480, '480p'], [540, '540p'],
81
84
  [720, '720p'], [1080, '1080p'], [1440, '1440p'], [2160, '2160p'],
@@ -103,6 +106,13 @@ export class MuxPlayer {
103
106
  player.addEventListener('pause', () => setPlaying('pause'));
104
107
  player.addEventListener('ended', () => setPlaying('ended'));
105
108
 
109
+ console.log(
110
+ 'Toolkit Video',
111
+ 'width:', container.getBoundingClientRect().width,
112
+ 'height:', container.getBoundingClientRect().height,
113
+ 'aspectRatio:', aspectRatio
114
+ );
115
+
106
116
  container.replaceWith(player);
107
117
  setPlaying('false');
108
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profitlich/template-toolkit",
3
- "version": "2.18.0",
3
+ "version": "2.18.2",
4
4
  "description": "Shared SCSS layout system, JS utilities, components and build scripts for profitlich template repos",
5
5
  "type": "module",
6
6
  "exports": {