@m4l/gclick 0.24.1 → 0.25.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/components/CameraStream/defaults/DefaultPhaseStreaming.d.ts +4 -0
- package/components/CameraStream/defaults/DefaultPhaseStreaming.d.ts.map +1 -1
- package/components/CameraStream/defaults/DefaultPhaseStreaming.js +35 -33
- package/components/CameraStreams/CameraStreamsProvider.d.ts +5 -0
- package/components/CameraStreams/CameraStreamsProvider.d.ts.map +1 -1
- package/components/CameraStreams/CameraStreamsProvider.js +10 -11
- package/components/CameraStreams/contexts/CameraStreamPlayersContext.d.ts +7 -3
- package/components/CameraStreams/contexts/CameraStreamPlayersContext.d.ts.map +1 -1
- package/components/CameraStreams/contexts/CameraStreamsSuspensionContext.d.ts +15 -0
- package/components/CameraStreams/contexts/CameraStreamsSuspensionContext.d.ts.map +1 -0
- package/components/CameraStreams/contexts/CameraStreamsSuspensionContext.js +5 -0
- package/components/CameraStreams/hooks/useCameraStreamsSuspended.d.ts +7 -0
- package/components/CameraStreams/hooks/useCameraStreamsSuspended.d.ts.map +1 -0
- package/components/CameraStreams/hooks/useCameraStreamsSuspended.js +8 -0
- package/components/CameraStreams/hooks/useStreamPolling.d.ts +1 -11
- package/components/CameraStreams/hooks/useStreamPolling.d.ts.map +1 -1
- package/components/CameraStreams/hooks/useStreamPolling.js +84 -89
- package/components/CameraStreams/hooks/useStreamRequest.d.ts +7 -8
- package/components/CameraStreams/hooks/useStreamRequest.d.ts.map +1 -1
- package/components/CameraStreams/hooks/useStreamRequest.js +34 -50
- package/components/CameraStreams/index.d.ts +2 -0
- package/components/CameraStreams/index.d.ts.map +1 -1
- package/components/CameraStreams/types.d.ts +23 -10
- package/components/CameraStreams/types.d.ts.map +1 -1
- package/components/VideoPlayer/VideoPlayer.d.ts +3 -3
- package/components/VideoPlayer/VideoPlayer.d.ts.map +1 -1
- package/components/VideoPlayer/VideoPlayer.js +29 -25
- package/components/VideoPlayer/VideoPlayer.styles.d.ts.map +1 -1
- package/components/VideoPlayer/VideoPlayer.styles.js +32 -6
- package/components/VideoPlayer/VideojsDefaultSkin.styles.d.ts.map +1 -1
- package/components/VideoPlayer/VideojsDefaultSkin.styles.js +936 -807
- package/components/VideoPlayer/VideojsMinimalSkin.styles.d.ts.map +1 -1
- package/components/VideoPlayer/VideojsMinimalSkin.styles.js +901 -809
- package/components/VideoPlayer/constants.d.ts +16 -0
- package/components/VideoPlayer/constants.d.ts.map +1 -1
- package/components/VideoPlayer/constants.js +27 -8
- package/components/VideoPlayer/hlsSource.d.ts +41 -0
- package/components/VideoPlayer/hlsSource.d.ts.map +1 -0
- package/components/VideoPlayer/hlsSource.js +35 -0
- package/components/VideoPlayer/hooks/useMediaReadiness.d.ts +22 -0
- package/components/VideoPlayer/hooks/useMediaReadiness.d.ts.map +1 -0
- package/components/VideoPlayer/hooks/useMediaReadiness.js +21 -0
- package/components/VideoPlayer/hooks/usePlaybackIntent.d.ts +14 -0
- package/components/VideoPlayer/hooks/usePlaybackIntent.d.ts.map +1 -0
- package/components/VideoPlayer/hooks/usePlaybackIntent.js +33 -0
- package/components/VideoPlayer/hooks/usePlayerControl.d.ts +6 -0
- package/components/VideoPlayer/hooks/usePlayerControl.d.ts.map +1 -1
- package/components/VideoPlayer/hooks/usePlayerControl.js +34 -25
- package/components/VideoPlayer/hooks/usePlayerEvents.d.ts +5 -1
- package/components/VideoPlayer/hooks/usePlayerEvents.d.ts.map +1 -1
- package/components/VideoPlayer/hooks/usePlayerEvents.js +10 -11
- package/components/VideoPlayer/player.factory.d.ts +24 -17
- package/components/VideoPlayer/player.factory.d.ts.map +1 -1
- package/components/VideoPlayer/storeSafety.d.ts +15 -0
- package/components/VideoPlayer/storeSafety.d.ts.map +1 -0
- package/components/VideoPlayer/storeSafety.js +25 -0
- package/components/VideoPlayer/subcomponents/GclickVideoSkin.d.ts +4 -2
- package/components/VideoPlayer/subcomponents/GclickVideoSkin.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/GclickVideoSkin.js +36 -24
- package/components/VideoPlayer/subcomponents/VideoPlayerStage.d.ts +5 -3
- package/components/VideoPlayer/subcomponents/VideoPlayerStage.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/VideoPlayerStage.js +64 -49
- package/components/VideoPlayer/subcomponents/skin/VideoControlBar.d.ts +14 -2
- package/components/VideoPlayer/subcomponents/skin/VideoControlBar.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/skin/VideoControlBar.js +90 -62
- package/components/VideoPlayer/subcomponents/skin/VideoErrorDialog.d.ts +11 -0
- package/components/VideoPlayer/subcomponents/skin/VideoErrorDialog.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/skin/VideoErrorDialog.js +16 -13
- package/components/VideoPlayer/subcomponents/skin/VideoInputIndicators.d.ts +15 -0
- package/components/VideoPlayer/subcomponents/skin/VideoInputIndicators.d.ts.map +1 -0
- package/components/VideoPlayer/subcomponents/skin/VideoInputIndicators.js +57 -0
- package/components/VideoPlayer/subcomponents/skin/VideoSettingsMenu.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/skin/VideoSettingsMenu.js +10 -12
- package/components/VideoPlayer/subcomponents/skin/primitives.d.ts +11 -2
- package/components/VideoPlayer/subcomponents/skin/primitives.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/skin/primitives.js +74 -72
- package/components/VideoPlayer/types.d.ts +43 -5
- package/components/VideoPlayer/types.d.ts.map +1 -1
- package/index.js +149 -145
- package/package.json +4 -2
- package/components/CameraStreams/subcomponents/CameraStreamsSuspensionController.d.ts +0 -18
- package/components/CameraStreams/subcomponents/CameraStreamsSuspensionController.d.ts.map +0 -1
- package/components/CameraStreams/subcomponents/CameraStreamsSuspensionController.js +0 -35
- package/components/VideoPlayer/hlsConfig.d.ts +0 -30
- package/components/VideoPlayer/hlsConfig.d.ts.map +0 -1
- package/components/VideoPlayer/hlsConfig.js +0 -33
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { jsxs as s, jsx as a } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useQualityOptions as
|
|
3
|
-
import { GearIcon as p, QualityIcon as d, SpeedIcon as
|
|
4
|
-
import { SkinButton as
|
|
5
|
-
import { useSkinClasses as
|
|
6
|
-
function Q({ isLive:
|
|
7
|
-
const { surface:
|
|
2
|
+
import { useQualityOptions as r, usePlaybackRateOptions as m, Menu as i } from "@videojs/react";
|
|
3
|
+
import { GearIcon as p, QualityIcon as d, SpeedIcon as b } from "@videojs/react/icons";
|
|
4
|
+
import { SkinButton as y, cx as g, MENU_CONTENT as v, SettingsSubmenu as o } from "./primitives.js";
|
|
5
|
+
import { useSkinClasses as N } from "./skinVariant.js";
|
|
6
|
+
function Q({ isLive: u }) {
|
|
7
|
+
const { surface: c } = N(), e = r(), t = m(), n = e?.state.availability === "available", l = !u && t?.state.availability === "available";
|
|
8
8
|
return !n && !l ? null : /* @__PURE__ */ s(i.Root, { side: "top", align: "center", children: [
|
|
9
9
|
/* @__PURE__ */ a(
|
|
10
10
|
i.Trigger,
|
|
11
11
|
{
|
|
12
12
|
"aria-label": "Settings",
|
|
13
13
|
className: "media-button--settings",
|
|
14
|
-
render: /* @__PURE__ */ a(
|
|
14
|
+
render: /* @__PURE__ */ a(y, {}),
|
|
15
15
|
children: /* @__PURE__ */ a(p, { className: "media-icon media-icon--settings" })
|
|
16
16
|
}
|
|
17
17
|
),
|
|
18
|
-
/* @__PURE__ */ a(i.
|
|
18
|
+
/* @__PURE__ */ a(i.Popup, { className: g(c, "media-popover media-menu media-menu--settings"), children: /* @__PURE__ */ s(i.Content, { className: v, children: [
|
|
19
19
|
n ? /* @__PURE__ */ a(
|
|
20
20
|
o,
|
|
21
21
|
{
|
|
22
|
-
type: "quality",
|
|
23
22
|
title: "Quality",
|
|
24
23
|
icon: /* @__PURE__ */ a(d, { className: "media-icon" }),
|
|
25
24
|
ariaLabel: "Quality",
|
|
@@ -31,16 +30,15 @@ function Q({ isLive: c }) {
|
|
|
31
30
|
l ? /* @__PURE__ */ a(
|
|
32
31
|
o,
|
|
33
32
|
{
|
|
34
|
-
type: "playback-rate",
|
|
35
33
|
title: "Speed",
|
|
36
|
-
icon: /* @__PURE__ */ a(
|
|
34
|
+
icon: /* @__PURE__ */ a(b, { className: "media-icon" }),
|
|
37
35
|
ariaLabel: "Playback rate",
|
|
38
36
|
options: t.options,
|
|
39
37
|
value: t.value,
|
|
40
38
|
onValueChange: t.setValue
|
|
41
39
|
}
|
|
42
40
|
) : null
|
|
43
|
-
] }) })
|
|
41
|
+
] }) })
|
|
44
42
|
] });
|
|
45
43
|
}
|
|
46
44
|
export {
|
|
@@ -4,6 +4,9 @@ export declare const ICON_BUTTON = "media-button media-button--subtle media-butt
|
|
|
4
4
|
export declare const MENU_ITEM = "media-menu__item";
|
|
5
5
|
export declare const MENU_GROUP = "media-menu__group";
|
|
6
6
|
export declare const MENU_PANEL = "media-menu__panel";
|
|
7
|
+
export declare const MENU_CONTENT = "media-menu__content";
|
|
8
|
+
export declare const MENU_BACK = "media-menu__back";
|
|
9
|
+
export declare const MENU_SEPARATOR = "media-menu__separator";
|
|
7
10
|
/** Join the truthy class fragments (avoids depending on the lib's internal `cn`). */
|
|
8
11
|
export declare function cx(...parts: Array<string | false | undefined>): string;
|
|
9
12
|
/** Bare icon button styled by the official skin (`media-button--icon`). */
|
|
@@ -57,9 +60,15 @@ export declare function MenuRadioOptions({ ariaLabel, options, value, onValueCha
|
|
|
57
60
|
}): ReactNode;
|
|
58
61
|
/**
|
|
59
62
|
* A settings submenu: trigger row showing the current value, then its panel.
|
|
63
|
+
*
|
|
64
|
+
* The panel is a `Menu.Content` **without a `Menu.Popup` of its own**: one popup
|
|
65
|
+
* holds every page as sibling contents, so a nested page borrows the parent's
|
|
66
|
+
* surface. Up to beta.25 those pages were `Menu.View` and the way back was a
|
|
67
|
+
* dedicated `Menu.Back`; beta.27 renamed the page and demoted the back row to an
|
|
68
|
+
* ordinary `Menu.Item` carrying the vendor's `media-menu__back` class. The stack
|
|
69
|
+
* itself did not go away — dropping the back row leaves the submenu with no exit.
|
|
60
70
|
*/
|
|
61
|
-
export declare function SettingsSubmenu({
|
|
62
|
-
type: 'playback-rate' | 'quality' | 'audio-track' | 'captions';
|
|
71
|
+
export declare function SettingsSubmenu({ title, icon, ariaLabel, options, value, onValueChange, }: {
|
|
63
72
|
title: string;
|
|
64
73
|
icon: ReactNode;
|
|
65
74
|
ariaLabel: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoPlayer/subcomponents/skin/primitives.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBtE,kFAAkF;AAClF,eAAO,MAAM,WAAW,yDAAyD,CAAC;AAClF,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,eAAO,MAAM,UAAU,sBAAsB,CAAC;AAC9C,eAAO,MAAM,UAAU,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoPlayer/subcomponents/skin/primitives.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBtE,kFAAkF;AAClF,eAAO,MAAM,WAAW,yDAAyD,CAAC;AAClF,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,eAAO,MAAM,UAAU,sBAAsB,CAAC;AAC9C,eAAO,MAAM,UAAU,sBAAsB,CAAC;AAC9C,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAClD,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,eAAO,MAAM,cAAc,0BAA0B,CAAC;AAEtD,qFAAqF;AACrF,wBAAgB,EAAE,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,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AAE,MAAM,KAAK,IAAI,CAAC;CACvC,GAAG,SAAS,CAoCZ;AAED,oEAAoE;AACpE,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,CAS7F"}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Tooltip as
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { Tooltip as r, Menu as c } from "@videojs/react";
|
|
4
4
|
import { SeekIcon as h, ChevronIcon as b, CheckIcon as f } from "@videojs/react/icons";
|
|
5
|
-
import { useSkinClasses as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
return
|
|
5
|
+
import { useSkinClasses as E } from "./skinVariant.js";
|
|
6
|
+
const M = "media-button media-button--subtle media-button--icon", u = "media-menu__item", k = "media-menu__group", S = "media-menu__panel", x = "media-menu__content", T = "media-menu__back", I = "media-menu__separator";
|
|
7
|
+
function l(...n) {
|
|
8
|
+
return n.filter(Boolean).join(" ");
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
function({ className: t, ...m },
|
|
12
|
-
return /* @__PURE__ */ e("button", { ref:
|
|
10
|
+
const A = p(
|
|
11
|
+
function({ className: t, ...m }, s) {
|
|
12
|
+
return /* @__PURE__ */ e("button", { ref: s, type: "button", className: l(M, t), ...m });
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
|
-
function
|
|
16
|
-
const { surface: t } =
|
|
17
|
-
return /* @__PURE__ */ i(
|
|
18
|
-
/* @__PURE__ */ e(
|
|
19
|
-
/* @__PURE__ */ i(
|
|
20
|
-
/* @__PURE__ */ e(
|
|
21
|
-
/* @__PURE__ */ e(
|
|
15
|
+
function P({ children: n }) {
|
|
16
|
+
const { surface: t } = E();
|
|
17
|
+
return /* @__PURE__ */ i(r.Root, { side: "top", children: [
|
|
18
|
+
/* @__PURE__ */ e(r.Trigger, { render: n }),
|
|
19
|
+
/* @__PURE__ */ i(r.Popup, { className: l(t, "media-tooltip"), children: [
|
|
20
|
+
/* @__PURE__ */ e(r.Label, {}),
|
|
21
|
+
/* @__PURE__ */ e(r.Shortcut, { className: "media-tooltip__kbd" })
|
|
22
22
|
] })
|
|
23
23
|
] });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function d({ flipped: n = !1 }) {
|
|
26
26
|
return /* @__PURE__ */ e(
|
|
27
27
|
b,
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
29
|
+
className: l("media-icon media-menu__chevron", n && "media-icon--flipped")
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
ariaLabel:
|
|
33
|
+
function g({
|
|
34
|
+
ariaLabel: n,
|
|
35
35
|
options: t,
|
|
36
36
|
value: m,
|
|
37
|
-
onValueChange:
|
|
37
|
+
onValueChange: s
|
|
38
38
|
}) {
|
|
39
39
|
return /* @__PURE__ */ e(
|
|
40
40
|
c.RadioGroup,
|
|
41
41
|
{
|
|
42
|
-
className:
|
|
42
|
+
className: k,
|
|
43
43
|
value: m,
|
|
44
|
-
onValueChange:
|
|
45
|
-
"aria-label":
|
|
46
|
-
children: t.map((
|
|
44
|
+
onValueChange: s,
|
|
45
|
+
"aria-label": n,
|
|
46
|
+
children: t.map((a) => /* @__PURE__ */ i(
|
|
47
47
|
c.RadioItem,
|
|
48
48
|
{
|
|
49
|
-
className:
|
|
50
|
-
value:
|
|
51
|
-
disabled:
|
|
49
|
+
className: u,
|
|
50
|
+
value: a.value,
|
|
51
|
+
disabled: a.disabled,
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ i("span", { children: [
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
a.label,
|
|
55
|
+
a.tier ? /* @__PURE__ */ e("sup", { className: "media-menu__tier", children: a.tier }) : null
|
|
56
56
|
] }),
|
|
57
|
-
|
|
57
|
+
a.badge ? /* @__PURE__ */ e("span", { className: "media-badge", children: a.badge }) : null,
|
|
58
58
|
/* @__PURE__ */ e(
|
|
59
59
|
c.ItemIndicator,
|
|
60
60
|
{
|
|
61
|
-
checked:
|
|
61
|
+
checked: a.value === m,
|
|
62
62
|
forceMount: !0,
|
|
63
63
|
className: "media-menu__indicator",
|
|
64
64
|
children: /* @__PURE__ */ e(f, { className: "media-icon" })
|
|
@@ -66,77 +66,79 @@ function M({
|
|
|
66
66
|
)
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
|
|
69
|
+
a.value
|
|
70
70
|
))
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
value: u,
|
|
74
|
+
function j({
|
|
75
|
+
title: n,
|
|
76
|
+
icon: t,
|
|
77
|
+
ariaLabel: m,
|
|
78
|
+
options: s,
|
|
79
|
+
value: a,
|
|
81
80
|
onValueChange: _
|
|
82
81
|
}) {
|
|
82
|
+
const N = s.find((o) => o.value === a)?.label;
|
|
83
83
|
return /* @__PURE__ */ i(c.Root, { children: [
|
|
84
84
|
/* @__PURE__ */ e(
|
|
85
85
|
c.Trigger,
|
|
86
86
|
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */ e("span", { children: t }),
|
|
87
|
+
className: l(u, "media-menu__item--submenu"),
|
|
88
|
+
render: (o) => /* @__PURE__ */ i("div", { ...o, children: [
|
|
89
|
+
t,
|
|
90
|
+
/* @__PURE__ */ e("span", { children: n }),
|
|
92
91
|
/* @__PURE__ */ i("span", { className: "media-menu__hint", children: [
|
|
93
|
-
/* @__PURE__ */ e(
|
|
94
|
-
/* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ e("span", { className: "media-menu__hint-label", children: N }),
|
|
93
|
+
/* @__PURE__ */ e(d, {})
|
|
95
94
|
] })
|
|
96
95
|
] })
|
|
97
96
|
}
|
|
98
97
|
),
|
|
99
|
-
/* @__PURE__ */ i(c.Content, { className:
|
|
100
|
-
/* @__PURE__ */ i(c.
|
|
101
|
-
/* @__PURE__ */ e(
|
|
102
|
-
|
|
98
|
+
/* @__PURE__ */ i(c.Content, { className: S, children: [
|
|
99
|
+
/* @__PURE__ */ i(c.Item, { className: T, children: [
|
|
100
|
+
/* @__PURE__ */ e(d, { flipped: !0 }),
|
|
101
|
+
n
|
|
103
102
|
] }),
|
|
104
|
-
/* @__PURE__ */ e(c.Separator, { className:
|
|
103
|
+
/* @__PURE__ */ e(c.Separator, { className: I }),
|
|
105
104
|
/* @__PURE__ */ e(
|
|
106
|
-
|
|
105
|
+
g,
|
|
107
106
|
{
|
|
108
|
-
ariaLabel:
|
|
109
|
-
options:
|
|
110
|
-
value:
|
|
107
|
+
ariaLabel: m,
|
|
108
|
+
options: s,
|
|
109
|
+
value: a,
|
|
111
110
|
onValueChange: _
|
|
112
111
|
}
|
|
113
112
|
)
|
|
114
113
|
] })
|
|
115
114
|
] });
|
|
116
115
|
}
|
|
117
|
-
const
|
|
118
|
-
function
|
|
116
|
+
const C = 10;
|
|
117
|
+
function L({ direction: n }) {
|
|
119
118
|
return /* @__PURE__ */ i("span", { className: "media-icon__container", children: [
|
|
120
119
|
/* @__PURE__ */ e(
|
|
121
120
|
h,
|
|
122
121
|
{
|
|
123
|
-
className:
|
|
122
|
+
className: l("media-icon media-icon--seek", n === "back" && "media-icon--flipped")
|
|
124
123
|
}
|
|
125
124
|
),
|
|
126
|
-
/* @__PURE__ */ e("span", { className: "media-icon__label", children:
|
|
125
|
+
/* @__PURE__ */ e("span", { className: "media-icon__label", children: C })
|
|
127
126
|
] });
|
|
128
127
|
}
|
|
129
128
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
129
|
+
M as ICON_BUTTON,
|
|
130
|
+
T as MENU_BACK,
|
|
131
|
+
x as MENU_CONTENT,
|
|
132
|
+
k as MENU_GROUP,
|
|
133
|
+
u as MENU_ITEM,
|
|
134
|
+
S as MENU_PANEL,
|
|
135
|
+
I as MENU_SEPARATOR,
|
|
136
|
+
d as MenuChevron,
|
|
137
|
+
g as MenuRadioOptions,
|
|
138
|
+
C as SEEK_TIME,
|
|
139
|
+
j as SettingsSubmenu,
|
|
140
|
+
A as SkinButton,
|
|
141
|
+
L as SkipButtonContent,
|
|
142
|
+
P as TooltipButton,
|
|
143
|
+
l as cx
|
|
142
144
|
};
|
|
@@ -15,9 +15,14 @@ export interface VideoPlayerError {
|
|
|
15
15
|
* Imperative control surface exposed via `ref`. A thin, store-driven adapter
|
|
16
16
|
* over the underlying video.js v10 player store — NOT a video.js `Player`
|
|
17
17
|
* instance. It exposes only the operations real consumers drive: the grid
|
|
18
|
-
* toolbar ("mute / pause all")
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* toolbar ("mute / pause all") and frame snapshots. Reads and actions delegate
|
|
19
|
+
* to the player store; `snapshot` uses the raw `<video>` element.
|
|
20
|
+
*
|
|
21
|
+
* No method throws. The store has no media element attached on its first
|
|
22
|
+
* commit, and this handle is registered for outside callers before that window
|
|
23
|
+
* closes, so mutations are silent no-ops until the `<video>` attaches. Playback
|
|
24
|
+
* that the player itself owns — autostart, suspension — is NOT driven through
|
|
25
|
+
* here; see the `suspended` prop.
|
|
21
26
|
*/
|
|
22
27
|
export interface VideoPlayerControl {
|
|
23
28
|
/** Resume playback. Resolves even if the browser blocks autoplay. */
|
|
@@ -43,6 +48,25 @@ export interface VideoPlayerControl {
|
|
|
43
48
|
/** Capture the current frame as a PNG data URL, or `null` when unavailable. */
|
|
44
49
|
snapshot(): string | null;
|
|
45
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Which of the optional transport controls the chrome renders.
|
|
53
|
+
*
|
|
54
|
+
* Named `optionalControls` rather than `controls` on purpose: on a video
|
|
55
|
+
* component `controls` reads as the HTML attribute that toggles the whole bar.
|
|
56
|
+
*
|
|
57
|
+
* All three default to `false`. They send playback somewhere else — another
|
|
58
|
+
* screen, a floating window — which a wall of surveillance tiles has no use
|
|
59
|
+
* for, and each one costs a button in a chrome that has to stay readable at
|
|
60
|
+
* 320x180. A consumer that wants them opts in explicitly.
|
|
61
|
+
*/
|
|
62
|
+
export interface VideoPlayerOptionalControls {
|
|
63
|
+
/** Google Cast button. Only renders where the platform supports casting. */
|
|
64
|
+
cast?: boolean;
|
|
65
|
+
/** AirPlay button. Only renders on platforms that expose it (Safari). */
|
|
66
|
+
airPlay?: boolean;
|
|
67
|
+
/** Picture-in-picture button. */
|
|
68
|
+
pictureInPicture?: boolean;
|
|
69
|
+
}
|
|
46
70
|
/**
|
|
47
71
|
* Public props of the `VideoPlayer` component.
|
|
48
72
|
*
|
|
@@ -64,6 +88,20 @@ export interface VideoPlayerProps {
|
|
|
64
88
|
* `'minimal'` for dense grid tiles. See {@link VideoPlayerVariant}.
|
|
65
89
|
*/
|
|
66
90
|
variant?: VideoPlayerVariant;
|
|
91
|
+
/**
|
|
92
|
+
* Soft-suspend playback while the player is hidden but kept alive (e.g.
|
|
93
|
+
* behind an inactive keep-alive tab). While `true` the player pauses what it
|
|
94
|
+
* was playing and withholds its autostart, freeing video decode without
|
|
95
|
+
* touching the store, the playhead or the DOM. Flipping back to `false`
|
|
96
|
+
* resumes ONLY what the suspension itself withheld — never a clip the user
|
|
97
|
+
* paused by hand, never one that already ended. Defaults to `false`.
|
|
98
|
+
*/
|
|
99
|
+
suspended?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Opt in to the transport controls that are hidden by default (Cast, AirPlay,
|
|
102
|
+
* picture-in-picture). See {@link VideoPlayerOptionalControls}.
|
|
103
|
+
*/
|
|
104
|
+
optionalControls?: VideoPlayerOptionalControls;
|
|
67
105
|
/**
|
|
68
106
|
* Optional className applied to the root (container) slot. Intended for
|
|
69
107
|
* plain/static classes: composing an Emotion-registered class (e.g. via
|
|
@@ -72,7 +110,7 @@ export interface VideoPlayerProps {
|
|
|
72
110
|
* distinct incoming style. Style the surrounding element instead.
|
|
73
111
|
*/
|
|
74
112
|
className?: string;
|
|
75
|
-
/** Called once the
|
|
113
|
+
/** Called once the media element holds enough data to start playback. */
|
|
76
114
|
onReady?: () => void;
|
|
77
115
|
/** Called when playback starts (or resumes). */
|
|
78
116
|
onPlay?: () => void;
|
|
@@ -112,7 +150,7 @@ export type VideoPlayerVariant = keyof typeof VIDEO_PLAYER_VARIANTS;
|
|
|
112
150
|
* `variant` lives here because it drives styling, not just markup: the `root`
|
|
113
151
|
* slot spreads ONE of the two translated vendor stylesheets depending on it.
|
|
114
152
|
* Spreading both would inject ~1900 unused declarations and, worse, emit the
|
|
115
|
-
* un-scopable
|
|
153
|
+
* un-scopable at-rules
|
|
116
154
|
* twice into the global namespace, since both sheets declare them identically.
|
|
117
155
|
*/
|
|
118
156
|
export type VideoPlayerOwnerState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,oCAAoC,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,oCAAoC,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,sBAAsB;IACtB,KAAK,IAAI,IAAI,CAAC;IACd,4CAA4C;IAC5C,QAAQ,IAAI,OAAO,CAAC;IACpB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/B,6CAA6C;IAC7C,OAAO,IAAI,OAAO,CAAC;IACnB,2EAA2E;IAC3E,MAAM,IAAI,OAAO,CAAC;IAClB,+DAA+D;IAC/D,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,yEAAyE;IACzE,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,wEAAwE;IACxE,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,gDAAgD;IAChD,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,+EAA+E;IAC/E,QAAQ,IAAI,MAAM,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