@openplayerjs/player 3.1.2 → 3.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.
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* packages/player/src/a11y-announcer.ts
|
|
3
|
+
*
|
|
4
|
+
* WCAG 4.1.3 Status Messages — live region announcer for the player.
|
|
5
|
+
*
|
|
6
|
+
* A single visually-hidden <div role="status" aria-live="polite"> is attached
|
|
7
|
+
* to the player wrapper and receives short text updates that screen readers
|
|
8
|
+
* announce without moving keyboard focus.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* const announce = createAnnouncer(wrapperEl);
|
|
12
|
+
* announce('Paused');
|
|
13
|
+
* announce('Seeking to 1 minute 23 seconds');
|
|
14
|
+
*/
|
|
15
|
+
import type { Core } from '@openplayerjs/core';
|
|
16
|
+
export type Announcer = (message: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Mounts a visually-hidden live region inside `wrapper` and returns a
|
|
19
|
+
* function that writes messages to it.
|
|
20
|
+
*
|
|
21
|
+
* Calling the returned function with an empty string clears the region.
|
|
22
|
+
* Two regions are used in rotation (a common trick to force re-announcement
|
|
23
|
+
* when the same message is repeated).
|
|
24
|
+
*/
|
|
25
|
+
export declare function createAnnouncer(wrapper: HTMLElement): {
|
|
26
|
+
announce: Announcer;
|
|
27
|
+
destroy: () => void;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Attaches a live-region announcer to a running player and subscribes to
|
|
31
|
+
* the core event bus to announce playback state changes.
|
|
32
|
+
*
|
|
33
|
+
* Returns an unsub function to remove all listeners.
|
|
34
|
+
*/
|
|
35
|
+
export declare function bindPlayerAnnouncer(core: Core, wrapper: HTMLElement): () => void;
|
|
36
|
+
//# sourceMappingURL=a11y-announcer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a11y-announcer.d.ts","sourceRoot":"","sources":["../../src/a11y-announcer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAM/C,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAElD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAqClG;AAID;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI,CAsDhF"}
|
package/dist/types/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,EAAE,iBAAiB,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAoF5D,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,cAAc,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,cAAc,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;CAC7C,CAAC;AAEF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,mBAgW1C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openplayerjs/player",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "UI layer, built-in controls, and accessibility for OpenPlayerJS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rafael Miranda",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"controls"
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@openplayerjs/core": "^3.
|
|
42
|
+
"@openplayerjs/core": "^3.3.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@openplayerjs/core": "^3.
|
|
45
|
+
"@openplayerjs/core": "^3.3.0"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|