unified-video-framework 1.4.440 → 1.4.442
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 +5 -0
- package/packages/web/dist/WebPlayer.d.ts.map +1 -1
- package/packages/web/dist/WebPlayer.js +412 -1
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/dist/react/types/FlashNewsTickerTypes.d.ts +9 -0
- package/packages/web/dist/react/types/FlashNewsTickerTypes.d.ts.map +1 -1
- package/packages/web/src/WebPlayer.ts +479 -3
- package/packages/web/src/react/types/FlashNewsTickerTypes.ts +38 -1
|
@@ -118,6 +118,15 @@ export interface FlashNewsTickerConfig {
|
|
|
118
118
|
gap?: number;
|
|
119
119
|
loop?: boolean;
|
|
120
120
|
separator?: string;
|
|
121
|
+
variant?: 'standard' | 'breaking' | 'live' | 'broadcast1' | 'broadcast2' | 'broadcast3' | 'broadcast4' | 'custom';
|
|
122
|
+
badgeText?: string;
|
|
123
|
+
badgeColor?: string;
|
|
124
|
+
badgeTextColor?: string;
|
|
125
|
+
accentColor?: string;
|
|
126
|
+
pulseBadge?: boolean;
|
|
127
|
+
iconUrl?: string;
|
|
128
|
+
headline?: string;
|
|
129
|
+
secondaryItems?: FlashNewsTickerItem[];
|
|
121
130
|
topOffset?: number;
|
|
122
131
|
bottomOffset?: number;
|
|
123
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlashNewsTickerTypes.d.ts","sourceRoot":"","sources":["../../../src/react/types/FlashNewsTickerTypes.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,WAAW,CAAC;AASxD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,cAAc,CAAC;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;IAGvB,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAC;IAG/D,KAAK,EAAE,MAAM,IAAI,CAAC;IAGlB,MAAM,EAAE,MAAM,IAAI,CAAC;IAGnB,QAAQ,EAAE,MAAM,OAAO,CAAC;CACzB"}
|
|
@@ -2573,10 +2573,17 @@ export class WebPlayer extends BasePlayer {
|
|
|
2573
2573
|
}
|
|
2574
2574
|
|
|
2575
2575
|
private createTickerElement(config: FlashNewsTickerConfig, position: 'top' | 'bottom'): HTMLDivElement {
|
|
2576
|
-
|
|
2577
|
-
|
|
2576
|
+
const variant = config.variant || 'standard';
|
|
2577
|
+
|
|
2578
|
+
// Route to specific broadcast layouts
|
|
2579
|
+
if (variant === 'broadcast1') return this.createBroadcast1Element(config, position);
|
|
2580
|
+
if (variant === 'broadcast2') return this.createBroadcast2Element(config, position);
|
|
2581
|
+
if (variant === 'broadcast3') return this.createBroadcast3Element(config, position);
|
|
2582
|
+
if (variant === 'broadcast4') return this.createBroadcast4Element(config, position);
|
|
2583
|
+
|
|
2584
|
+
// Route to specific broadcast style if configured (older style)
|
|
2585
|
+
if (config.styleVariant === 'broadcast' || variant === 'breaking' || variant === 'live') {
|
|
2578
2586
|
const layoutStyle = config.broadcastStyle?.layoutStyle || 'broadcast';
|
|
2579
|
-
// Route to professional ticker for two-line or professional layouts
|
|
2580
2587
|
if (layoutStyle === 'two-line' || layoutStyle === 'professional') {
|
|
2581
2588
|
return this.createProfessionalTickerElement(config, position);
|
|
2582
2589
|
}
|
|
@@ -2877,6 +2884,475 @@ export class WebPlayer extends BasePlayer {
|
|
|
2877
2884
|
}
|
|
2878
2885
|
}
|
|
2879
2886
|
|
|
2887
|
+
private createBroadcast1Element(config: FlashNewsTickerConfig, position: 'top' | 'bottom'): HTMLDivElement {
|
|
2888
|
+
const ticker = document.createElement('div');
|
|
2889
|
+
ticker.className = `uvf-ticker-broadcast1 ticker-${position}`;
|
|
2890
|
+
|
|
2891
|
+
const height = config.height || 70;
|
|
2892
|
+
const bottomOffset = config.bottomOffset || 0;
|
|
2893
|
+
const topOffset = config.topOffset || 10;
|
|
2894
|
+
|
|
2895
|
+
ticker.style.cssText = `
|
|
2896
|
+
position: absolute;
|
|
2897
|
+
left: 10%;
|
|
2898
|
+
right: 10%;
|
|
2899
|
+
height: ${height}px;
|
|
2900
|
+
${position === 'top' ? `top: ${topOffset}px;` : `bottom: ${bottomOffset}px;`}
|
|
2901
|
+
display: flex;
|
|
2902
|
+
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
2903
|
+
z-index: 100;
|
|
2904
|
+
pointer-events: none;
|
|
2905
|
+
`;
|
|
2906
|
+
|
|
2907
|
+
// 1. Globe Block (Left)
|
|
2908
|
+
const globeBlock = document.createElement('div');
|
|
2909
|
+
globeBlock.style.cssText = `
|
|
2910
|
+
width: ${height * 1.2}px;
|
|
2911
|
+
height: ${height}px;
|
|
2912
|
+
background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
|
|
2913
|
+
display: flex;
|
|
2914
|
+
align-items: center;
|
|
2915
|
+
justify-content: center;
|
|
2916
|
+
flex-shrink: 0;
|
|
2917
|
+
clip-path: polygon(0% 0%, 75% 0%, 100% 100%, 0% 100%);
|
|
2918
|
+
z-index: 20;
|
|
2919
|
+
box-shadow: 10px 0 20px rgba(0,0,0,0.4);
|
|
2920
|
+
position: relative;
|
|
2921
|
+
`;
|
|
2922
|
+
const globe = this.createGlobeElement(true);
|
|
2923
|
+
globe.style.width = '45%';
|
|
2924
|
+
globe.style.height = '45%';
|
|
2925
|
+
globe.style.marginRight = '15%'; // Offset from the angle
|
|
2926
|
+
globeBlock.appendChild(globe);
|
|
2927
|
+
ticker.appendChild(globeBlock);
|
|
2928
|
+
|
|
2929
|
+
// 2. Right Content (Dual Bars)
|
|
2930
|
+
const content = document.createElement('div');
|
|
2931
|
+
content.style.cssText = `
|
|
2932
|
+
flex-grow: 1;
|
|
2933
|
+
display: flex;
|
|
2934
|
+
flex-direction: column;
|
|
2935
|
+
margin-left: -${height * 0.3}px; /* Deeper overlap */
|
|
2936
|
+
z-index: 10;
|
|
2937
|
+
`;
|
|
2938
|
+
|
|
2939
|
+
// Row 1: Top Blue Bar (Headline)
|
|
2940
|
+
const topBar = document.createElement('div');
|
|
2941
|
+
topBar.style.cssText = `
|
|
2942
|
+
height: 55%;
|
|
2943
|
+
background: linear-gradient(90deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
|
|
2944
|
+
clip-path: polygon(5% 0, 100% 0, 98% 100%, 0% 100%);
|
|
2945
|
+
display: flex;
|
|
2946
|
+
align-items: center;
|
|
2947
|
+
padding: 0 40px 0 60px;
|
|
2948
|
+
color: white;
|
|
2949
|
+
border-bottom: 3px solid rgba(255,255,255,0.1);
|
|
2950
|
+
`;
|
|
2951
|
+
|
|
2952
|
+
const breakingText = document.createElement('span');
|
|
2953
|
+
breakingText.textContent = 'BREAKING NEWS';
|
|
2954
|
+
breakingText.style.cssText = `
|
|
2955
|
+
font-weight: 900;
|
|
2956
|
+
font-style: italic;
|
|
2957
|
+
font-size: ${height * 0.2}px;
|
|
2958
|
+
margin-right: 20px;
|
|
2959
|
+
white-space: nowrap;
|
|
2960
|
+
color: #fff;
|
|
2961
|
+
text-shadow: 0 0 10px rgba(255,255,255,0.5);
|
|
2962
|
+
`;
|
|
2963
|
+
topBar.appendChild(breakingText);
|
|
2964
|
+
|
|
2965
|
+
const headlineText = document.createElement('span');
|
|
2966
|
+
headlineText.textContent = config.headline || 'LOREM IPSUM DOLOR SIT AMET, CONSECTETUER';
|
|
2967
|
+
headlineText.style.cssText = `
|
|
2968
|
+
font-weight: 700;
|
|
2969
|
+
font-size: ${height * 0.25}px;
|
|
2970
|
+
white-space: nowrap;
|
|
2971
|
+
overflow: hidden;
|
|
2972
|
+
text-overflow: ellipsis;
|
|
2973
|
+
`;
|
|
2974
|
+
topBar.appendChild(headlineText);
|
|
2975
|
+
content.appendChild(topBar);
|
|
2976
|
+
|
|
2977
|
+
// Row 2: Bottom Black Bar (Scrolling Items)
|
|
2978
|
+
const bottomBar = document.createElement('div');
|
|
2979
|
+
bottomBar.style.cssText = `
|
|
2980
|
+
height: 45%;
|
|
2981
|
+
background: #0d0d0d;
|
|
2982
|
+
display: flex;
|
|
2983
|
+
align-items: center;
|
|
2984
|
+
clip-path: polygon(2% 0, 100% 0, 100% 100%, 0% 100%);
|
|
2985
|
+
border-top: 1px solid rgba(255,255,255,0.05);
|
|
2986
|
+
`;
|
|
2987
|
+
|
|
2988
|
+
const liveBadge = document.createElement('div');
|
|
2989
|
+
liveBadge.textContent = 'LIVE';
|
|
2990
|
+
liveBadge.style.cssText = `
|
|
2991
|
+
background: #f1c40f;
|
|
2992
|
+
color: #000;
|
|
2993
|
+
font-weight: 900;
|
|
2994
|
+
font-size: ${height * 0.16}px;
|
|
2995
|
+
padding: 2px 12px;
|
|
2996
|
+
margin-left: 50px;
|
|
2997
|
+
clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
|
|
2998
|
+
`;
|
|
2999
|
+
bottomBar.appendChild(liveBadge);
|
|
3000
|
+
|
|
3001
|
+
// Scrolling track
|
|
3002
|
+
const trackContainer = document.createElement('div');
|
|
3003
|
+
trackContainer.style.cssText = `flex-grow: 1; overflow: hidden; height: 100%; display: flex; align-items: center;`;
|
|
3004
|
+
const track = this.createSeamlessScrollingTrack(config.items || [], config);
|
|
3005
|
+
track.style.fontSize = `${height * 0.18}px`;
|
|
3006
|
+
track.style.color = '#fff';
|
|
3007
|
+
trackContainer.appendChild(track);
|
|
3008
|
+
bottomBar.appendChild(trackContainer);
|
|
3009
|
+
|
|
3010
|
+
content.appendChild(bottomBar);
|
|
3011
|
+
ticker.appendChild(content);
|
|
3012
|
+
|
|
3013
|
+
this.ensureTickerAnimations();
|
|
3014
|
+
return ticker;
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
private createBroadcast2Element(config: FlashNewsTickerConfig, position: 'top' | 'bottom'): HTMLDivElement {
|
|
3018
|
+
const ticker = document.createElement('div');
|
|
3019
|
+
ticker.className = `uvf-ticker-broadcast2 ticker-${position}`;
|
|
3020
|
+
|
|
3021
|
+
const height = config.height || 75;
|
|
3022
|
+
const bottomOffset = config.bottomOffset || 0;
|
|
3023
|
+
const topOffset = config.topOffset || 10;
|
|
3024
|
+
|
|
3025
|
+
ticker.style.cssText = `
|
|
3026
|
+
position: absolute;
|
|
3027
|
+
left: 5%;
|
|
3028
|
+
right: 5%;
|
|
3029
|
+
bottom: ${bottomOffset}px;
|
|
3030
|
+
height: ${height}px;
|
|
3031
|
+
display: flex;
|
|
3032
|
+
align-items: flex-end;
|
|
3033
|
+
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
3034
|
+
z-index: 100;
|
|
3035
|
+
pointer-events: none;
|
|
3036
|
+
`;
|
|
3037
|
+
|
|
3038
|
+
// Globe icon (floating on left, nested for z-index control)
|
|
3039
|
+
const globeWrapper = document.createElement('div');
|
|
3040
|
+
globeWrapper.style.cssText = `
|
|
3041
|
+
width: ${height * 0.75}px;
|
|
3042
|
+
height: ${height * 0.75}px;
|
|
3043
|
+
position: relative;
|
|
3044
|
+
z-index: 30;
|
|
3045
|
+
margin-right: 10px;
|
|
3046
|
+
flex-shrink: 0;
|
|
3047
|
+
`;
|
|
3048
|
+
|
|
3049
|
+
const globeContainer = document.createElement('div');
|
|
3050
|
+
globeContainer.style.cssText = `
|
|
3051
|
+
width: 100%;
|
|
3052
|
+
height: 100%;
|
|
3053
|
+
background: radial-gradient(circle, #e74c3c 0%, #c0392b 100%);
|
|
3054
|
+
border-radius: 50%;
|
|
3055
|
+
display: flex;
|
|
3056
|
+
align-items: center;
|
|
3057
|
+
justify-content: center;
|
|
3058
|
+
box-shadow: 0 0 25px rgba(0,0,0,0.6);
|
|
3059
|
+
border: 3px solid #fff;
|
|
3060
|
+
`;
|
|
3061
|
+
const globe = this.createGlobeElement(true);
|
|
3062
|
+
globe.style.width = '70%';
|
|
3063
|
+
globe.style.height = '70%';
|
|
3064
|
+
globeContainer.appendChild(globe);
|
|
3065
|
+
globeWrapper.appendChild(globeContainer);
|
|
3066
|
+
ticker.appendChild(globeWrapper);
|
|
3067
|
+
|
|
3068
|
+
const content = document.createElement('div');
|
|
3069
|
+
content.style.cssText = `flex-grow: 1; display: flex; flex-direction: column; z-index: 20;`;
|
|
3070
|
+
|
|
3071
|
+
// Row 1: Yellow/Red Header
|
|
3072
|
+
const row1 = document.createElement('div');
|
|
3073
|
+
row1.style.cssText = `display: flex; height: 50%;`;
|
|
3074
|
+
|
|
3075
|
+
const badge = document.createElement('div');
|
|
3076
|
+
badge.textContent = 'BREAKING NEWS';
|
|
3077
|
+
badge.style.cssText = `
|
|
3078
|
+
background: #f1c40f;
|
|
3079
|
+
color: black;
|
|
3080
|
+
font-weight: 900;
|
|
3081
|
+
padding: 0 25px;
|
|
3082
|
+
display: flex;
|
|
3083
|
+
align-items: center;
|
|
3084
|
+
clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
|
|
3085
|
+
font-size: ${height * 0.2}px;
|
|
3086
|
+
position: relative;
|
|
3087
|
+
z-index: 2;
|
|
3088
|
+
`;
|
|
3089
|
+
row1.appendChild(badge);
|
|
3090
|
+
|
|
3091
|
+
const headline = document.createElement('div');
|
|
3092
|
+
headline.textContent = config.headline || 'LOREM IPSUM DOLOR SIT AMET, CONSECTETUER';
|
|
3093
|
+
headline.style.cssText = `
|
|
3094
|
+
background: linear-gradient(90deg, #e74c3c 0%, #c1392b 100%);
|
|
3095
|
+
color: white;
|
|
3096
|
+
font-weight: 700;
|
|
3097
|
+
padding: 0 40px;
|
|
3098
|
+
display: flex;
|
|
3099
|
+
align-items: center;
|
|
3100
|
+
flex-grow: 1;
|
|
3101
|
+
margin-left: -20px;
|
|
3102
|
+
clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
|
|
3103
|
+
font-size: ${height * 0.22}px;
|
|
3104
|
+
border-bottom: 2px solid rgba(255,255,255,0.2);
|
|
3105
|
+
`;
|
|
3106
|
+
row1.appendChild(headline);
|
|
3107
|
+
content.appendChild(row1);
|
|
3108
|
+
|
|
3109
|
+
// Row 2: Blue Ticker (Semi-transparent)
|
|
3110
|
+
const row2 = document.createElement('div');
|
|
3111
|
+
row2.style.cssText = `
|
|
3112
|
+
height: 40%;
|
|
3113
|
+
background: rgba(41, 128, 185, 0.9);
|
|
3114
|
+
display: flex;
|
|
3115
|
+
align-items: center;
|
|
3116
|
+
margin-top: 4px;
|
|
3117
|
+
clip-path: polygon(1% 0, 100% 0, 100% 100%, 2% 100%);
|
|
3118
|
+
backdrop-filter: blur(5px);
|
|
3119
|
+
`;
|
|
3120
|
+
|
|
3121
|
+
const live = document.createElement('div');
|
|
3122
|
+
live.textContent = 'LIVE';
|
|
3123
|
+
live.style.cssText = `
|
|
3124
|
+
background: white;
|
|
3125
|
+
color: #2980b9;
|
|
3126
|
+
font-weight: 900;
|
|
3127
|
+
padding: 0 15px;
|
|
3128
|
+
margin-left: 30px;
|
|
3129
|
+
margin-right: 15px;
|
|
3130
|
+
font-size: ${height * 0.16}px;
|
|
3131
|
+
box-shadow: 2px 0 5px rgba(0,0,0,0.2);
|
|
3132
|
+
`;
|
|
3133
|
+
row2.appendChild(live);
|
|
3134
|
+
|
|
3135
|
+
const trackCont = document.createElement('div');
|
|
3136
|
+
trackCont.style.cssText = `flex-grow: 1; overflow: hidden; height: 100%; display: flex; align-items: center; color: white;`;
|
|
3137
|
+
const track = this.createSeamlessScrollingTrack(config.items || [], config);
|
|
3138
|
+
track.style.fontSize = `${height * 0.16}px`;
|
|
3139
|
+
trackCont.appendChild(track);
|
|
3140
|
+
row2.appendChild(trackCont);
|
|
3141
|
+
content.appendChild(row2);
|
|
3142
|
+
|
|
3143
|
+
ticker.appendChild(content);
|
|
3144
|
+
this.ensureTickerAnimations();
|
|
3145
|
+
return ticker;
|
|
3146
|
+
}
|
|
3147
|
+
|
|
3148
|
+
private createBroadcast3Element(config: FlashNewsTickerConfig, position: 'top' | 'bottom'): HTMLDivElement {
|
|
3149
|
+
const ticker = document.createElement('div');
|
|
3150
|
+
ticker.className = `uvf-ticker-broadcast3 ticker-${position}`;
|
|
3151
|
+
|
|
3152
|
+
const height = config.height || 60;
|
|
3153
|
+
const bottomOffset = config.bottomOffset || 0;
|
|
3154
|
+
const topOffset = config.topOffset || 10;
|
|
3155
|
+
|
|
3156
|
+
ticker.style.cssText = `
|
|
3157
|
+
position: absolute;
|
|
3158
|
+
left: 10%;
|
|
3159
|
+
right: 10%;
|
|
3160
|
+
height: ${height}px;
|
|
3161
|
+
${position === 'top' ? `top: ${topOffset}px;` : `bottom: ${bottomOffset}px;`}
|
|
3162
|
+
display: flex;
|
|
3163
|
+
flex-direction: column;
|
|
3164
|
+
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
3165
|
+
z-index: 100;
|
|
3166
|
+
pointer-events: none;
|
|
3167
|
+
`;
|
|
3168
|
+
|
|
3169
|
+
// Row 1: Split Red/Blue
|
|
3170
|
+
const row1 = document.createElement('div');
|
|
3171
|
+
row1.style.cssText = `display: flex; height: 55%;`;
|
|
3172
|
+
|
|
3173
|
+
const b1 = document.createElement('div');
|
|
3174
|
+
b1.textContent = 'BREAKING NEWS';
|
|
3175
|
+
b1.style.cssText = `
|
|
3176
|
+
background: #c0392b;
|
|
3177
|
+
color: white;
|
|
3178
|
+
font-weight: 900;
|
|
3179
|
+
padding: 0 20px;
|
|
3180
|
+
display: flex;
|
|
3181
|
+
align-items: center;
|
|
3182
|
+
clip-path: polygon(0 0, 95% 0, 100% 100%, 0 100%);
|
|
3183
|
+
font-size: ${height * 0.22}px;
|
|
3184
|
+
`;
|
|
3185
|
+
row1.appendChild(b1);
|
|
3186
|
+
|
|
3187
|
+
const b2 = document.createElement('div');
|
|
3188
|
+
b2.textContent = config.headline || 'LOREM IPSUM DOLOR SIT AMET, CONS';
|
|
3189
|
+
b2.style.cssText = `
|
|
3190
|
+
background: #2980b9;
|
|
3191
|
+
color: white;
|
|
3192
|
+
font-weight: 700;
|
|
3193
|
+
padding: 0 30px;
|
|
3194
|
+
display: flex;
|
|
3195
|
+
align-items: center;
|
|
3196
|
+
flex-grow: 1;
|
|
3197
|
+
margin-left: -10px;
|
|
3198
|
+
clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
|
|
3199
|
+
font-size: ${height * 0.25}px;
|
|
3200
|
+
`;
|
|
3201
|
+
row1.appendChild(b2);
|
|
3202
|
+
ticker.appendChild(row1);
|
|
3203
|
+
|
|
3204
|
+
// Row 2: Black scrolling
|
|
3205
|
+
const row2 = document.createElement('div');
|
|
3206
|
+
row2.style.cssText = `
|
|
3207
|
+
height: 35%;
|
|
3208
|
+
background: #111;
|
|
3209
|
+
display: flex;
|
|
3210
|
+
align-items: center;
|
|
3211
|
+
margin-top: 2px;
|
|
3212
|
+
clip-path: polygon(1% 0, 99% 0, 100% 100%, 0 100%);
|
|
3213
|
+
`;
|
|
3214
|
+
|
|
3215
|
+
const lbadge = document.createElement('div');
|
|
3216
|
+
lbadge.textContent = 'LIVE';
|
|
3217
|
+
lbadge.style.cssText = `
|
|
3218
|
+
background: #f1c40f;
|
|
3219
|
+
color: black;
|
|
3220
|
+
font-weight: 900;
|
|
3221
|
+
padding: 0 10px;
|
|
3222
|
+
margin: 0 15px;
|
|
3223
|
+
font-size: ${height * 0.15}px;
|
|
3224
|
+
clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
|
|
3225
|
+
`;
|
|
3226
|
+
row2.appendChild(lbadge);
|
|
3227
|
+
|
|
3228
|
+
const tCont = document.createElement('div');
|
|
3229
|
+
tCont.style.cssText = `flex-grow: 1; overflow: hidden; height: 100%; display: flex; align-items: center; color: white;`;
|
|
3230
|
+
const track = this.createSeamlessScrollingTrack(config.items || [], config);
|
|
3231
|
+
track.style.fontSize = `${height * 0.16}px`;
|
|
3232
|
+
tCont.appendChild(track);
|
|
3233
|
+
row2.appendChild(tCont);
|
|
3234
|
+
ticker.appendChild(row2);
|
|
3235
|
+
|
|
3236
|
+
this.ensureTickerAnimations();
|
|
3237
|
+
return ticker;
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
private createBroadcast4Element(config: FlashNewsTickerConfig, position: 'top' | 'bottom'): HTMLDivElement {
|
|
3241
|
+
const ticker = document.createElement('div');
|
|
3242
|
+
ticker.className = `uvf-ticker-broadcast4 ticker-${position}`;
|
|
3243
|
+
|
|
3244
|
+
const height = config.height || 65;
|
|
3245
|
+
const bottomOffset = config.bottomOffset || 0;
|
|
3246
|
+
const topOffset = config.topOffset || 10;
|
|
3247
|
+
|
|
3248
|
+
ticker.style.cssText = `
|
|
3249
|
+
position: absolute;
|
|
3250
|
+
left: 15%;
|
|
3251
|
+
right: 15%;
|
|
3252
|
+
bottom: ${bottomOffset}px;
|
|
3253
|
+
height: ${height}px;
|
|
3254
|
+
display: flex;
|
|
3255
|
+
align-items: flex-end;
|
|
3256
|
+
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
3257
|
+
z-index: 100;
|
|
3258
|
+
pointer-events: none;
|
|
3259
|
+
`;
|
|
3260
|
+
|
|
3261
|
+
// Large Blue Box
|
|
3262
|
+
const newsBox = document.createElement('div');
|
|
3263
|
+
newsBox.style.cssText = `
|
|
3264
|
+
width: ${height * 1.6}px;
|
|
3265
|
+
height: 100%;
|
|
3266
|
+
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
|
|
3267
|
+
display: flex;
|
|
3268
|
+
flex-direction: column;
|
|
3269
|
+
justify-content: center;
|
|
3270
|
+
align-items: center;
|
|
3271
|
+
position: relative;
|
|
3272
|
+
clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
|
|
3273
|
+
flex-shrink: 0;
|
|
3274
|
+
z-index: 30;
|
|
3275
|
+
box-shadow: 5px 0 15px rgba(0,0,0,0.4);
|
|
3276
|
+
`;
|
|
3277
|
+
|
|
3278
|
+
const bt = document.createElement('div');
|
|
3279
|
+
bt.style.cssText = `display: flex; gap: 5px; margin-bottom: 2px; width: 100%; justify-content: center; padding-right: 15%;`;
|
|
3280
|
+
|
|
3281
|
+
const b1 = document.createElement('span');
|
|
3282
|
+
b1.textContent = 'BREAKING';
|
|
3283
|
+
b1.style.cssText = `background: #c0392b; font-size: ${height * 0.14}px; font-weight: 900; padding: 2px 6px; border-radius: 2px; color: white;`;
|
|
3284
|
+
bt.appendChild(b1);
|
|
3285
|
+
|
|
3286
|
+
const b2 = document.createElement('span');
|
|
3287
|
+
b2.textContent = 'LIVE';
|
|
3288
|
+
b2.style.cssText = `background: #f1c40f; font-size: ${height * 0.14}px; font-weight: 900; padding: 2px 6px; border-radius: 2px; color: black;`;
|
|
3289
|
+
bt.appendChild(b2);
|
|
3290
|
+
newsBox.appendChild(bt);
|
|
3291
|
+
|
|
3292
|
+
const nt = document.createElement('div');
|
|
3293
|
+
nt.textContent = 'NEWS';
|
|
3294
|
+
nt.style.cssText = `font-size: ${height * 0.45}px; font-weight: 900; color: white; letter-spacing: 4px; padding-right: 15%; line-height: 1;`;
|
|
3295
|
+
newsBox.appendChild(nt);
|
|
3296
|
+
ticker.appendChild(newsBox);
|
|
3297
|
+
|
|
3298
|
+
// Red Scrolling Bar
|
|
3299
|
+
const redBar = document.createElement('div');
|
|
3300
|
+
redBar.style.cssText = `
|
|
3301
|
+
flex-grow: 1;
|
|
3302
|
+
height: 50%;
|
|
3303
|
+
background: linear-gradient(90deg, #c0392b 0%, #e74c3c 100%);
|
|
3304
|
+
margin-left: -${height * 0.2}px;
|
|
3305
|
+
display: flex;
|
|
3306
|
+
align-items: center;
|
|
3307
|
+
padding-left: ${height * 0.3}px;
|
|
3308
|
+
padding-right: 20px;
|
|
3309
|
+
clip-path: polygon(5% 0, 100% 0, 100% 100%, 0 100%);
|
|
3310
|
+
z-index: 20;
|
|
3311
|
+
`;
|
|
3312
|
+
|
|
3313
|
+
const tCont = document.createElement('div');
|
|
3314
|
+
tCont.style.cssText = `flex-grow: 1; overflow: hidden; height: 100%; display: flex; align-items: center; color: white;`;
|
|
3315
|
+
const track = this.createSeamlessScrollingTrack(config.items || [], config);
|
|
3316
|
+
track.style.fontSize = `${height * 0.22}px`;
|
|
3317
|
+
track.style.fontWeight = '700';
|
|
3318
|
+
tCont.appendChild(track);
|
|
3319
|
+
redBar.appendChild(tCont);
|
|
3320
|
+
ticker.appendChild(redBar);
|
|
3321
|
+
|
|
3322
|
+
this.ensureTickerAnimations();
|
|
3323
|
+
return ticker;
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
private createSeamlessScrollingTrack(items: FlashNewsTickerItem[], config: FlashNewsTickerConfig): HTMLDivElement {
|
|
3327
|
+
const track = document.createElement('div');
|
|
3328
|
+
track.className = 'uvf-ticker-track-seamless';
|
|
3329
|
+
|
|
3330
|
+
const duration = this.calculateTickerDuration(config);
|
|
3331
|
+
track.style.cssText = `
|
|
3332
|
+
display: flex;
|
|
3333
|
+
white-space: nowrap;
|
|
3334
|
+
animation: ticker-scroll ${duration}s linear infinite;
|
|
3335
|
+
will-change: transform;
|
|
3336
|
+
padding-left: 50%;
|
|
3337
|
+
`;
|
|
3338
|
+
|
|
3339
|
+
const content = items.map(item => item.html || item.text).join(config.separator || ' • ');
|
|
3340
|
+
|
|
3341
|
+
// Duplicate content for horizontal seamless loop
|
|
3342
|
+
const span1 = document.createElement('span');
|
|
3343
|
+
span1.innerHTML = content;
|
|
3344
|
+
span1.style.paddingRight = `${config.gap || 100}px`;
|
|
3345
|
+
|
|
3346
|
+
const span2 = document.createElement('span');
|
|
3347
|
+
span2.innerHTML = content;
|
|
3348
|
+
span2.style.paddingRight = `${config.gap || 100}px`;
|
|
3349
|
+
|
|
3350
|
+
track.appendChild(span1);
|
|
3351
|
+
track.appendChild(span2);
|
|
3352
|
+
|
|
3353
|
+
return track;
|
|
3354
|
+
}
|
|
3355
|
+
|
|
2880
3356
|
private createGlobeElement(animate: boolean): HTMLDivElement {
|
|
2881
3357
|
const globeContainer = document.createElement('div');
|
|
2882
3358
|
globeContainer.className = 'uvf-ticker-globe';
|
|
@@ -429,7 +429,44 @@ export interface FlashNewsTickerConfig {
|
|
|
429
429
|
/** Separator text between items. Default: ' • ' */
|
|
430
430
|
separator?: string;
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
/**
|
|
433
|
+
* Ticker variant/layout style. Options:
|
|
434
|
+
* - 'standard': Original simple scrolling ticker
|
|
435
|
+
* - 'breaking': Red badge + gradient (TV style)
|
|
436
|
+
* - 'live': Yellow/Black badge + gradient (TV style)
|
|
437
|
+
* - 'broadcast1': Blue/Red/Black dual-bar layout with globe
|
|
438
|
+
* - 'broadcast2': Yellow/Red/Blue dual-bar layout with globe
|
|
439
|
+
* - 'broadcast3': Triple-segment single bar (Red/Blue/Black)
|
|
440
|
+
* - 'broadcast4': Blue box "NEWS" + Red scrolling bar
|
|
441
|
+
* - 'custom': User-defined colors and badges
|
|
442
|
+
*/
|
|
443
|
+
variant?: 'standard' | 'breaking' | 'live' | 'broadcast1' | 'broadcast2' | 'broadcast3' | 'broadcast4' | 'custom';
|
|
444
|
+
|
|
445
|
+
/** Fixed badge text (e.g. "BREAKING NEWS") */
|
|
446
|
+
badgeText?: string;
|
|
447
|
+
|
|
448
|
+
/** Badge background color (e.g. "#e74c3c") */
|
|
449
|
+
badgeColor?: string;
|
|
450
|
+
|
|
451
|
+
/** Badge text color (e.g. "#ffffff") */
|
|
452
|
+
badgeTextColor?: string;
|
|
453
|
+
|
|
454
|
+
/** Accent/gradient color for the ticker (e.g. "#c0392b") */
|
|
455
|
+
accentColor?: string;
|
|
456
|
+
|
|
457
|
+
/** Enable pulse animation for the badge. Default: true for breaking/live */
|
|
458
|
+
pulseBadge?: boolean;
|
|
459
|
+
|
|
460
|
+
/** URL for the left-side icon (e.g. globe graphic) */
|
|
461
|
+
iconUrl?: string;
|
|
462
|
+
|
|
463
|
+
/** Static headline text for multi-bar layouts */
|
|
464
|
+
headline?: string;
|
|
465
|
+
|
|
466
|
+
/** Items for the second scrolling track (if applicable to layout) */
|
|
467
|
+
secondaryItems?: FlashNewsTickerItem[];
|
|
468
|
+
|
|
469
|
+
/** Safe areas */
|
|
433
470
|
|
|
434
471
|
/** Top offset in pixels for safe area. Default: 10 */
|
|
435
472
|
topOffset?: number;
|