unified-video-framework 1.4.437 → 1.4.439
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 +1 -1
- package/packages/core/dist/version.d.ts +1 -1
- package/packages/core/dist/version.js +1 -1
- package/packages/core/src/version.ts +1 -1
- package/packages/web/dist/WebPlayer.d.ts +28 -0
- package/packages/web/dist/WebPlayer.d.ts.map +1 -1
- package/packages/web/dist/WebPlayer.js +679 -8
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/dist/index.d.ts +1 -1
- package/packages/web/dist/index.d.ts.map +1 -1
- package/packages/web/dist/index.js.map +1 -1
- package/packages/web/dist/react/types/FlashNewsTickerTypes.d.ts +61 -0
- package/packages/web/dist/react/types/FlashNewsTickerTypes.d.ts.map +1 -1
- package/packages/web/src/WebPlayer.ts +912 -9
- package/packages/web/src/index.ts +10 -1
- package/packages/web/src/react/types/FlashNewsTickerTypes.ts +214 -1
|
@@ -20,8 +20,17 @@ export type {
|
|
|
20
20
|
FlashNewsTickerAPI,
|
|
21
21
|
TickerDisplayConfig,
|
|
22
22
|
TickerStyleVariant,
|
|
23
|
+
TickerLayoutStyle,
|
|
23
24
|
BroadcastTheme,
|
|
24
|
-
BroadcastStyleConfig
|
|
25
|
+
BroadcastStyleConfig,
|
|
26
|
+
IntroAnimationType,
|
|
27
|
+
ItemTransitionType,
|
|
28
|
+
TwoLineDisplayConfig,
|
|
29
|
+
TopLineConfig,
|
|
30
|
+
BottomLineConfig,
|
|
31
|
+
DecorativeShapesConfig,
|
|
32
|
+
SeparatorType,
|
|
33
|
+
ItemCyclingConfig
|
|
25
34
|
} from './react/types/FlashNewsTickerTypes';
|
|
26
35
|
|
|
27
36
|
// Version
|
|
@@ -13,6 +13,34 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export type TickerStyleVariant = 'simple' | 'broadcast';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Layout styles for broadcast ticker
|
|
18
|
+
* - 'simple': Single scrolling line
|
|
19
|
+
* - 'broadcast': Header + single scrolling line
|
|
20
|
+
* - 'two-line': Header + static headline + scrolling detail
|
|
21
|
+
* - 'professional': Full TV-style with all features (header, two-line, intro animations)
|
|
22
|
+
*/
|
|
23
|
+
export type TickerLayoutStyle = 'simple' | 'broadcast' | 'two-line' | 'professional';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Intro animation types for news items
|
|
27
|
+
* - 'none': No intro animation
|
|
28
|
+
* - 'slide-in': Slide in from left
|
|
29
|
+
* - 'scale': Scale up from center
|
|
30
|
+
* - 'flash': Flashing effect
|
|
31
|
+
* - 'pulse': Pulsing effect
|
|
32
|
+
* - 'shake': Shake effect
|
|
33
|
+
*/
|
|
34
|
+
export type IntroAnimationType = 'none' | 'slide-in' | 'scale' | 'flash' | 'pulse' | 'shake';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Item transition types
|
|
38
|
+
* - 'fade': Fade out/in
|
|
39
|
+
* - 'slide': Slide up out, slide in from bottom
|
|
40
|
+
* - 'none': Instant switch
|
|
41
|
+
*/
|
|
42
|
+
export type ItemTransitionType = 'fade' | 'slide' | 'none';
|
|
43
|
+
|
|
16
44
|
/**
|
|
17
45
|
* Broadcast style theme presets
|
|
18
46
|
*/
|
|
@@ -23,6 +51,131 @@ export type BroadcastTheme =
|
|
|
23
51
|
| 'news-blue' // Professional blue theme
|
|
24
52
|
| 'custom'; // Custom colors via headerColor/bodyColor
|
|
25
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for the top line (static headline) in two-line display
|
|
56
|
+
*/
|
|
57
|
+
export interface TopLineConfig {
|
|
58
|
+
/** Display mode: 'static' keeps headline visible, 'scroll' makes it scroll slowly */
|
|
59
|
+
mode?: 'static' | 'scroll';
|
|
60
|
+
|
|
61
|
+
/** Enable multi-line text wrapping. Default: false */
|
|
62
|
+
multiLine?: boolean;
|
|
63
|
+
|
|
64
|
+
/** Maximum lines before truncation with ellipsis. Default: 2 */
|
|
65
|
+
maxLines?: number;
|
|
66
|
+
|
|
67
|
+
/** Minimum height in pixels. Default: 32 */
|
|
68
|
+
minHeight?: number;
|
|
69
|
+
|
|
70
|
+
/** Font size in pixels. Default: 16 */
|
|
71
|
+
fontSize?: number;
|
|
72
|
+
|
|
73
|
+
/** CSS line-height for multi-line text spacing. Default: 1.3 */
|
|
74
|
+
lineHeight?: number;
|
|
75
|
+
|
|
76
|
+
/** Text color. Defaults to parent textColor */
|
|
77
|
+
textColor?: string;
|
|
78
|
+
|
|
79
|
+
/** Background color. Defaults to transparent */
|
|
80
|
+
backgroundColor?: string;
|
|
81
|
+
|
|
82
|
+
/** Padding in pixels. Default: 8 */
|
|
83
|
+
padding?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Configuration for the bottom line (scrolling detail) in two-line display
|
|
88
|
+
*/
|
|
89
|
+
export interface BottomLineConfig {
|
|
90
|
+
/** Scroll speed in pixels per second. Default: 80 */
|
|
91
|
+
speed?: number;
|
|
92
|
+
|
|
93
|
+
/** Height in pixels. Default: 28 */
|
|
94
|
+
height?: number;
|
|
95
|
+
|
|
96
|
+
/** Font size in pixels. Default: 14 */
|
|
97
|
+
fontSize?: number;
|
|
98
|
+
|
|
99
|
+
/** Text color. Defaults to parent textColor */
|
|
100
|
+
textColor?: string;
|
|
101
|
+
|
|
102
|
+
/** Background color. Defaults to transparent */
|
|
103
|
+
backgroundColor?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Configuration for two-line display (headline + scrolling detail)
|
|
108
|
+
*/
|
|
109
|
+
export interface TwoLineDisplayConfig {
|
|
110
|
+
/** Enable two-line display mode. Default: false */
|
|
111
|
+
enabled?: boolean;
|
|
112
|
+
|
|
113
|
+
/** Top line (headline) configuration */
|
|
114
|
+
topLine?: TopLineConfig;
|
|
115
|
+
|
|
116
|
+
/** Bottom line (scrolling detail) configuration */
|
|
117
|
+
bottomLine?: BottomLineConfig;
|
|
118
|
+
|
|
119
|
+
/** Separator line between top and bottom. Default: true */
|
|
120
|
+
showSeparator?: boolean;
|
|
121
|
+
|
|
122
|
+
/** Separator color. Default: 'rgba(255,255,255,0.2)' */
|
|
123
|
+
separatorColor?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Decorative separator type
|
|
128
|
+
*/
|
|
129
|
+
export type SeparatorType = 'line' | 'pulse-line' | 'chevron' | 'diamond' | 'dot';
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Configuration for decorative shapes and separators
|
|
133
|
+
*/
|
|
134
|
+
export interface DecorativeShapesConfig {
|
|
135
|
+
/** Separator between globe and header text */
|
|
136
|
+
headerSeparator?: {
|
|
137
|
+
/** Separator type. Default: 'line' */
|
|
138
|
+
type?: SeparatorType;
|
|
139
|
+
/** Enable animation. Default: true */
|
|
140
|
+
animated?: boolean;
|
|
141
|
+
/** Color. Default: '#ffffff' */
|
|
142
|
+
color?: string;
|
|
143
|
+
/** Width in pixels. Default: 2 */
|
|
144
|
+
width?: number;
|
|
145
|
+
/** Height in pixels. Default: 20 */
|
|
146
|
+
height?: number;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Configuration for automatic item cycling
|
|
152
|
+
*/
|
|
153
|
+
export interface ItemCyclingConfig {
|
|
154
|
+
/** Enable automatic item cycling. Default: false */
|
|
155
|
+
enabled?: boolean;
|
|
156
|
+
|
|
157
|
+
/** Default duration per item in seconds. Default: 10 */
|
|
158
|
+
defaultDuration?: number;
|
|
159
|
+
|
|
160
|
+
/** Transition type between items. Default: 'fade' */
|
|
161
|
+
transitionType?: ItemTransitionType;
|
|
162
|
+
|
|
163
|
+
/** Transition duration in ms. Default: 500 */
|
|
164
|
+
transitionDuration?: number;
|
|
165
|
+
|
|
166
|
+
/** Show progress bar for current item. Default: false */
|
|
167
|
+
showProgress?: boolean;
|
|
168
|
+
|
|
169
|
+
/** Progress bar color. Default: '#ffffff' */
|
|
170
|
+
progressColor?: string;
|
|
171
|
+
|
|
172
|
+
/** Progress bar height in pixels. Default: 3 */
|
|
173
|
+
progressHeight?: number;
|
|
174
|
+
|
|
175
|
+
/** Pause cycling on hover. Default: true */
|
|
176
|
+
pauseOnHover?: boolean;
|
|
177
|
+
}
|
|
178
|
+
|
|
26
179
|
/**
|
|
27
180
|
* Configuration for broadcast-style banner appearance
|
|
28
181
|
*/
|
|
@@ -30,6 +183,9 @@ export interface BroadcastStyleConfig {
|
|
|
30
183
|
/** Theme preset. Default: 'breaking-red' */
|
|
31
184
|
theme?: BroadcastTheme;
|
|
32
185
|
|
|
186
|
+
/** Layout style. Default: 'broadcast' */
|
|
187
|
+
layoutStyle?: TickerLayoutStyle;
|
|
188
|
+
|
|
33
189
|
/** Header text (e.g., "BREAKING NEWS", "LIVE", "ALERT"). Default: 'BREAKING NEWS' */
|
|
34
190
|
headerText?: string;
|
|
35
191
|
|
|
@@ -62,6 +218,18 @@ export interface BroadcastStyleConfig {
|
|
|
62
218
|
|
|
63
219
|
/** LIVE badge pulse animation. Default: true */
|
|
64
220
|
pulseLiveBadge?: boolean;
|
|
221
|
+
|
|
222
|
+
/** Two-line display configuration (for 'two-line' and 'professional' layouts) */
|
|
223
|
+
twoLineDisplay?: TwoLineDisplayConfig;
|
|
224
|
+
|
|
225
|
+
/** Decorative shapes configuration */
|
|
226
|
+
decorativeShapes?: DecorativeShapesConfig;
|
|
227
|
+
|
|
228
|
+
/** Default intro animation for items. Default: 'none' */
|
|
229
|
+
defaultIntroAnimation?: IntroAnimationType;
|
|
230
|
+
|
|
231
|
+
/** Default intro duration in ms. Default: 2000 */
|
|
232
|
+
defaultIntroDuration?: number;
|
|
65
233
|
}
|
|
66
234
|
|
|
67
235
|
/**
|
|
@@ -71,7 +239,7 @@ export interface FlashNewsTickerItem {
|
|
|
71
239
|
/** Unique identifier for this item */
|
|
72
240
|
id: string;
|
|
73
241
|
|
|
74
|
-
/** Text content to display */
|
|
242
|
+
/** Text content to display (used as scrolling detail in two-line mode) */
|
|
75
243
|
text: string;
|
|
76
244
|
|
|
77
245
|
/**
|
|
@@ -81,6 +249,18 @@ export interface FlashNewsTickerItem {
|
|
|
81
249
|
*/
|
|
82
250
|
html?: string;
|
|
83
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Headline text for two-line display (static top line)
|
|
254
|
+
* Used only when layoutStyle is 'two-line' or 'professional'
|
|
255
|
+
*/
|
|
256
|
+
headline?: string;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* HTML content for headline (supports rich formatting)
|
|
260
|
+
* If provided, this takes precedence over 'headline'
|
|
261
|
+
*/
|
|
262
|
+
headlineHtml?: string;
|
|
263
|
+
|
|
84
264
|
/** Priority for ordering (higher = shown first). Default: 0 */
|
|
85
265
|
priority?: number;
|
|
86
266
|
|
|
@@ -90,6 +270,36 @@ export interface FlashNewsTickerItem {
|
|
|
90
270
|
/** Unix timestamp (ms) - when to stop showing this item */
|
|
91
271
|
endTime?: number;
|
|
92
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Display duration in seconds for this specific item
|
|
275
|
+
* Used when itemCycling is enabled. Overrides defaultDuration.
|
|
276
|
+
*/
|
|
277
|
+
duration?: number;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Show intro animation for this item (e.g., "JUST IN", "BREAKING")
|
|
281
|
+
* Default: false
|
|
282
|
+
*/
|
|
283
|
+
showIntro?: boolean;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Custom intro text (e.g., "JUST IN", "BREAKING", "EXCLUSIVE")
|
|
287
|
+
* Default: 'BREAKING'
|
|
288
|
+
*/
|
|
289
|
+
introText?: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Intro animation type for this item
|
|
293
|
+
* Overrides broadcastStyle.defaultIntroAnimation
|
|
294
|
+
*/
|
|
295
|
+
introAnimation?: IntroAnimationType;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Intro animation duration in ms
|
|
299
|
+
* Overrides broadcastStyle.defaultIntroDuration
|
|
300
|
+
*/
|
|
301
|
+
introDuration?: number;
|
|
302
|
+
|
|
93
303
|
/** Custom metadata for application-specific data */
|
|
94
304
|
metadata?: Record<string, any>;
|
|
95
305
|
}
|
|
@@ -162,6 +372,9 @@ export interface FlashNewsTickerConfig {
|
|
|
162
372
|
/** Configuration for broadcast-style appearance (only used when styleVariant is 'broadcast') */
|
|
163
373
|
broadcastStyle?: BroadcastStyleConfig;
|
|
164
374
|
|
|
375
|
+
/** Configuration for automatic item cycling (used in 'professional' layout) */
|
|
376
|
+
itemCycling?: ItemCyclingConfig;
|
|
377
|
+
|
|
165
378
|
/** Configuration for top ticker (only used when position is 'both') */
|
|
166
379
|
topConfig?: TickerDisplayConfig;
|
|
167
380
|
|