@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
|
@@ -15,12 +15,12 @@ import { VideoPlayerProps } from './types';
|
|
|
15
15
|
* state.
|
|
16
16
|
*
|
|
17
17
|
* Highlights:
|
|
18
|
-
* - **One composed v10 skin** — the chrome (controls, layout, poster,
|
|
19
|
-
*
|
|
18
|
+
* - **One composed v10 skin** — the chrome (controls, layout, poster, live
|
|
19
|
+
* button) is owned by `GclickVideoSkin`, assembled from the dependency's
|
|
20
20
|
* building blocks + official `media-*` / `video-*` classes (no custom
|
|
21
21
|
* per-control CSS).
|
|
22
22
|
* - **Live ↔ VOD in one skin** — while the manifest is live the control bar
|
|
23
|
-
* shows the
|
|
23
|
+
* shows the live button and hides the seek region; once it ends
|
|
24
24
|
* (`#EXT-X-ENDLIST` → `streamType: on-demand`) the seek bar + time displays
|
|
25
25
|
* appear. Driven by `isLive`, so the skin never swaps and the `<video>` is
|
|
26
26
|
* never remounted (no reload). See `GclickVideoSkin`.
|
|
@@ -34,9 +34,10 @@ import { VideoPlayerProps } from './types';
|
|
|
34
34
|
* `VideoPlayer.styles.ts`). The player needs a parent with a definite height.
|
|
35
35
|
* - **Poster** — `poster` is forwarded to the skin's poster slot (e.g. a cloud
|
|
36
36
|
* recording snapshot).
|
|
37
|
-
* - **Two vendor skins** — `variant` picks between the dependency's
|
|
38
|
-
* (full chrome) and `minimal
|
|
39
|
-
*
|
|
37
|
+
* - **Two vendor skins** — `variant` picks between the dependency's Default
|
|
38
|
+
* skin (`default`, the full chrome) and its Neutral skin (`minimal`, leaner,
|
|
39
|
+
* built for dense grid tiles; Minimal before 10.0.0-rc.5). Only the selected
|
|
40
|
+
* stylesheet is injected; see `VideoPlayer.styles.ts`.
|
|
40
41
|
* - **React 19 ref-as-prop** — `ref` resolves to a {@link VideoPlayerControl}
|
|
41
42
|
* without `forwardRef`.
|
|
42
43
|
* - **App language** — the chrome follows the GClick language
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayer.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/VideoPlayer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"VideoPlayer.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/VideoPlayer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,MAAM,EACN,OAAuC,EACvC,SAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,GAAG,GACJ,EAAE,gBAAgB,2DAiClB"}
|
|
@@ -40,11 +40,10 @@ export declare const videoPlayerResponsiveStyles: Record<VideoPlayerVariant, CSS
|
|
|
40
40
|
*
|
|
41
41
|
* What is ours is a closed list, held by `VideoPlayer.styles.test.ts`: the
|
|
42
42
|
* wrapper's size, the `content-box` sizing a host global would otherwise
|
|
43
|
-
* override, two of the vendor's documented tokens, the responsive steps
|
|
44
|
-
* (which also drop the ±10 s buttons on a narrow player)
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* nothing else here patches the vendor.
|
|
43
|
+
* override, two of the vendor's documented tokens, and the responsive steps
|
|
44
|
+
* below (which also drop the ±10 s buttons on a narrow player). The skin resets
|
|
45
|
+
* its own buttons and sets its own colours, with its own fallbacks where a
|
|
46
|
+
* browser lacks a colour function, so nothing else here patches the vendor.
|
|
48
47
|
*/
|
|
49
48
|
export declare const videoPlayerStyles: VideoPlayerStyles;
|
|
50
49
|
//# sourceMappingURL=VideoPlayer.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayer.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/VideoPlayer.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAyB,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"VideoPlayer.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/VideoPlayer.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAyB,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA8C5F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,kBAAkB,EAAE,SAAS,CAwG7E,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAsC/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VIDEO_PLAYER_VARIANTS as e } from "./constants.js";
|
|
2
2
|
import { videojsDefaultSkinStyles as n } from "./VideojsDefaultSkin.styles.js";
|
|
3
|
-
import {
|
|
3
|
+
import { videojsNeutralSkinStyles as d } from "./VideojsNeutralSkin.styles.js";
|
|
4
4
|
const t = {
|
|
5
5
|
"@container media-root (width < 288px)": {
|
|
6
6
|
'&[data-stream-type="live"] .media-settings-menu-trigger': {
|
|
@@ -22,7 +22,7 @@ const t = {
|
|
|
22
22
|
"& .media-mute-button, & .media-settings-menu-trigger, & .media-pip-button, & .media-cast-button, & .media-airplay-button": {
|
|
23
23
|
display: "none"
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, r = {
|
|
26
26
|
[e.default]: {
|
|
27
27
|
container: "m4l-video-player / size",
|
|
28
28
|
...t,
|
|
@@ -34,9 +34,12 @@ const t = {
|
|
|
34
34
|
* (where it drops its captions button), was measured to be too early: the
|
|
35
35
|
* buttons came back while the time group was still under the 16rem at
|
|
36
36
|
* which the vendor hides the times, so a tile up to 607px wide (with Cast,
|
|
37
|
-
* AirPlay and PiP) showed less than a 511px one. From 38rem both fit. A
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* AirPlay and PiP) showed less than a 511px one. From 38rem both fit. A gap
|
|
38
|
+
* of the vendor's own remains: from 32rem the outputs join the bar, and with
|
|
39
|
+
* AirPlay (WebKit only) and PiP the time group stays under 16rem up to
|
|
40
|
+
* 523px, so the times are gone from 512 to 523px, as in the vendor's skin.
|
|
41
|
+
* A single class is enough: outside any layer, it beats the layered rule
|
|
42
|
+
* that sets the button's `display`.
|
|
40
43
|
*/
|
|
41
44
|
"@container media-root (width < 38rem)": {
|
|
42
45
|
"& .media-seek-button": {
|
|
@@ -44,8 +47,22 @@ const t = {
|
|
|
44
47
|
}
|
|
45
48
|
},
|
|
46
49
|
// One 40px row is 40% of a 100px tile; French live without mute needs 209px.
|
|
50
|
+
// With the outputs on, the bar and their cluster each reach 48px in from
|
|
51
|
+
// their edge of the tile, so they would meet below 96px, as in the vendor's
|
|
52
|
+
// skin: from 100px they keep 4px apart.
|
|
47
53
|
"@container m4l-video-player (width < 216px) or (height < 100px)": {
|
|
48
54
|
"& .media-skin:not(:fullscreen)": a
|
|
55
|
+
},
|
|
56
|
+
// The vertical volume popover reaches 108px above mute (a 72px slider, 12px
|
|
57
|
+
// of padding at each end and a 12px offset), and mute's top sits 46px above
|
|
58
|
+
// the tile's bottom edge, 48px from 32rem: on a tile under 156px tall the
|
|
59
|
+
// popover, in the top layer, would cover whatever sits above the tile. Mute
|
|
60
|
+
// stays a toggle. From 42rem mute sits 52px up, so there the popover still
|
|
61
|
+
// leaves a tile 156–159px tall by up to 4px.
|
|
62
|
+
"@container m4l-video-player (height < 156px)": {
|
|
63
|
+
"& .media-skin:not(:fullscreen) .media-volume-popover": {
|
|
64
|
+
display: "none"
|
|
65
|
+
}
|
|
49
66
|
}
|
|
50
67
|
},
|
|
51
68
|
[e.minimal]: {
|
|
@@ -118,14 +135,14 @@ const t = {
|
|
|
118
135
|
* ONE sheet, never both. They share their `@layer` and `@property` keys,
|
|
119
136
|
* so spreading both would silently keep only the second sheet.
|
|
120
137
|
*/
|
|
121
|
-
...i?.variant === e.minimal ?
|
|
138
|
+
...i?.variant === e.minimal ? d : n,
|
|
122
139
|
position: "relative",
|
|
123
140
|
width: "100%",
|
|
124
141
|
height: "100%",
|
|
125
142
|
// The host's global `*, *::before, *::after { box-sizing: border-box }`
|
|
126
143
|
// reaches this wrapper and the skin root's own pseudo-elements, which the
|
|
127
|
-
// vendor's
|
|
128
|
-
// as the native sheet computes them.
|
|
144
|
+
// vendor's reset leaves out (`:where(.media-skin) :before` only reaches its
|
|
145
|
+
// descendants); keep them `content-box`, as the native sheet computes them.
|
|
129
146
|
boxSizing: "content-box",
|
|
130
147
|
"& .media-skin::before, & .media-skin::after": {
|
|
131
148
|
boxSizing: "content-box"
|
|
@@ -142,28 +159,10 @@ const t = {
|
|
|
142
159
|
"--media-font-family": o.typography.fontFamily,
|
|
143
160
|
// Which controls show at which size, and the ±10 s buttons among them: see
|
|
144
161
|
// `videoPlayerResponsiveStyles`.
|
|
145
|
-
...
|
|
146
|
-
/*
|
|
147
|
-
* A readable label on the error dialog's button where `contrast-color()`
|
|
148
|
-
* is missing (Chrome and Edge before 147, Samsung Internet).
|
|
149
|
-
*
|
|
150
|
-
* The vendor paints that label with `--media-primary-foreground`, the
|
|
151
|
-
* `contrast-color()` of the accent, and ships no fallback: without the
|
|
152
|
-
* function the colour is dropped and the label inherits the chrome's white,
|
|
153
|
-
* on the white accent. Here it gets what `contrast-color()` would pick,
|
|
154
|
-
* black or white by the accent's lightness; 0.5636 is the OKLab lightness of
|
|
155
|
-
* the grey that contrasts equally with both. The vendor's documented
|
|
156
|
-
* override, `--media-accent-text-color`, cannot be used: it also sets the
|
|
157
|
-
* hover and focus text of every button and menu row, which must stay white.
|
|
158
|
-
*/
|
|
159
|
-
"@supports not (color: contrast-color(red))": {
|
|
160
|
-
"& .media-skin": {
|
|
161
|
-
"--media-primary-foreground": "oklch(from var(--media-primary) clamp(0, (0.5636 - l) * 1000, 1) 0 0)"
|
|
162
|
-
}
|
|
163
|
-
}
|
|
162
|
+
...r[i?.variant ?? e.default]
|
|
164
163
|
})
|
|
165
164
|
};
|
|
166
165
|
export {
|
|
167
|
-
|
|
166
|
+
r as videoPlayerResponsiveStyles,
|
|
168
167
|
p as videoPlayerStyles
|
|
169
168
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideojsDefaultSkin.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/VideojsDefaultSkin.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAkDtD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"VideojsDefaultSkin.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/VideoPlayer/VideojsDefaultSkin.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAkDtD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,SA6+EtC,CAAC"}
|