@m4l/gclick 0.32.0 → 0.33.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/VideoPlayer/VideoPlayer.d.ts +7 -6
- package/components/VideoPlayer/VideoPlayer.d.ts.map +1 -1
- package/components/VideoPlayer/VideoPlayer.styles.d.ts +4 -5
- package/components/VideoPlayer/VideoPlayer.styles.d.ts.map +1 -1
- package/components/VideoPlayer/VideoPlayer.styles.js +27 -28
- package/components/VideoPlayer/VideojsDefaultSkin.styles.d.ts.map +1 -1
- package/components/VideoPlayer/VideojsDefaultSkin.styles.js +330 -397
- package/components/VideoPlayer/{VideojsMinimalSkin.styles.d.ts → VideojsNeutralSkin.styles.d.ts} +2 -2
- package/components/VideoPlayer/VideojsNeutralSkin.styles.d.ts.map +1 -0
- package/components/VideoPlayer/{VideojsMinimalSkin.styles.js → VideojsNeutralSkin.styles.js} +618 -672
- package/components/VideoPlayer/constants.d.ts +24 -7
- package/components/VideoPlayer/constants.d.ts.map +1 -1
- package/components/VideoPlayer/constants.js +12 -8
- package/components/VideoPlayer/hlsSource.d.ts +17 -9
- package/components/VideoPlayer/hlsSource.d.ts.map +1 -1
- package/components/VideoPlayer/hooks/useAccessErrorReporter.d.ts +4 -4
- package/components/VideoPlayer/hooks/useAccessErrorReporter.js +9 -9
- package/components/VideoPlayer/hooks/useMediaReadiness.d.ts +6 -7
- package/components/VideoPlayer/hooks/useMediaReadiness.d.ts.map +1 -1
- package/components/VideoPlayer/hooks/usePlayerControl.d.ts +6 -5
- package/components/VideoPlayer/hooks/usePlayerControl.d.ts.map +1 -1
- package/components/VideoPlayer/hooks/usePlayerControl.js +14 -11
- package/components/VideoPlayer/hooks/usePlayerEvents.d.ts +9 -4
- package/components/VideoPlayer/hooks/usePlayerEvents.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/GclickVideoSkin.d.ts +7 -6
- package/components/VideoPlayer/subcomponents/GclickVideoSkin.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/GclickVideoSkin.js +35 -35
- package/components/VideoPlayer/subcomponents/VideoPlayerStage.d.ts +1 -1
- package/components/VideoPlayer/subcomponents/VideoPlayerStage.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/VideoPlayerStage.js +16 -15
- package/components/VideoPlayer/subcomponents/skin/LiveButton.d.ts +24 -0
- package/components/VideoPlayer/subcomponents/skin/LiveButton.d.ts.map +1 -0
- package/components/VideoPlayer/subcomponents/skin/LiveButton.js +53 -0
- package/components/VideoPlayer/subcomponents/skin/MinimalVideoControls.d.ts +2 -2
- package/components/VideoPlayer/subcomponents/skin/VideoErrorDialog.d.ts +3 -3
- package/components/VideoPlayer/subcomponents/skin/VideoStatusIndicators.d.ts +2 -2
- package/components/VideoPlayer/subcomponents/skin/buttons.d.ts +2 -2
- package/components/VideoPlayer/subcomponents/skin/buttons.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/skin/buttons.js +14 -13
- package/components/VideoPlayer/subcomponents/skin/skinVariant.d.ts +3 -0
- package/components/VideoPlayer/subcomponents/skin/skinVariant.d.ts.map +1 -1
- package/components/VideoPlayer/subcomponents/skin/skinVariant.js +53 -51
- package/components/VideoPlayer/types.d.ts +7 -5
- package/components/VideoPlayer/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/components/VideoPlayer/VideojsMinimalSkin.styles.d.ts.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { useState as b, useCallback as L } from "react";
|
|
2
|
+
import { LiveButtonCore as u, LiveButtonDataAttrs as g } from "@videojs/core";
|
|
3
|
+
import { translateText as c } from "@videojs/core/i18n";
|
|
4
|
+
import { usePlayer as f, useTranslator as B, useButton as T, renderElement as k, selectLive as S, selectTime as A, selectBuffer as w } from "@videojs/react";
|
|
5
|
+
function s(e) {
|
|
6
|
+
const r = S(e), t = A(e), n = w(e);
|
|
7
|
+
return !r || !t || !n ? null : {
|
|
8
|
+
currentTime: t.currentTime,
|
|
9
|
+
seek: t.seek,
|
|
10
|
+
seekable: n.seekable,
|
|
11
|
+
liveEdgeStart: r.liveEdgeStart,
|
|
12
|
+
targetLiveWindow: r.targetLiveWindow
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function C({ render: e, className: r }) {
|
|
16
|
+
const [t] = b(() => new u()), n = f(), m = L(
|
|
17
|
+
(p) => {
|
|
18
|
+
const l = s(p);
|
|
19
|
+
return l ? (t.setMedia(l), t.getState()) : null;
|
|
20
|
+
},
|
|
21
|
+
[t]
|
|
22
|
+
), o = f(m), a = B(), { getButtonProps: v, buttonRef: d } = T({
|
|
23
|
+
displayName: "LiveButton",
|
|
24
|
+
// `useButton` activates only after `isDisabled` returned false.
|
|
25
|
+
onActivate: () => {
|
|
26
|
+
t.seekToLive(s(n.state));
|
|
27
|
+
},
|
|
28
|
+
isDisabled: () => !s(n.state)
|
|
29
|
+
});
|
|
30
|
+
if (!o)
|
|
31
|
+
return null;
|
|
32
|
+
const i = t.getAttrs(o);
|
|
33
|
+
return k(
|
|
34
|
+
"button",
|
|
35
|
+
{ render: e, className: r },
|
|
36
|
+
{
|
|
37
|
+
state: o,
|
|
38
|
+
stateAttrMap: g,
|
|
39
|
+
ref: d,
|
|
40
|
+
props: [
|
|
41
|
+
i,
|
|
42
|
+
{
|
|
43
|
+
children: c(u.defaultText, a),
|
|
44
|
+
"aria-label": c(i["aria-label"], a)
|
|
45
|
+
},
|
|
46
|
+
v()
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
C as LiveButton
|
|
53
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { VideoPlayerOptionalControls } from '../../types';
|
|
3
3
|
/**
|
|
4
|
-
* The minimal
|
|
5
|
-
* `
|
|
4
|
+
* The minimal variant's control bar, mirroring the vendor's Neutral skin
|
|
5
|
+
* (`neutral-video/layout/controls.tsx`).
|
|
6
6
|
*
|
|
7
7
|
* One wrapping bar in three groups: the transport at the start, the times and
|
|
8
8
|
* the slider in the middle (which the sheet moves to a row of its own on a
|
|
@@ -9,9 +9,9 @@ import { ReactNode } from 'react';
|
|
|
9
9
|
* on purpose. `ErrorDialog.Root` only provides the state; the surface is the
|
|
10
10
|
* `Popup` next to its `Backdrop`, and every part throws outside the root
|
|
11
11
|
* ("compound components must be used within an ErrorDialog.Root"). The class
|
|
12
|
-
* names changed
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* names changed twice before 10.0 (`media-error__*`, then `media-dialog__*`,
|
|
13
|
+
* now `media-dialog-*`), and a stale one renders an unstyled dialog — neither
|
|
14
|
+
* failure shows up until a stream actually fails.
|
|
15
15
|
*
|
|
16
16
|
* The title, description and close label are the vendor's own text, put in the
|
|
17
17
|
* app language by the `I18nProvider` that `VideoPlayer` mounts
|
|
@@ -10,8 +10,8 @@ import { ReactNode } from 'react';
|
|
|
10
10
|
* `StatusAnnouncer` is the same thing for screen readers: a live region that
|
|
11
11
|
* announces the state change, the only feedback a non-sighted operator gets
|
|
12
12
|
* from a keyboard shortcut. It hides itself only through the vendor's
|
|
13
|
-
* `media-status-announcer` rule —
|
|
14
|
-
* and under any other class the announcement shows on screen.
|
|
13
|
+
* `media-status-announcer` rule — the vendor ships no generic `media-sr-only`
|
|
14
|
+
* class — and under any other class the announcement shows on screen.
|
|
15
15
|
*/
|
|
16
16
|
export declare function VideoStatusIndicators(): ReactNode;
|
|
17
17
|
//# sourceMappingURL=VideoStatusIndicators.d.ts.map
|
|
@@ -30,8 +30,8 @@ export declare function ButtonTooltip({ children, label, ...props }: ButtonToolt
|
|
|
30
30
|
/** Play / pause / restart, with its tooltip. */
|
|
31
31
|
export declare function PlayButton(): ReactNode;
|
|
32
32
|
/**
|
|
33
|
-
* What follows play: the
|
|
34
|
-
*
|
|
33
|
+
* What follows play: the live button while live, or the ±10 s buttons once the
|
|
34
|
+
* stream is a recording — exactly the difference between the vendor's
|
|
35
35
|
* live-video and audio compositions.
|
|
36
36
|
*/
|
|
37
37
|
export declare function LiveOrSeekButtons({ isLive }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttons.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoPlayer/subcomponents/skin/buttons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,
|
|
1
|
+
{"version":3,"file":"buttons.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoPlayer/subcomponents/skin/buttons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAOL,OAAO,EACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAyB/D,uCAAuC;AACvC,wBAAgB,EAAE,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC,GAAG,MAAM,CAEtE;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAEnF;AAED,sFAAsF;AACtF,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7E,QAAQ,EAAE,YAAY,CAAC;IACvB,gFAAgF;IAChF,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,GAAG,SAAS,CAU1F;AAED,gDAAgD;AAChD,wBAAgB,UAAU,IAAI,SAAS,CAWtC;AA4BD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAY5E;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAA;CAAE,GAAG,SAAS,CAoCxG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as m } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { PlayButton as p,
|
|
2
|
+
import { PlayButton as p, CastButton as b, AirPlayButton as N, PiPButton as h, FullscreenButton as f, Tooltip as c, SeekButton as y } from "@videojs/react";
|
|
3
|
+
import { LiveButton as B } from "./LiveButton.js";
|
|
3
4
|
import { useSkinVariant as l } from "./skinVariant.js";
|
|
4
5
|
const u = 10;
|
|
5
6
|
function s(...t) {
|
|
@@ -17,7 +18,7 @@ function o({ children: t, label: n, ...r }) {
|
|
|
17
18
|
] })
|
|
18
19
|
] });
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function E() {
|
|
21
22
|
const { icons: t } = l();
|
|
22
23
|
return /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(p, { render: /* @__PURE__ */ e(i, {}), className: "media-play-button", children: [
|
|
23
24
|
/* @__PURE__ */ e(t.RestartIcon, { className: "media-button-icon media-play-button-restart-icon" }),
|
|
@@ -27,7 +28,7 @@ function x() {
|
|
|
27
28
|
}
|
|
28
29
|
function d({ seconds: t }) {
|
|
29
30
|
const { icons: n } = l(), r = t < 0;
|
|
30
|
-
return /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ e(
|
|
31
|
+
return /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(i, {}), className: "media-seek-button", seconds: t, children: /* @__PURE__ */ a("div", { className: "media-seek-button-content", children: [
|
|
31
32
|
/* @__PURE__ */ e(n.SeekIcon, { className: s("media-button-icon", r && "media-seek-button-backward-icon") }),
|
|
32
33
|
/* @__PURE__ */ e(
|
|
33
34
|
"span",
|
|
@@ -41,28 +42,28 @@ function d({ seconds: t }) {
|
|
|
41
42
|
)
|
|
42
43
|
] }) }) });
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
return t ? /* @__PURE__ */ e(
|
|
45
|
+
function S({ isLive: t }) {
|
|
46
|
+
return t ? /* @__PURE__ */ e(B, { render: /* @__PURE__ */ e(i, {}), className: "media-live-button" }) : /* @__PURE__ */ a(m, { children: [
|
|
46
47
|
/* @__PURE__ */ e(d, { seconds: -u }),
|
|
47
48
|
/* @__PURE__ */ e(d, { seconds: u })
|
|
48
49
|
] });
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function v({ outputs: t }) {
|
|
51
52
|
const { icons: n } = l();
|
|
52
53
|
return /* @__PURE__ */ a(m, { children: [
|
|
53
|
-
t.cast ? /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(
|
|
54
|
+
t.cast ? /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(b, { render: /* @__PURE__ */ e(i, {}), className: "media-cast-button", children: [
|
|
54
55
|
/* @__PURE__ */ e(n.CastEnterIcon, { className: "media-button-icon media-cast-button-enter-icon" }),
|
|
55
56
|
/* @__PURE__ */ e(n.CastExitIcon, { className: "media-button-icon media-cast-button-exit-icon" })
|
|
56
57
|
] }) }) : null,
|
|
57
|
-
t.airPlay ? /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(
|
|
58
|
+
t.airPlay ? /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(N, { render: /* @__PURE__ */ e(i, {}), className: "media-airplay-button", children: [
|
|
58
59
|
/* @__PURE__ */ e(n.AirPlayEnterIcon, { className: "media-button-icon media-airplay-button-enter-icon" }),
|
|
59
60
|
/* @__PURE__ */ e(n.AirPlayExitIcon, { className: "media-button-icon media-airplay-button-exit-icon" })
|
|
60
61
|
] }) }) : null,
|
|
61
|
-
t.pictureInPicture ? /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(
|
|
62
|
+
t.pictureInPicture ? /* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(h, { render: /* @__PURE__ */ e(i, {}), className: "media-pip-button", children: [
|
|
62
63
|
/* @__PURE__ */ e(n.PipEnterIcon, { className: "media-button-icon media-pip-button-enter-icon" }),
|
|
63
64
|
/* @__PURE__ */ e(n.PipExitIcon, { className: "media-button-icon media-pip-button-exit-icon" })
|
|
64
65
|
] }) }) : null,
|
|
65
|
-
/* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(
|
|
66
|
+
/* @__PURE__ */ e(o, { side: "top", children: /* @__PURE__ */ a(f, { render: /* @__PURE__ */ e(i, {}), className: "media-fullscreen-button", children: [
|
|
66
67
|
/* @__PURE__ */ e(n.FullscreenEnterIcon, { className: "media-button-icon media-fullscreen-button-enter-icon" }),
|
|
67
68
|
/* @__PURE__ */ e(n.FullscreenExitIcon, { className: "media-button-icon media-fullscreen-button-exit-icon" })
|
|
68
69
|
] }) })
|
|
@@ -71,8 +72,8 @@ function S({ outputs: t }) {
|
|
|
71
72
|
export {
|
|
72
73
|
i as Button,
|
|
73
74
|
o as ButtonTooltip,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
S as LiveOrSeekButtons,
|
|
76
|
+
v as OutputButtons,
|
|
77
|
+
E as PlayButton,
|
|
77
78
|
s as cx
|
|
78
79
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PopoverSide, SliderPreviewOverflow, VolumeSliderProps } from '@videojs/core';
|
|
3
|
+
import { VIDEO_PLAYER_VENDOR_THEMES } from '../../constants';
|
|
3
4
|
import { VideoPlayerVariant } from '../../types';
|
|
4
5
|
/** The default skin's icons, keyed by the vendor's own export names. */
|
|
5
6
|
declare const DEFAULT_ICONS: {
|
|
@@ -30,6 +31,8 @@ export type SkinIcons = typeof DEFAULT_ICONS;
|
|
|
30
31
|
/** What the pieces of the skin read from the active variant. */
|
|
31
32
|
export interface SkinVariant {
|
|
32
33
|
variant: VideoPlayerVariant;
|
|
34
|
+
/** The vendor theme the variant wears: the `data-theme` of the skin root. */
|
|
35
|
+
theme: (typeof VIDEO_PLAYER_VENDOR_THEMES)[VideoPlayerVariant];
|
|
33
36
|
icons: SkinIcons;
|
|
34
37
|
/** How the volume popover opens: the default skin stacks it, the minimal one slides it out sideways. */
|
|
35
38
|
volume: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skinVariant.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoPlayer/subcomponents/skin/skinVariant.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"skinVariant.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoPlayer/subcomponents/skin/skinVariant.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAgD3F,OAAO,EAAyB,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAyBtD,wEAAwE;AACxE,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;CAsBlB,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,SAAS,GAAG,OAAO,aAAa,CAAC;AA2B7C,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,6EAA6E;IAC7E,KAAK,EAAE,CAAC,OAAO,0BAA0B,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC/D,KAAK,EAAE,SAAS,CAAC;IACjB,wGAAwG;IACxG,MAAM,EAAE;QACN,IAAI,EAAE,WAAW,CAAC;QAClB,WAAW,EAAE,WAAW,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC;QAC3D,+EAA+E;QAC/E,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,wGAAwG;IACxG,eAAe,EAAE,qBAAqB,CAAC;CACxC;AAsBD,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,SAAS,CASZ;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
|
|
@@ -1,76 +1,78 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as r, useContext as
|
|
3
|
-
import { VolumeOffIcon as
|
|
4
|
-
import { VolumeOffIcon as F, VolumeLowIcon as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
AirPlayEnterIcon:
|
|
1
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext as r, useContext as a } from "react";
|
|
3
|
+
import { VolumeOffIcon as s, VolumeLowIcon as l, VolumeHighIcon as E, SwitchesIcon as u, SpinnerIcon as m, SpeedIcon as P, SeekIcon as p, RestartIcon as S, PlayIcon as h, PipExitIcon as f, PipEnterIcon as x, PauseIcon as C, GearIcon as V, FullscreenExitIcon as $, FullscreenEnterIcon as A, ChevronIcon as v, CheckIcon as w, CastExitIcon as y, CastEnterIcon as d, AirPlayExitIcon as k, AirPlayEnterIcon as O } from "@videojs/react/icons";
|
|
4
|
+
import { VolumeOffIcon as F, VolumeLowIcon as R, VolumeHighIcon as L, SwitchesIcon as _, SpinnerIcon as N, SpeedIcon as T, SeekIcon as g, RestartIcon as H, PlayIcon as G, PipExitIcon as D, PipEnterIcon as U, PauseIcon as Y, GearIcon as b, FullscreenExitIcon as j, FullscreenEnterIcon as z, ChevronIcon as K, CheckIcon as M, CastExitIcon as q, CastEnterIcon as B, AirPlayExitIcon as J, AirPlayEnterIcon as Q } from "@videojs/react/icons/neutral";
|
|
5
|
+
import { VIDEO_PLAYER_VENDOR_THEMES as o, VIDEO_PLAYER_VARIANTS as e } from "../../constants.js";
|
|
6
|
+
const W = {
|
|
7
|
+
AirPlayEnterIcon: O,
|
|
8
8
|
AirPlayExitIcon: k,
|
|
9
|
-
CastEnterIcon:
|
|
10
|
-
CastExitIcon:
|
|
11
|
-
CheckIcon:
|
|
9
|
+
CastEnterIcon: d,
|
|
10
|
+
CastExitIcon: y,
|
|
11
|
+
CheckIcon: w,
|
|
12
12
|
ChevronIcon: v,
|
|
13
|
-
FullscreenEnterIcon:
|
|
14
|
-
FullscreenExitIcon:
|
|
15
|
-
GearIcon:
|
|
16
|
-
PauseIcon:
|
|
17
|
-
PipEnterIcon:
|
|
18
|
-
PipExitIcon:
|
|
19
|
-
PlayIcon:
|
|
20
|
-
RestartIcon:
|
|
13
|
+
FullscreenEnterIcon: A,
|
|
14
|
+
FullscreenExitIcon: $,
|
|
15
|
+
GearIcon: V,
|
|
16
|
+
PauseIcon: C,
|
|
17
|
+
PipEnterIcon: x,
|
|
18
|
+
PipExitIcon: f,
|
|
19
|
+
PlayIcon: h,
|
|
20
|
+
RestartIcon: S,
|
|
21
21
|
SeekIcon: p,
|
|
22
|
-
SpeedIcon:
|
|
23
|
-
SpinnerIcon:
|
|
22
|
+
SpeedIcon: P,
|
|
23
|
+
SpinnerIcon: m,
|
|
24
24
|
SwitchesIcon: u,
|
|
25
|
-
VolumeHighIcon:
|
|
26
|
-
VolumeLowIcon:
|
|
27
|
-
VolumeOffIcon:
|
|
28
|
-
},
|
|
29
|
-
AirPlayEnterIcon:
|
|
30
|
-
AirPlayExitIcon:
|
|
31
|
-
CastEnterIcon:
|
|
32
|
-
CastExitIcon:
|
|
33
|
-
CheckIcon:
|
|
25
|
+
VolumeHighIcon: E,
|
|
26
|
+
VolumeLowIcon: l,
|
|
27
|
+
VolumeOffIcon: s
|
|
28
|
+
}, X = {
|
|
29
|
+
AirPlayEnterIcon: Q,
|
|
30
|
+
AirPlayExitIcon: J,
|
|
31
|
+
CastEnterIcon: B,
|
|
32
|
+
CastExitIcon: q,
|
|
33
|
+
CheckIcon: M,
|
|
34
34
|
ChevronIcon: K,
|
|
35
35
|
FullscreenEnterIcon: z,
|
|
36
36
|
FullscreenExitIcon: j,
|
|
37
37
|
GearIcon: b,
|
|
38
|
-
PauseIcon:
|
|
39
|
-
PipEnterIcon:
|
|
40
|
-
PipExitIcon:
|
|
41
|
-
PlayIcon:
|
|
38
|
+
PauseIcon: Y,
|
|
39
|
+
PipEnterIcon: U,
|
|
40
|
+
PipExitIcon: D,
|
|
41
|
+
PlayIcon: G,
|
|
42
42
|
RestartIcon: H,
|
|
43
|
-
SeekIcon:
|
|
44
|
-
SpeedIcon:
|
|
45
|
-
SpinnerIcon:
|
|
46
|
-
SwitchesIcon:
|
|
43
|
+
SeekIcon: g,
|
|
44
|
+
SpeedIcon: T,
|
|
45
|
+
SpinnerIcon: N,
|
|
46
|
+
SwitchesIcon: _,
|
|
47
47
|
VolumeHighIcon: L,
|
|
48
|
-
VolumeLowIcon:
|
|
48
|
+
VolumeLowIcon: R,
|
|
49
49
|
VolumeOffIcon: F
|
|
50
50
|
}, n = {
|
|
51
51
|
default: {
|
|
52
|
-
variant:
|
|
53
|
-
|
|
52
|
+
variant: e.default,
|
|
53
|
+
theme: o.default,
|
|
54
|
+
icons: W,
|
|
54
55
|
volume: { side: "top", orientation: "vertical", showTooltip: !1 },
|
|
55
56
|
previewOverflow: "visible"
|
|
56
57
|
},
|
|
57
58
|
minimal: {
|
|
58
|
-
variant:
|
|
59
|
-
|
|
59
|
+
variant: e.minimal,
|
|
60
|
+
theme: o.minimal,
|
|
61
|
+
icons: X,
|
|
60
62
|
volume: { side: "right", orientation: "horizontal", showTooltip: !0 },
|
|
61
63
|
previewOverflow: "clamp"
|
|
62
64
|
}
|
|
63
|
-
},
|
|
64
|
-
function
|
|
65
|
-
variant:
|
|
66
|
-
children:
|
|
65
|
+
}, c = r(n.default);
|
|
66
|
+
function In({
|
|
67
|
+
variant: I,
|
|
68
|
+
children: t
|
|
67
69
|
}) {
|
|
68
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ i(c, { value: n[I] ?? n.default, children: t });
|
|
69
71
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
72
|
+
function tn() {
|
|
73
|
+
return a(c);
|
|
72
74
|
}
|
|
73
75
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
In as SkinVariantProvider,
|
|
77
|
+
tn as useSkinVariant
|
|
76
78
|
};
|
|
@@ -58,9 +58,9 @@ export interface VideoPlayerControl {
|
|
|
58
58
|
/** Whether playback is currently paused. */
|
|
59
59
|
isPaused(): boolean;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
* Set the muted flag to a specific value. Repeating a value is a no-op, also
|
|
62
|
+
* within one task. Unmuting at volume 0 restores an audible level, as the
|
|
63
|
+
* vendor's mute button does.
|
|
64
64
|
*/
|
|
65
65
|
setMuted(muted: boolean): void;
|
|
66
66
|
/**
|
|
@@ -194,8 +194,10 @@ export interface VideoPlayerProps {
|
|
|
194
194
|
* `default` is the full chrome; `minimal` drops the frosted control-bar panel
|
|
195
195
|
* (its popups, menus and tooltips stay frosted) and groups the time displays —
|
|
196
196
|
* leaner for dense grid tiles, which is what the vendor designed it for (its
|
|
197
|
-
* layout reveals controls progressively through container queries). Both
|
|
198
|
-
* from `@videojs/react`'s `/video` preset
|
|
197
|
+
* layout reveals controls progressively through container queries). Both skins
|
|
198
|
+
* come from `@videojs/react`'s `/video` preset: `default` wears its Default
|
|
199
|
+
* skin and `minimal` its Neutral skin, which 10.0.0-rc.5 renamed from Minimal
|
|
200
|
+
* (v10#3092). The value stays `minimal`.
|
|
199
201
|
*/
|
|
200
202
|
export type VideoPlayerVariant = keyof typeof VIDEO_PLAYER_VARIANTS;
|
|
201
203
|
/**
|
|
@@ -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;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,+GAA+G;IAC/G,MAAM,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;;;OAOG;IACH,MAAM,EAAE,aAAa,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvD;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,sBAAsB;IACtB,KAAK,I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,IAAI,CAAC;IACpB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACvD;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/D;;;OAGG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;CAC/B;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;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,+GAA+G;IAC/G,MAAM,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,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1
|
{
|
|
2
2
|
"name": "@m4l/gclick",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@tanstack/react-virtual": "3.13.23",
|
|
43
|
-
"@videojs/core": "10.
|
|
44
|
-
"@videojs/hlsjs-video": "10.
|
|
45
|
-
"@videojs/react": "10.
|
|
46
|
-
"@videojs/store": "10.
|
|
43
|
+
"@videojs/core": "10.1.0",
|
|
44
|
+
"@videojs/hlsjs-video": "10.1.0",
|
|
45
|
+
"@videojs/react": "10.1.0",
|
|
46
|
+
"@videojs/store": "10.1.0",
|
|
47
47
|
"echarts": "6.0.0",
|
|
48
48
|
"echarts-for-react": "3.0.6",
|
|
49
49
|
"@m4l/gclick-realtime": "^1.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VideojsMinimalSkin.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/VideojsMinimalSkin.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAkDtD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,SA0iFtC,CAAC"}
|