@mattebox/player-cast 0.1.0 → 0.3.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/README.md +22 -16
- package/dist/cast-button.js +58 -64
- package/dist/cast-button.js.map +1 -1
- package/dist/cast-screen.d.ts.map +1 -1
- package/dist/cast-screen.js +113 -145
- package/dist/cast-screen.js.map +1 -1
- package/dist/cast.js +258 -311
- package/dist/cast.js.map +1 -1
- package/dist/cdn/mattebox-player-cast.min.js +1 -91
- package/dist/component.js +85 -88
- package/dist/component.js.map +1 -1
- package/dist/es2015/cast-screen.js +2 -34
- package/dist/es2015/icons.js +4 -4
- package/dist/es2015/shared.js +4 -59
- package/dist/host.js +15 -13
- package/dist/host.js.map +1 -1
- package/dist/icons.d.ts +3 -27
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +19 -46
- package/dist/icons.js.map +1 -1
- package/dist/index.js +17 -19
- package/dist/index.js.map +1 -1
- package/dist/shared.d.ts +2 -10
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +54 -107
- package/dist/shared.js.map +1 -1
- package/dist/slider.js +151 -160
- package/dist/slider.js.map +1 -1
- package/package.json +6 -7
- package/NOTICE +0 -24
package/dist/slider.js
CHANGED
|
@@ -1,165 +1,156 @@
|
|
|
1
|
+
import { el } from "./shared.js";
|
|
2
|
+
//#region src/slider.ts
|
|
1
3
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
import { el } from './shared.js';
|
|
4
|
+
* The slider primitive, copied from the player's, which exports none: a
|
|
5
|
+
* `div` with
|
|
6
|
+
* `role="slider"`, pointer capture for the drag, and the arrow keys. It
|
|
7
|
+
* owns geometry only. What the value means and what happens on change is
|
|
8
|
+
* the caller's, through `onInput`.
|
|
9
|
+
*
|
|
10
|
+
* Not `<input type="range">`: a range input cannot carry layers such as
|
|
11
|
+
* buffered ranges, its geometry is not readable for a preview anchor, and
|
|
12
|
+
* it renders differently per browser. The track is exposed so a caller can
|
|
13
|
+
* lay its own layers on it.
|
|
14
|
+
*
|
|
15
|
+
* The track and the thumb sit on a rail inset from the root's edges by half
|
|
16
|
+
* a thumb, so the thumb at either end is whole and not clipped, and every
|
|
17
|
+
* fraction is measured against the rail.
|
|
18
|
+
*
|
|
19
|
+
* The steps are read on every key, so an element can take them from its
|
|
20
|
+
* attributes as they change.
|
|
21
|
+
*
|
|
22
|
+
* A drag ends on `pointerup`, and also on a move that reports no button
|
|
23
|
+
* held: the button went up where no `pointerup` reached the slider, such
|
|
24
|
+
* as outside the window, and the thumb must not stay on the pointer. A
|
|
25
|
+
* lost capture ends it too.
|
|
26
|
+
*/
|
|
26
27
|
function clamp(value, min, max) {
|
|
27
|
-
|
|
28
|
+
return Math.min(max, Math.max(min, value));
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
root.setAttribute('aria-valuenow', String(value));
|
|
152
|
-
root.setAttribute('aria-valuetext', text);
|
|
153
|
-
paint();
|
|
154
|
-
},
|
|
155
|
-
dispose() {
|
|
156
|
-
root.removeEventListener('pointerdown', down);
|
|
157
|
-
root.removeEventListener('pointermove', move);
|
|
158
|
-
root.removeEventListener('pointerup', up);
|
|
159
|
-
root.removeEventListener('pointercancel', cancel);
|
|
160
|
-
root.removeEventListener('lostpointercapture', cancel);
|
|
161
|
-
root.removeEventListener('keydown', key);
|
|
162
|
-
},
|
|
163
|
-
};
|
|
30
|
+
function slider(options) {
|
|
31
|
+
const { onInput } = options;
|
|
32
|
+
const root = el("div", "slider");
|
|
33
|
+
root.setAttribute("role", "slider");
|
|
34
|
+
root.tabIndex = 0;
|
|
35
|
+
const rail = el("div", "rail");
|
|
36
|
+
const track = el("div", "track");
|
|
37
|
+
const fill = el("div", "fill");
|
|
38
|
+
const thumb = el("div", "thumb");
|
|
39
|
+
track.append(fill);
|
|
40
|
+
rail.append(track, thumb);
|
|
41
|
+
root.append(rail);
|
|
42
|
+
let min = 0;
|
|
43
|
+
let max = 1;
|
|
44
|
+
let value = 0;
|
|
45
|
+
let held = false;
|
|
46
|
+
function paint() {
|
|
47
|
+
const percent = `${(max > min ? (value - min) / (max - min) : 0) * 100}%`;
|
|
48
|
+
fill.style.width = percent;
|
|
49
|
+
thumb.style.left = percent;
|
|
50
|
+
}
|
|
51
|
+
/** The value under a horizontal pointer position. */
|
|
52
|
+
function at(clientX) {
|
|
53
|
+
const rect = rail.getBoundingClientRect();
|
|
54
|
+
if (rect.width === 0) return min;
|
|
55
|
+
return min + clamp((clientX - rect.left) / rect.width, 0, 1) * (max - min);
|
|
56
|
+
}
|
|
57
|
+
function hold(on) {
|
|
58
|
+
held = on;
|
|
59
|
+
options.onDrag(on);
|
|
60
|
+
}
|
|
61
|
+
function down(event) {
|
|
62
|
+
if (event.button !== 0) return;
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
hold(true);
|
|
65
|
+
try {
|
|
66
|
+
root.setPointerCapture(event.pointerId);
|
|
67
|
+
} catch {}
|
|
68
|
+
onInput(at(event.clientX));
|
|
69
|
+
}
|
|
70
|
+
function move(event) {
|
|
71
|
+
if (!held) return;
|
|
72
|
+
if (event.buttons === 0) {
|
|
73
|
+
up(event);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
onInput(at(event.clientX));
|
|
77
|
+
}
|
|
78
|
+
function up(event) {
|
|
79
|
+
if (!held) return;
|
|
80
|
+
hold(false);
|
|
81
|
+
onInput(at(event.clientX));
|
|
82
|
+
}
|
|
83
|
+
function cancel() {
|
|
84
|
+
if (held) hold(false);
|
|
85
|
+
}
|
|
86
|
+
function key(event) {
|
|
87
|
+
let next;
|
|
88
|
+
switch (event.key) {
|
|
89
|
+
case "ArrowRight":
|
|
90
|
+
case "ArrowUp":
|
|
91
|
+
next = value + options.step();
|
|
92
|
+
break;
|
|
93
|
+
case "ArrowLeft":
|
|
94
|
+
case "ArrowDown":
|
|
95
|
+
next = value - options.step();
|
|
96
|
+
break;
|
|
97
|
+
case "PageUp":
|
|
98
|
+
next = value + options.page();
|
|
99
|
+
break;
|
|
100
|
+
case "PageDown":
|
|
101
|
+
next = value - options.page();
|
|
102
|
+
break;
|
|
103
|
+
case "Home":
|
|
104
|
+
next = min;
|
|
105
|
+
break;
|
|
106
|
+
case "End":
|
|
107
|
+
next = max;
|
|
108
|
+
break;
|
|
109
|
+
default: return;
|
|
110
|
+
}
|
|
111
|
+
event.preventDefault();
|
|
112
|
+
onInput(clamp(next, min, max));
|
|
113
|
+
}
|
|
114
|
+
root.addEventListener("pointerdown", down);
|
|
115
|
+
root.addEventListener("pointermove", move);
|
|
116
|
+
root.addEventListener("pointerup", up);
|
|
117
|
+
root.addEventListener("pointercancel", cancel);
|
|
118
|
+
root.addEventListener("lostpointercapture", cancel);
|
|
119
|
+
root.addEventListener("keydown", key);
|
|
120
|
+
return {
|
|
121
|
+
root,
|
|
122
|
+
track,
|
|
123
|
+
rail,
|
|
124
|
+
label(text) {
|
|
125
|
+
root.setAttribute("aria-label", text);
|
|
126
|
+
},
|
|
127
|
+
dragging() {
|
|
128
|
+
return held;
|
|
129
|
+
},
|
|
130
|
+
range(low, high) {
|
|
131
|
+
min = low;
|
|
132
|
+
max = high;
|
|
133
|
+
root.setAttribute("aria-valuemin", String(low));
|
|
134
|
+
root.setAttribute("aria-valuemax", String(high));
|
|
135
|
+
paint();
|
|
136
|
+
},
|
|
137
|
+
set(next, text) {
|
|
138
|
+
value = clamp(next, min, max);
|
|
139
|
+
root.setAttribute("aria-valuenow", String(value));
|
|
140
|
+
root.setAttribute("aria-valuetext", text);
|
|
141
|
+
paint();
|
|
142
|
+
},
|
|
143
|
+
dispose() {
|
|
144
|
+
root.removeEventListener("pointerdown", down);
|
|
145
|
+
root.removeEventListener("pointermove", move);
|
|
146
|
+
root.removeEventListener("pointerup", up);
|
|
147
|
+
root.removeEventListener("pointercancel", cancel);
|
|
148
|
+
root.removeEventListener("lostpointercapture", cancel);
|
|
149
|
+
root.removeEventListener("keydown", key);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
164
152
|
}
|
|
153
|
+
//#endregion
|
|
154
|
+
export { slider };
|
|
155
|
+
|
|
165
156
|
//# sourceMappingURL=slider.js.map
|
package/dist/slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","
|
|
1
|
+
{"version":3,"file":"slider.js","names":[],"sources":["../src/slider.ts"],"sourcesContent":["/**\n * The slider primitive, copied from the player's, which exports none: a\n * `div` with\n * `role=\"slider\"`, pointer capture for the drag, and the arrow keys. It\n * owns geometry only. What the value means and what happens on change is\n * the caller's, through `onInput`.\n *\n * Not `<input type=\"range\">`: a range input cannot carry layers such as\n * buffered ranges, its geometry is not readable for a preview anchor, and\n * it renders differently per browser. The track is exposed so a caller can\n * lay its own layers on it.\n *\n * The track and the thumb sit on a rail inset from the root's edges by half\n * a thumb, so the thumb at either end is whole and not clipped, and every\n * fraction is measured against the rail.\n *\n * The steps are read on every key, so an element can take them from its\n * attributes as they change.\n *\n * A drag ends on `pointerup`, and also on a move that reports no button\n * held: the button went up where no `pointerup` reached the slider, such\n * as outside the window, and the thumb must not stay on the pointer. A\n * lost capture ends it too.\n */\nimport { el } from './shared.js';\n\nexport interface SliderOptions {\n /** What an arrow key moves the value by. */\n readonly step: () => number;\n /** What Page Up and Page Down move it by. */\n readonly page: () => number;\n /** The value the pointer or a key asked for, clamped to the range. */\n readonly onInput: (value: number) => void;\n /** A pointer took the thumb, or let it go. The element carries it as `dragging`. */\n readonly onDrag: (on: boolean) => void;\n}\n\nexport interface Slider {\n readonly root: HTMLElement;\n /** The accessible name. */\n label(text: string): void;\n /** The bar the fill sits on. A caller lays extra layers on it. */\n readonly track: HTMLElement;\n /** What fractions are measured against: the track's extent, inset from the root. */\n readonly rail: HTMLElement;\n /** Whether a pointer holds the thumb. A caller keeps its own reads off the thumb meanwhile. */\n dragging(): boolean;\n /** The range the value maps onto. */\n range(min: number, max: number): void;\n /** Where the thumb sits, and what a screen reader hears. */\n set(value: number, text: string): void;\n dispose(): void;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport function slider(options: SliderOptions): Slider {\n const { onInput } = options;\n const root = el('div', 'slider');\n root.setAttribute('role', 'slider');\n root.tabIndex = 0;\n const rail = el('div', 'rail');\n const track = el('div', 'track');\n const fill = el('div', 'fill');\n const thumb = el('div', 'thumb');\n track.append(fill);\n rail.append(track, thumb);\n root.append(rail);\n\n let min = 0;\n let max = 1;\n let value = 0;\n let held = false;\n\n function paint(): void {\n const fraction = max > min ? (value - min) / (max - min) : 0;\n const percent = `${fraction * 100}%`;\n fill.style.width = percent;\n thumb.style.left = percent;\n }\n\n /** The value under a horizontal pointer position. */\n function at(clientX: number): number {\n const rect = rail.getBoundingClientRect();\n if (rect.width === 0) return min;\n return min + clamp((clientX - rect.left) / rect.width, 0, 1) * (max - min);\n }\n\n function hold(on: boolean): void {\n held = on;\n options.onDrag(on);\n }\n\n function down(event: PointerEvent): void {\n if (event.button !== 0) return;\n event.preventDefault();\n hold(true);\n // A synthetic event carries no active pointer, and capture throws on it.\n try {\n root.setPointerCapture(event.pointerId);\n } catch {\n // Nothing to capture; the drag still follows moves over the root.\n }\n onInput(at(event.clientX));\n }\n\n function move(event: PointerEvent): void {\n if (!held) return;\n // A mouse that moves with no button down has let go; a touch or a pen\n // in contact reports one.\n if (event.buttons === 0) {\n up(event);\n return;\n }\n onInput(at(event.clientX));\n }\n\n function up(event: PointerEvent): void {\n if (!held) return;\n hold(false);\n onInput(at(event.clientX));\n }\n\n function cancel(): void {\n if (held) hold(false);\n }\n\n function key(event: KeyboardEvent): void {\n let next: number;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next = value + options.step();\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next = value - options.step();\n break;\n case 'PageUp':\n next = value + options.page();\n break;\n case 'PageDown':\n next = value - options.page();\n break;\n case 'Home':\n next = min;\n break;\n case 'End':\n next = max;\n break;\n default:\n return;\n }\n event.preventDefault();\n onInput(clamp(next, min, max));\n }\n\n root.addEventListener('pointerdown', down);\n root.addEventListener('pointermove', move);\n root.addEventListener('pointerup', up);\n root.addEventListener('pointercancel', cancel);\n root.addEventListener('lostpointercapture', cancel);\n root.addEventListener('keydown', key);\n\n return {\n root,\n track,\n rail,\n label(text: string): void {\n root.setAttribute('aria-label', text);\n },\n dragging(): boolean {\n return held;\n },\n range(low: number, high: number): void {\n min = low;\n max = high;\n root.setAttribute('aria-valuemin', String(low));\n root.setAttribute('aria-valuemax', String(high));\n paint();\n },\n set(next: number, text: string): void {\n value = clamp(next, min, max);\n root.setAttribute('aria-valuenow', String(value));\n root.setAttribute('aria-valuetext', text);\n paint();\n },\n dispose(): void {\n root.removeEventListener('pointerdown', down);\n root.removeEventListener('pointermove', move);\n root.removeEventListener('pointerup', up);\n root.removeEventListener('pointercancel', cancel);\n root.removeEventListener('lostpointercapture', cancel);\n root.removeEventListener('keydown', key);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,SAAS,MAAM,OAAe,KAAa,KAAqB;CAC9D,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;AAEA,SAAgB,OAAO,SA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,aAAa,EAAE;GACxC,KAAK,oBAAoB,iBAAiB,MAAM;GAChD,KAAK,oBAAoB,sBAAsB,MAAM;GACrD,KAAK,oBAAoB,WAAW,GAAG;EACzC;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mattebox/player-cast",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "<mbx-cast-button> and <mbx-cast-screen>: Chromecast from <mattebox-player>, over Google's sender SDK.",
|
|
5
5
|
"author": "Josep Boix Requesens",
|
|
6
6
|
"repository": {
|
|
@@ -37,23 +37,22 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
|
-
"dist"
|
|
41
|
-
"NOTICE"
|
|
40
|
+
"dist"
|
|
42
41
|
],
|
|
43
42
|
"scripts": {
|
|
44
43
|
"clean": "rm -rf dist",
|
|
45
44
|
"build": "npm run clean && npm run build:modern && npm run build:es2015 && npm run build:cdn",
|
|
46
|
-
"build:modern": "tsc -p tsconfig.build.json",
|
|
45
|
+
"build:modern": "tsc -p tsconfig.build.json --emitDeclarationOnly && rolldown -c rolldown.modern.config.mjs",
|
|
47
46
|
"build:es2015": "rolldown -c rolldown.dist.config.mjs",
|
|
48
47
|
"build:cdn": "rolldown -c rolldown.cdn.config.mjs",
|
|
49
48
|
"check:package": "publint && attw --pack . --format table --no-emoji",
|
|
50
49
|
"release:ci": "semantic-release"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
|
-
"@mattebox/player-core": "^0.
|
|
52
|
+
"@mattebox/player-core": "^0.6.0"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
|
-
"@mattebox/player": ">=0.
|
|
57
|
-
"mattebox": "^0.
|
|
55
|
+
"@mattebox/player": ">=0.9.0",
|
|
56
|
+
"mattebox": "^0.14.0"
|
|
58
57
|
}
|
|
59
58
|
}
|
package/NOTICE
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
@mattebox/player-cast carries two glyphs copied from media-icons
|
|
2
|
-
(https://github.com/vidstack/media-icons), used under the MIT License:
|
|
3
|
-
|
|
4
|
-
MIT License
|
|
5
|
-
|
|
6
|
-
Copyright (c) 2023 Rahim Alwer
|
|
7
|
-
|
|
8
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
-
in the Software without restriction, including without limitation the rights
|
|
11
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
furnished to do so, subject to the following conditions:
|
|
14
|
-
|
|
15
|
-
The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
copies or substantial portions of the Software.
|
|
17
|
-
|
|
18
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
SOFTWARE.
|