@cntrl-site/sdk 1.25.10 → 1.25.11

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.
@@ -87,8 +87,13 @@ class ScrollPlaybackVideoManager {
87
87
  this.video.pause();
88
88
  this.video.load();
89
89
  this.container.appendChild(this.video);
90
- const browserEngine = new ua_parser_js_1.default().getEngine();
90
+ const ua = new ua_parser_js_1.default();
91
+ const browserEngine = ua.getEngine();
91
92
  this.isSafari = browserEngine.name === 'WebKit';
93
+ const deviceType = ua.getDevice().type;
94
+ if (deviceType === 'mobile' || deviceType === 'tablet') {
95
+ this.useWebCodecs = false;
96
+ }
92
97
  if (this.debug && this.isSafari)
93
98
  console.info('Safari browser detected');
94
99
  this.video.addEventListener('loadedmetadata', () => this.setTargetTimePercent(0, true), { once: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.25.10",
3
+ "version": "1.25.11",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -8,6 +8,7 @@
8
8
  "test": "jest",
9
9
  "prebuild": "rimraf ./lib",
10
10
  "build": "tsc --project tsconfig.build.json",
11
+ "build:watch": "tsc --watch --project tsconfig.build.json",
11
12
  "prepublishOnly": "cross-env NODE_ENV=production npm run build"
12
13
  },
13
14
  "bin": {