@growth-labs/video 0.3.10 → 0.3.12
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/package.json +68 -68
- package/src/components/Video.astro +4 -0
package/package.json
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
}
|
|
2
|
+
"name": "@growth-labs/video",
|
|
3
|
+
"version": "0.3.12",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"./components": {
|
|
11
|
+
"types": "./src/components/index.ts",
|
|
12
|
+
"import": "./src/components/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"./components/*": {
|
|
15
|
+
"types": "./src/components/*.astro",
|
|
16
|
+
"import": "./src/components/*.astro"
|
|
17
|
+
},
|
|
18
|
+
"./utils": {
|
|
19
|
+
"types": "./dist/utils/index.d.ts",
|
|
20
|
+
"import": "./dist/utils/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./utils/*": {
|
|
23
|
+
"types": "./dist/utils/*.d.ts",
|
|
24
|
+
"import": "./dist/utils/*.js"
|
|
25
|
+
},
|
|
26
|
+
"./routes/*": {
|
|
27
|
+
"types": "./dist/routes/*.d.ts",
|
|
28
|
+
"import": "./dist/routes/*.js",
|
|
29
|
+
"default": "./dist/routes/*.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"src/**/*.ts",
|
|
35
|
+
"src/**/*.astro",
|
|
36
|
+
"src/**/*.css",
|
|
37
|
+
"src/**/*.md",
|
|
38
|
+
"src/**/*.sql"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"registry": "https://registry.npmjs.org/"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:watch": "vitest"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"astro": "^6.1.10",
|
|
51
|
+
"vidstack": "^1.12.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"vidstack": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"zod": "^3.23.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@cloudflare/workers-types": "^4.20260402.1",
|
|
63
|
+
"astro": "^6.1.10",
|
|
64
|
+
"typescript": "^5.7.0",
|
|
65
|
+
"vite": "^7.3.2",
|
|
66
|
+
"vitest": "^3.0.0",
|
|
67
|
+
"vidstack": "^1.12.0"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -14,6 +14,7 @@ interface Props {
|
|
|
14
14
|
title: string
|
|
15
15
|
premium?: boolean
|
|
16
16
|
poster?: string
|
|
17
|
+
contentSlug?: string
|
|
17
18
|
captions?: boolean
|
|
18
19
|
chapters?: boolean
|
|
19
20
|
captionsLang?: string
|
|
@@ -26,6 +27,7 @@ const {
|
|
|
26
27
|
videoId,
|
|
27
28
|
title,
|
|
28
29
|
premium = false,
|
|
30
|
+
contentSlug,
|
|
29
31
|
captionsLang = 'en',
|
|
30
32
|
class: className,
|
|
31
33
|
} = Astro.props
|
|
@@ -61,6 +63,7 @@ const playerBoolAttrs = buildPlayerBooleanAttrs({
|
|
|
61
63
|
|
|
62
64
|
<media-player
|
|
63
65
|
data-video-id={videoId}
|
|
66
|
+
data-content-slug={contentSlug}
|
|
64
67
|
data-premium={premium ? 'true' : 'false'}
|
|
65
68
|
data-session-route={premium ? config.premium?.sessionRoute : undefined}
|
|
66
69
|
data-pending-src={premium ? src : undefined}
|
|
@@ -73,6 +76,7 @@ const playerBoolAttrs = buildPlayerBooleanAttrs({
|
|
|
73
76
|
poster={poster}
|
|
74
77
|
preload={config.player.preload}
|
|
75
78
|
crossorigin="anonymous"
|
|
79
|
+
playsinline
|
|
76
80
|
class={`gl-video ${className ?? ''}`.trim()}
|
|
77
81
|
{...playerBoolAttrs}
|
|
78
82
|
>
|