@flowplayer/spins 0.8.0 → 0.9.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 +52 -0
- package/dist/index.js +221 -65
- package/dist/types.d.ts +25 -0
- package/package.json +16 -14
package/dist/types.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ declare const spinEvents: {
|
|
|
13
13
|
* Emitted when a different spin enters the viewport.
|
|
14
14
|
*/
|
|
15
15
|
readonly SPIN_IN_VIEWPORT: "spin:viewport";
|
|
16
|
+
/**
|
|
17
|
+
* Emitted when the user taps the close button.
|
|
18
|
+
* The library does not remove the container — the implementor must listen
|
|
19
|
+
* for this event and handle teardown.
|
|
20
|
+
*/
|
|
21
|
+
readonly CLOSE: "spins:close";
|
|
16
22
|
};
|
|
17
23
|
declare const mediaEvents: {
|
|
18
24
|
/** Fired when the browser can start playing the media without stopping for buffering. */
|
|
@@ -122,6 +128,19 @@ interface SpinsConfig {
|
|
|
122
128
|
* @see https://developer.wowza.com/docs/wowza-flowplayer/plugins/about-plugins/#plugin-descriptions
|
|
123
129
|
*/
|
|
124
130
|
plugins?: (typeof PlayerPlugins)[number][];
|
|
131
|
+
/**
|
|
132
|
+
* When `true`, renders a close button overlaid on the player.
|
|
133
|
+
* Clicking it dispatches a `spins:close` event on the container — the library
|
|
134
|
+
* does not remove the element; the implementor is responsible for teardown.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
closeButton?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* The label rendered on the link anchor for each spin that has a {@link SpinItem.article_url}.
|
|
140
|
+
* Applies to the entire feed.
|
|
141
|
+
* @default "Read more"
|
|
142
|
+
*/
|
|
143
|
+
articleLabel?: string;
|
|
125
144
|
}
|
|
126
145
|
/**
|
|
127
146
|
* Describes an individual item used in a Spin playlist.
|
|
@@ -139,6 +158,12 @@ interface SpinItem {
|
|
|
139
158
|
title?: Config["title"];
|
|
140
159
|
poster?: Config["poster"];
|
|
141
160
|
description?: Config["description"];
|
|
161
|
+
/**
|
|
162
|
+
* A URL linking to an article or external resource related to this spin.
|
|
163
|
+
* Must be an absolute http/https URL. Rendered as an anchor element using
|
|
164
|
+
* the feed-level {@link SpinsConfig.articleLabel} as the link text.
|
|
165
|
+
*/
|
|
166
|
+
article_url?: string;
|
|
142
167
|
/**
|
|
143
168
|
* Subtitles plugin configuration. Requires Subtitles plugin to be attached.
|
|
144
169
|
* @see https://developer.wowza.com/docs/wowza-flowplayer/plugins/html-subtitles/#configure-the-plugin
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowplayer/spins",
|
|
3
3
|
"module": "dist/index.js",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/types.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./dist/types.d.ts",
|
|
10
|
-
"import": "./dist/index.js"
|
|
11
|
-
"require": "./dist/index.js"
|
|
10
|
+
"import": "./dist/index.js"
|
|
12
11
|
}
|
|
13
12
|
},
|
|
14
13
|
"files": [
|
|
@@ -21,37 +20,40 @@
|
|
|
21
20
|
"lint": "bunx @biomejs/biome check --write .",
|
|
22
21
|
"fix:unsafe": "bunx @biomejs/biome check --unsafe --write .",
|
|
23
22
|
"dev": "bun run storybook",
|
|
23
|
+
"serve": "bun serve.js",
|
|
24
24
|
"build-storybook": "storybook build",
|
|
25
25
|
"test": "bun run vitest",
|
|
26
26
|
"prepare": "bun run build"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
+
"@alugha/ima": "^2.2.1",
|
|
29
30
|
"@biomejs/biome": "2.1.1",
|
|
30
31
|
"@chromatic-com/storybook": "^4.0.1",
|
|
31
|
-
"@storybook/addon-a11y": "^
|
|
32
|
-
"@storybook/addon-docs": "^
|
|
33
|
-
"@storybook/addon-vitest": "^
|
|
34
|
-
"@storybook/web-components-vite": "^
|
|
32
|
+
"@storybook/addon-a11y": "^10.4.1",
|
|
33
|
+
"@storybook/addon-docs": "^10.4.1",
|
|
34
|
+
"@storybook/addon-vitest": "^10.4.1",
|
|
35
|
+
"@storybook/web-components-vite": "^10.4.1",
|
|
35
36
|
"@types/bun": "latest",
|
|
36
|
-
"@
|
|
37
|
-
"@alugha/ima": "^2.2.1",
|
|
37
|
+
"@types/can-autoplay": "^3.0.1",
|
|
38
38
|
"@types/qs": "^6.9.7",
|
|
39
|
+
"@vitest/browser": "^3.2.4",
|
|
39
40
|
"@vitest/coverage-v8": "^3.2.4",
|
|
40
|
-
"
|
|
41
|
+
"browser-sync": "^3.0.4",
|
|
41
42
|
"chromatic": "^13.1.2",
|
|
42
43
|
"husky": "^9.1.7",
|
|
43
|
-
"tsup": "^8.5.0",
|
|
44
44
|
"lit": "^3.3.0",
|
|
45
45
|
"playwright": "^1.53.2",
|
|
46
|
-
"
|
|
46
|
+
"tsup": "^8.5.0",
|
|
47
|
+
"storybook": "^10.4.1",
|
|
47
48
|
"vitest": "^3.2.4"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"typescript": "5"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"@flowplayer/player": "^3.
|
|
54
|
-
"
|
|
54
|
+
"@flowplayer/player": "^3.37.0",
|
|
55
|
+
"qs": "^6.5.3",
|
|
56
|
+
"@flowplayer/translations": "^2.6.0",
|
|
55
57
|
"bowser": "^2.11.0",
|
|
56
58
|
"can-autoplay": "^3.0.2",
|
|
57
59
|
"jwt-decode": "^2.2.0",
|