@supr-design/flux-player 1.1.0 → 1.2.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 +6 -0
- package/flux-player.es.js +41 -13
- package/flux-player.umd.js +2 -2
- package/package.json +1 -1
- package/styles.css +12 -0
- package/types.d.ts +5 -0
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -499,3 +499,15 @@
|
|
|
499
499
|
.flux-player-toolbar-group .flux-hidden {
|
|
500
500
|
display: none;
|
|
501
501
|
}
|
|
502
|
+
|
|
503
|
+
.flux-player-icon-btn > img {
|
|
504
|
+
width: var(--flux-player-control-iconSize, 24px);
|
|
505
|
+
height: var(--flux-player-control-iconSize, 24px);
|
|
506
|
+
object-fit: contain;
|
|
507
|
+
}
|
|
508
|
+
.flux-player-big-play > img,
|
|
509
|
+
.flux-player-replay > img {
|
|
510
|
+
width: 30px;
|
|
511
|
+
height: 30px;
|
|
512
|
+
object-fit: contain;
|
|
513
|
+
}
|
package/types.d.ts
CHANGED
|
@@ -47,7 +47,11 @@ export interface ToolbarConfig {
|
|
|
47
47
|
onClick: (player: Pick<PlayerInstance, 'getState' | 'seek' | 'setMuted'>) => void;
|
|
48
48
|
}>;
|
|
49
49
|
}
|
|
50
|
+
export type PlayerIconName = 'play' | 'pause' | 'replay' | 'volume' | 'mute' | 'settings' | 'pip' | 'fullscreen' | 'fullscreenExit';
|
|
51
|
+
/** Image URLs for built-in controls. Unspecified icons use the default artwork. */
|
|
52
|
+
export type PlayerIcons = Partial<Record<PlayerIconName, string>>;
|
|
50
53
|
export interface UIConfig {
|
|
54
|
+
icons?: PlayerIcons;
|
|
51
55
|
toolbar?: ToolbarConfig;
|
|
52
56
|
headless?: boolean;
|
|
53
57
|
target?: string | HTMLElement;
|
|
@@ -193,6 +197,7 @@ export interface PlayerInstance {
|
|
|
193
197
|
setVolume(volume: number): void;
|
|
194
198
|
setMuted(muted: boolean): void;
|
|
195
199
|
setPlaybackRate(rate: number): void;
|
|
200
|
+
setIcons(icons: PlayerIcons): void;
|
|
196
201
|
setToolbar(toolbar: ToolbarConfig): void;
|
|
197
202
|
setTheme(theme: string | ThemeOverrideConfig): void;
|
|
198
203
|
setQuality(level: string | number | "auto"): void;
|