@profitlich/template-toolkit 2.18.1 → 2.18.4

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'],
@@ -105,7 +108,7 @@ export class MuxPlayer {
105
108
 
106
109
  console.log(
107
110
  'Toolkit Video',
108
- 'width:',container.getBoundingClientRect().width,
111
+ 'width:', container.getBoundingClientRect().width,
109
112
  'height:', container.getBoundingClientRect().height,
110
113
  'aspectRatio:', aspectRatio
111
114
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profitlich/template-toolkit",
3
- "version": "2.18.1",
3
+ "version": "2.18.4",
4
4
  "description": "Shared SCSS layout system, JS utilities, components and build scripts for profitlich template repos",
5
5
  "type": "module",
6
6
  "exports": {