@scarlett-player/gestures 1.7.0 → 1.8.0
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.
- package/dist/index.cjs +5 -2
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +5 -2
- package/package.json +7 -6
package/dist/index.cjs
CHANGED
|
@@ -350,13 +350,16 @@ var GestureOverlay = class {
|
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
352
|
|
|
353
|
+
// src/version.ts
|
|
354
|
+
var PKG_VERSION = true ? "1.7.1" : "0.0.0-dev";
|
|
355
|
+
|
|
353
356
|
// src/index.ts
|
|
354
357
|
function hasCoarsePointer() {
|
|
355
358
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
356
359
|
return false;
|
|
357
360
|
}
|
|
358
361
|
try {
|
|
359
|
-
return window.matchMedia("(pointer: coarse)").matches;
|
|
362
|
+
return window.matchMedia("(any-pointer: coarse)").matches;
|
|
360
363
|
} catch {
|
|
361
364
|
return false;
|
|
362
365
|
}
|
|
@@ -474,7 +477,7 @@ function createGesturesPlugin(config = {}) {
|
|
|
474
477
|
return {
|
|
475
478
|
id: "gestures",
|
|
476
479
|
name: "Gestures",
|
|
477
|
-
version:
|
|
480
|
+
version: PKG_VERSION,
|
|
478
481
|
type: "feature",
|
|
479
482
|
init(pluginApi) {
|
|
480
483
|
api = pluginApi;
|
package/dist/index.d.cts
CHANGED
|
@@ -58,10 +58,11 @@ interface GesturesPluginConfig {
|
|
|
58
58
|
/**
|
|
59
59
|
* Whether gestures are active.
|
|
60
60
|
*
|
|
61
|
-
* `'auto'` enables them
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
61
|
+
* `'auto'` enables them wherever the device has a coarse pointer at all
|
|
62
|
+
* (`matchMedia('(any-pointer: coarse)')`, not the primary-pointer
|
|
63
|
+
* `(pointer: coarse)`), and every individual gesture is additionally checked
|
|
64
|
+
* for `pointerType === 'touch'`, so a touchscreen laptop works with a finger
|
|
65
|
+
* and is untouched by the mouse. Never UA sniffing.
|
|
65
66
|
*
|
|
66
67
|
* @defaultValue 'auto'
|
|
67
68
|
*/
|
|
@@ -235,9 +236,10 @@ declare class GestureOverlay {
|
|
|
235
236
|
*
|
|
236
237
|
* @example
|
|
237
238
|
* ```ts
|
|
239
|
+
* import { createPlayer } from '@scarlett-player/core';
|
|
238
240
|
* import { createGesturesPlugin } from '@scarlett-player/gestures';
|
|
239
241
|
*
|
|
240
|
-
* const player =
|
|
242
|
+
* const player = await createPlayer({
|
|
241
243
|
* container: '#player',
|
|
242
244
|
* plugins: [uiPlugin(), createGesturesPlugin({ seekSeconds: 10 })],
|
|
243
245
|
* });
|
package/dist/index.d.ts
CHANGED
|
@@ -58,10 +58,11 @@ interface GesturesPluginConfig {
|
|
|
58
58
|
/**
|
|
59
59
|
* Whether gestures are active.
|
|
60
60
|
*
|
|
61
|
-
* `'auto'` enables them
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
61
|
+
* `'auto'` enables them wherever the device has a coarse pointer at all
|
|
62
|
+
* (`matchMedia('(any-pointer: coarse)')`, not the primary-pointer
|
|
63
|
+
* `(pointer: coarse)`), and every individual gesture is additionally checked
|
|
64
|
+
* for `pointerType === 'touch'`, so a touchscreen laptop works with a finger
|
|
65
|
+
* and is untouched by the mouse. Never UA sniffing.
|
|
65
66
|
*
|
|
66
67
|
* @defaultValue 'auto'
|
|
67
68
|
*/
|
|
@@ -235,9 +236,10 @@ declare class GestureOverlay {
|
|
|
235
236
|
*
|
|
236
237
|
* @example
|
|
237
238
|
* ```ts
|
|
239
|
+
* import { createPlayer } from '@scarlett-player/core';
|
|
238
240
|
* import { createGesturesPlugin } from '@scarlett-player/gestures';
|
|
239
241
|
*
|
|
240
|
-
* const player =
|
|
242
|
+
* const player = await createPlayer({
|
|
241
243
|
* container: '#player',
|
|
242
244
|
* plugins: [uiPlugin(), createGesturesPlugin({ seekSeconds: 10 })],
|
|
243
245
|
* });
|
package/dist/index.js
CHANGED
|
@@ -319,13 +319,16 @@ var GestureOverlay = class {
|
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
321
|
|
|
322
|
+
// src/version.ts
|
|
323
|
+
var PKG_VERSION = true ? "1.7.1" : "0.0.0-dev";
|
|
324
|
+
|
|
322
325
|
// src/index.ts
|
|
323
326
|
function hasCoarsePointer() {
|
|
324
327
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
325
328
|
return false;
|
|
326
329
|
}
|
|
327
330
|
try {
|
|
328
|
-
return window.matchMedia("(pointer: coarse)").matches;
|
|
331
|
+
return window.matchMedia("(any-pointer: coarse)").matches;
|
|
329
332
|
} catch {
|
|
330
333
|
return false;
|
|
331
334
|
}
|
|
@@ -443,7 +446,7 @@ function createGesturesPlugin(config = {}) {
|
|
|
443
446
|
return {
|
|
444
447
|
id: "gestures",
|
|
445
448
|
name: "Gestures",
|
|
446
|
-
version:
|
|
449
|
+
version: PKG_VERSION,
|
|
447
450
|
type: "feature",
|
|
448
451
|
init(pluginApi) {
|
|
449
452
|
api = pluginApi;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scarlett-player/gestures",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Gestures Plugin for Scarlett Player - double-tap seek zones and tap to toggle controls",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@scarlett-player/core": "^1.
|
|
25
|
+
"@scarlett-player/core": "^1.7.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@vitest/coverage-v8": "^1.6.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsup": "^8.5.1",
|
|
31
31
|
"typescript": "^5.3.0",
|
|
32
32
|
"vitest": "^1.6.0",
|
|
33
|
-
"@scarlett-player/core": "1.
|
|
33
|
+
"@scarlett-player/core": "1.8.0"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"video",
|
|
@@ -54,10 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://scarlettplayer.com",
|
|
56
56
|
"scripts": {
|
|
57
|
-
"build": "tsup
|
|
58
|
-
"dev": "tsup
|
|
57
|
+
"build": "tsup",
|
|
58
|
+
"dev": "tsup --watch",
|
|
59
59
|
"test": "vitest --run",
|
|
60
60
|
"test:watch": "vitest",
|
|
61
|
-
"test:coverage": "vitest --coverage"
|
|
61
|
+
"test:coverage": "vitest --coverage",
|
|
62
|
+
"typecheck": "tsc --noEmit -p tsconfig.typecheck.json"
|
|
62
63
|
}
|
|
63
64
|
}
|