unified-video-framework 1.4.66 → 1.4.67
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/web/dist/WebPlayer.d.ts +0 -11
- package/packages/web/dist/WebPlayer.d.ts.map +1 -1
- package/packages/web/dist/WebPlayer.js +5 -488
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/dist/index.d.ts +1 -0
- package/packages/web/dist/index.d.ts.map +1 -1
- package/packages/web/dist/index.js +1 -0
- package/packages/web/dist/index.js.map +1 -1
- package/packages/web/src/WebPlayer.ts +6 -588
- package/packages/web/src/index.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-video-framework",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.67",
|
|
4
4
|
"description": "Cross-platform video player framework supporting iOS, Android, Web, Smart TVs (Samsung/LG), Roku, and more",
|
|
5
5
|
"main": "packages/core/dist/index.js",
|
|
6
6
|
"types": "packages/core/dist/index.d.ts",
|
|
@@ -39,9 +39,6 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
39
39
|
private selectedSubtitleKey;
|
|
40
40
|
private _kiTo;
|
|
41
41
|
private paywallController;
|
|
42
|
-
private epgData;
|
|
43
|
-
private epgOverlay;
|
|
44
|
-
private isEPGVisible;
|
|
45
42
|
private _playPromise;
|
|
46
43
|
private _deferredPause;
|
|
47
44
|
private _lastToggleAt;
|
|
@@ -147,14 +144,6 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
147
144
|
hideEPGButton(): void;
|
|
148
145
|
setEPGData(epgData: any): void;
|
|
149
146
|
isEPGButtonVisible(): boolean;
|
|
150
|
-
private toggleEPG;
|
|
151
|
-
private showEPGOverlay;
|
|
152
|
-
private hideEPGOverlay;
|
|
153
|
-
private createEPGOverlay;
|
|
154
|
-
private populateEPGContent;
|
|
155
|
-
private renderChannelList;
|
|
156
|
-
private renderTimelineData;
|
|
157
|
-
private renderGenericObjectData;
|
|
158
147
|
private cleanup;
|
|
159
148
|
destroy(): Promise<void>;
|
|
160
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebPlayer.d.ts","sourceRoot":"","sources":["../src/WebPlayer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUjD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,GAAG,EAAE,GAAG,CAAC;QACT,MAAM,EAAE,GAAG,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,qBAAqB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;KACxD;CACF;AAED,qBAAa,SAAU,SAAQ,UAAU;IACvC,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAChD,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,mBAAmB,CAAc;IACzC,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,iBAAiB,CAAiB;IAC1C,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,mBAAmB,CAAa;IACxC,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,aAAa,CAA4B;IAEjD,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,iBAAiB,CAAkB;IAG3C,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,sBAAsB,CAAa;IAC3C,OAAO,CAAC,sBAAsB,CAAa;IAC3C,O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C,oBAAoB;IA+BrB,aAAa,IAAI,IAAI;IAarB,aAAa,IAAI,IAAI;IAYrB,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAe9B,kBAAkB,IAAI,OAAO;YAKtB,OAAO;IAgBf,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAyC/B"}
|
|
@@ -32,9 +32,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
32
32
|
this.selectedSubtitleKey = 'off';
|
|
33
33
|
this._kiTo = null;
|
|
34
34
|
this.paywallController = null;
|
|
35
|
-
this.epgData = null;
|
|
36
|
-
this.epgOverlay = null;
|
|
37
|
-
this.isEPGVisible = false;
|
|
38
35
|
this._playPromise = null;
|
|
39
36
|
this._deferredPause = false;
|
|
40
37
|
this._lastToggleAt = 0;
|
|
@@ -2594,7 +2591,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
2594
2591
|
epgBtn?.addEventListener('click', (e) => {
|
|
2595
2592
|
e.stopPropagation();
|
|
2596
2593
|
this.debugLog('EPG button clicked');
|
|
2597
|
-
this.
|
|
2594
|
+
this.emit('epgToggle', {});
|
|
2598
2595
|
});
|
|
2599
2596
|
const pipBtn = document.getElementById('uvf-pip-btn');
|
|
2600
2597
|
pipBtn?.addEventListener('click', () => this.togglePiP());
|
|
@@ -2693,19 +2690,10 @@ export class WebPlayer extends BasePlayer {
|
|
|
2693
2690
|
shortcutText = 'Picture-in-Picture';
|
|
2694
2691
|
break;
|
|
2695
2692
|
case 'g':
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
shortcutText = 'Toggle EPG';
|
|
2701
|
-
}
|
|
2702
|
-
break;
|
|
2703
|
-
case 'Escape':
|
|
2704
|
-
if (this.isEPGVisible) {
|
|
2705
|
-
e.preventDefault();
|
|
2706
|
-
this.hideEPGOverlay();
|
|
2707
|
-
shortcutText = 'Close EPG';
|
|
2708
|
-
}
|
|
2693
|
+
e.preventDefault();
|
|
2694
|
+
this.debugLog('G key pressed - toggling EPG');
|
|
2695
|
+
this.emit('epgToggle', {});
|
|
2696
|
+
shortcutText = 'Toggle EPG';
|
|
2709
2697
|
break;
|
|
2710
2698
|
case '0':
|
|
2711
2699
|
case '1':
|
|
@@ -4078,7 +4066,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
4078
4066
|
}
|
|
4079
4067
|
}
|
|
4080
4068
|
setEPGData(epgData) {
|
|
4081
|
-
this.epgData = epgData;
|
|
4082
4069
|
if (epgData && Object.keys(epgData).length > 0) {
|
|
4083
4070
|
this.showEPGButton();
|
|
4084
4071
|
this.debugLog('EPG data set, button shown');
|
|
@@ -4093,476 +4080,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
4093
4080
|
const epgBtn = document.getElementById('uvf-epg-btn');
|
|
4094
4081
|
return epgBtn ? epgBtn.style.display !== 'none' : false;
|
|
4095
4082
|
}
|
|
4096
|
-
toggleEPG() {
|
|
4097
|
-
if (this.isEPGVisible) {
|
|
4098
|
-
this.hideEPGOverlay();
|
|
4099
|
-
}
|
|
4100
|
-
else {
|
|
4101
|
-
this.showEPGOverlay();
|
|
4102
|
-
}
|
|
4103
|
-
}
|
|
4104
|
-
showEPGOverlay() {
|
|
4105
|
-
if (!this.epgData) {
|
|
4106
|
-
this.showNotification('No EPG data available');
|
|
4107
|
-
return;
|
|
4108
|
-
}
|
|
4109
|
-
if (!this.epgOverlay) {
|
|
4110
|
-
this.createEPGOverlay();
|
|
4111
|
-
}
|
|
4112
|
-
if (this.epgOverlay) {
|
|
4113
|
-
this.epgOverlay.style.display = 'flex';
|
|
4114
|
-
this.isEPGVisible = true;
|
|
4115
|
-
this.debugLog('EPG overlay shown');
|
|
4116
|
-
this.emit('epgToggle', { visible: true, data: this.epgData });
|
|
4117
|
-
}
|
|
4118
|
-
}
|
|
4119
|
-
hideEPGOverlay() {
|
|
4120
|
-
if (this.epgOverlay) {
|
|
4121
|
-
this.epgOverlay.style.display = 'none';
|
|
4122
|
-
this.isEPGVisible = false;
|
|
4123
|
-
this.debugLog('EPG overlay hidden');
|
|
4124
|
-
this.emit('epgToggle', { visible: false, data: this.epgData });
|
|
4125
|
-
}
|
|
4126
|
-
}
|
|
4127
|
-
createEPGOverlay() {
|
|
4128
|
-
if (!this.playerWrapper)
|
|
4129
|
-
return;
|
|
4130
|
-
this.epgOverlay = document.createElement('div');
|
|
4131
|
-
this.epgOverlay.className = 'uvf-epg-overlay';
|
|
4132
|
-
this.epgOverlay.style.cssText = `
|
|
4133
|
-
position: absolute;
|
|
4134
|
-
top: 0;
|
|
4135
|
-
left: 0;
|
|
4136
|
-
right: 0;
|
|
4137
|
-
bottom: 0;
|
|
4138
|
-
background: rgba(0, 0, 0, 0.95);
|
|
4139
|
-
color: white;
|
|
4140
|
-
z-index: 1000;
|
|
4141
|
-
display: none;
|
|
4142
|
-
flex-direction: column;
|
|
4143
|
-
padding: 20px;
|
|
4144
|
-
box-sizing: border-box;
|
|
4145
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
4146
|
-
`;
|
|
4147
|
-
const header = document.createElement('div');
|
|
4148
|
-
header.style.cssText = `
|
|
4149
|
-
display: flex;
|
|
4150
|
-
justify-content: space-between;
|
|
4151
|
-
align-items: center;
|
|
4152
|
-
margin-bottom: 20px;
|
|
4153
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
4154
|
-
padding-bottom: 15px;
|
|
4155
|
-
`;
|
|
4156
|
-
const title = document.createElement('h2');
|
|
4157
|
-
title.textContent = 'Electronic Program Guide';
|
|
4158
|
-
title.style.cssText = `
|
|
4159
|
-
margin: 0;
|
|
4160
|
-
color: #ff6b35;
|
|
4161
|
-
font-size: 24px;
|
|
4162
|
-
font-weight: 600;
|
|
4163
|
-
`;
|
|
4164
|
-
const closeBtn = document.createElement('button');
|
|
4165
|
-
closeBtn.innerHTML = '×';
|
|
4166
|
-
closeBtn.style.cssText = `
|
|
4167
|
-
background: none;
|
|
4168
|
-
border: none;
|
|
4169
|
-
color: white;
|
|
4170
|
-
font-size: 32px;
|
|
4171
|
-
cursor: pointer;
|
|
4172
|
-
padding: 0;
|
|
4173
|
-
width: 40px;
|
|
4174
|
-
height: 40px;
|
|
4175
|
-
display: flex;
|
|
4176
|
-
align-items: center;
|
|
4177
|
-
justify-content: center;
|
|
4178
|
-
border-radius: 50%;
|
|
4179
|
-
transition: background-color 0.2s;
|
|
4180
|
-
`;
|
|
4181
|
-
closeBtn.addEventListener('click', () => this.hideEPGOverlay());
|
|
4182
|
-
closeBtn.addEventListener('mouseenter', () => {
|
|
4183
|
-
closeBtn.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
|
|
4184
|
-
});
|
|
4185
|
-
closeBtn.addEventListener('mouseleave', () => {
|
|
4186
|
-
closeBtn.style.backgroundColor = 'transparent';
|
|
4187
|
-
});
|
|
4188
|
-
header.appendChild(title);
|
|
4189
|
-
header.appendChild(closeBtn);
|
|
4190
|
-
const content = document.createElement('div');
|
|
4191
|
-
content.className = 'uvf-epg-content';
|
|
4192
|
-
content.style.cssText = `
|
|
4193
|
-
flex: 1;
|
|
4194
|
-
overflow-y: auto;
|
|
4195
|
-
padding-right: 10px;
|
|
4196
|
-
`;
|
|
4197
|
-
this.populateEPGContent(content);
|
|
4198
|
-
const footer = document.createElement('div');
|
|
4199
|
-
footer.style.cssText = `
|
|
4200
|
-
margin-top: 20px;
|
|
4201
|
-
padding-top: 15px;
|
|
4202
|
-
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
|
4203
|
-
text-align: center;
|
|
4204
|
-
color: rgba(255, 255, 255, 0.7);
|
|
4205
|
-
font-size: 14px;
|
|
4206
|
-
`;
|
|
4207
|
-
footer.innerHTML = 'Press <strong>Esc</strong> or <strong>Ctrl+G</strong> to close • Click outside to close';
|
|
4208
|
-
this.epgOverlay.appendChild(header);
|
|
4209
|
-
this.epgOverlay.appendChild(content);
|
|
4210
|
-
this.epgOverlay.appendChild(footer);
|
|
4211
|
-
this.playerWrapper.appendChild(this.epgOverlay);
|
|
4212
|
-
this.epgOverlay.addEventListener('keydown', (e) => {
|
|
4213
|
-
if (e.key === 'Escape') {
|
|
4214
|
-
this.hideEPGOverlay();
|
|
4215
|
-
}
|
|
4216
|
-
});
|
|
4217
|
-
this.epgOverlay.addEventListener('click', (e) => {
|
|
4218
|
-
if (e.target === this.epgOverlay) {
|
|
4219
|
-
this.hideEPGOverlay();
|
|
4220
|
-
}
|
|
4221
|
-
});
|
|
4222
|
-
this.debugLog('EPG overlay created');
|
|
4223
|
-
}
|
|
4224
|
-
populateEPGContent(container) {
|
|
4225
|
-
if (!this.epgData)
|
|
4226
|
-
return;
|
|
4227
|
-
container.innerHTML = '';
|
|
4228
|
-
if (Array.isArray(this.epgData)) {
|
|
4229
|
-
this.renderChannelList(container, this.epgData);
|
|
4230
|
-
}
|
|
4231
|
-
else if (this.epgData.channels) {
|
|
4232
|
-
this.renderChannelList(container, this.epgData.channels);
|
|
4233
|
-
}
|
|
4234
|
-
else if (this.epgData.timeline) {
|
|
4235
|
-
this.renderTimelineData(container, this.epgData);
|
|
4236
|
-
}
|
|
4237
|
-
else if (typeof this.epgData === 'object') {
|
|
4238
|
-
this.renderGenericObjectData(container, this.epgData);
|
|
4239
|
-
}
|
|
4240
|
-
else {
|
|
4241
|
-
container.innerHTML = `
|
|
4242
|
-
<div style="font-family: monospace; font-size: 12px; color: rgba(255, 255, 255, 0.8);">
|
|
4243
|
-
<pre>${JSON.stringify(this.epgData, null, 2)}</pre>
|
|
4244
|
-
</div>
|
|
4245
|
-
`;
|
|
4246
|
-
}
|
|
4247
|
-
}
|
|
4248
|
-
renderChannelList(container, channels) {
|
|
4249
|
-
if (!Array.isArray(channels) || channels.length === 0) {
|
|
4250
|
-
container.innerHTML = '<div style="text-align: center; color: rgba(255, 255, 255, 0.7);">No channels available</div>';
|
|
4251
|
-
return;
|
|
4252
|
-
}
|
|
4253
|
-
channels.forEach((channel, index) => {
|
|
4254
|
-
const channelDiv = document.createElement('div');
|
|
4255
|
-
channelDiv.style.cssText = `
|
|
4256
|
-
margin-bottom: 20px;
|
|
4257
|
-
padding: 15px;
|
|
4258
|
-
background: rgba(255, 255, 255, 0.05);
|
|
4259
|
-
border-radius: 8px;
|
|
4260
|
-
border-left: 3px solid #ff6b35;
|
|
4261
|
-
`;
|
|
4262
|
-
const channelHeader = document.createElement('div');
|
|
4263
|
-
channelHeader.style.cssText = `
|
|
4264
|
-
display: flex;
|
|
4265
|
-
align-items: center;
|
|
4266
|
-
margin-bottom: 10px;
|
|
4267
|
-
`;
|
|
4268
|
-
const channelName = document.createElement('h3');
|
|
4269
|
-
channelName.textContent = channel.name || channel.title || `Channel ${index + 1}`;
|
|
4270
|
-
channelName.style.cssText = `
|
|
4271
|
-
margin: 0;
|
|
4272
|
-
color: #ff6b35;
|
|
4273
|
-
font-size: 18px;
|
|
4274
|
-
font-weight: 600;
|
|
4275
|
-
`;
|
|
4276
|
-
const channelNumber = document.createElement('span');
|
|
4277
|
-
if (channel.number || channel.id) {
|
|
4278
|
-
channelNumber.textContent = `Ch ${channel.number || channel.id}`;
|
|
4279
|
-
channelNumber.style.cssText = `
|
|
4280
|
-
margin-left: 10px;
|
|
4281
|
-
padding: 2px 8px;
|
|
4282
|
-
background: rgba(255, 107, 53, 0.2);
|
|
4283
|
-
border-radius: 12px;
|
|
4284
|
-
font-size: 12px;
|
|
4285
|
-
color: rgba(255, 255, 255, 0.8);
|
|
4286
|
-
`;
|
|
4287
|
-
}
|
|
4288
|
-
channelHeader.appendChild(channelName);
|
|
4289
|
-
if (channelNumber.textContent) {
|
|
4290
|
-
channelHeader.appendChild(channelNumber);
|
|
4291
|
-
}
|
|
4292
|
-
const programsList = document.createElement('div');
|
|
4293
|
-
programsList.style.cssText = `
|
|
4294
|
-
margin-left: 10px;
|
|
4295
|
-
`;
|
|
4296
|
-
if (channel.programs && Array.isArray(channel.programs)) {
|
|
4297
|
-
channel.programs.slice(0, 5).forEach((program) => {
|
|
4298
|
-
const programDiv = document.createElement('div');
|
|
4299
|
-
programDiv.style.cssText = `
|
|
4300
|
-
display: flex;
|
|
4301
|
-
justify-content: space-between;
|
|
4302
|
-
align-items: center;
|
|
4303
|
-
padding: 5px 0;
|
|
4304
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
4305
|
-
`;
|
|
4306
|
-
const programInfo = document.createElement('div');
|
|
4307
|
-
programInfo.style.flex = '1';
|
|
4308
|
-
const programTitle = document.createElement('div');
|
|
4309
|
-
programTitle.textContent = program.title || program.name || 'Untitled Program';
|
|
4310
|
-
programTitle.style.cssText = `
|
|
4311
|
-
color: white;
|
|
4312
|
-
font-weight: 500;
|
|
4313
|
-
margin-bottom: 2px;
|
|
4314
|
-
`;
|
|
4315
|
-
const programTime = document.createElement('div');
|
|
4316
|
-
const startTime = program.startTime ? new Date(program.startTime).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) : '';
|
|
4317
|
-
const endTime = program.endTime ? new Date(program.endTime).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) : '';
|
|
4318
|
-
programTime.textContent = startTime && endTime ? `${startTime} - ${endTime}` : 'Time TBA';
|
|
4319
|
-
programTime.style.cssText = `
|
|
4320
|
-
color: rgba(255, 255, 255, 0.6);
|
|
4321
|
-
font-size: 12px;
|
|
4322
|
-
`;
|
|
4323
|
-
programInfo.appendChild(programTitle);
|
|
4324
|
-
programInfo.appendChild(programTime);
|
|
4325
|
-
programDiv.appendChild(programInfo);
|
|
4326
|
-
programsList.appendChild(programDiv);
|
|
4327
|
-
});
|
|
4328
|
-
}
|
|
4329
|
-
else {
|
|
4330
|
-
const noPrograms = document.createElement('div');
|
|
4331
|
-
noPrograms.textContent = 'No programs available';
|
|
4332
|
-
noPrograms.style.cssText = `
|
|
4333
|
-
color: rgba(255, 255, 255, 0.6);
|
|
4334
|
-
font-style: italic;
|
|
4335
|
-
padding: 10px 0;
|
|
4336
|
-
`;
|
|
4337
|
-
programsList.appendChild(noPrograms);
|
|
4338
|
-
}
|
|
4339
|
-
channelDiv.appendChild(channelHeader);
|
|
4340
|
-
channelDiv.appendChild(programsList);
|
|
4341
|
-
container.appendChild(channelDiv);
|
|
4342
|
-
});
|
|
4343
|
-
}
|
|
4344
|
-
renderTimelineData(container, data) {
|
|
4345
|
-
const summaryDiv = document.createElement('div');
|
|
4346
|
-
summaryDiv.style.cssText = `
|
|
4347
|
-
margin-bottom: 20px;
|
|
4348
|
-
padding: 15px;
|
|
4349
|
-
background: rgba(255, 107, 53, 0.1);
|
|
4350
|
-
border-radius: 8px;
|
|
4351
|
-
border-left: 3px solid #ff6b35;
|
|
4352
|
-
`;
|
|
4353
|
-
const summaryTitle = document.createElement('h3');
|
|
4354
|
-
summaryTitle.textContent = 'EPG Data Summary';
|
|
4355
|
-
summaryTitle.style.cssText = `
|
|
4356
|
-
margin: 0 0 10px 0;
|
|
4357
|
-
color: #ff6b35;
|
|
4358
|
-
font-size: 18px;
|
|
4359
|
-
font-weight: 600;
|
|
4360
|
-
`;
|
|
4361
|
-
summaryDiv.appendChild(summaryTitle);
|
|
4362
|
-
const info = document.createElement('div');
|
|
4363
|
-
info.style.cssText = `
|
|
4364
|
-
display: grid;
|
|
4365
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
4366
|
-
gap: 10px;
|
|
4367
|
-
color: rgba(255, 255, 255, 0.9);
|
|
4368
|
-
`;
|
|
4369
|
-
if (data.timeline) {
|
|
4370
|
-
const timelineInfo = document.createElement('div');
|
|
4371
|
-
timelineInfo.innerHTML = `
|
|
4372
|
-
<strong>Timeline:</strong><br>
|
|
4373
|
-
<span style="color: rgba(255, 255, 255, 0.7); font-size: 14px;">
|
|
4374
|
-
${Array.isArray(data.timeline) ? `${data.timeline.length} entries` : 'Available'}
|
|
4375
|
-
</span>
|
|
4376
|
-
`;
|
|
4377
|
-
info.appendChild(timelineInfo);
|
|
4378
|
-
}
|
|
4379
|
-
if (data.properties) {
|
|
4380
|
-
const propsInfo = document.createElement('div');
|
|
4381
|
-
const propCount = typeof data.properties === 'object' ? Object.keys(data.properties).length : 0;
|
|
4382
|
-
propsInfo.innerHTML = `
|
|
4383
|
-
<strong>Properties:</strong><br>
|
|
4384
|
-
<span style="color: rgba(255, 255, 255, 0.7); font-size: 14px;">
|
|
4385
|
-
${propCount} properties
|
|
4386
|
-
</span>
|
|
4387
|
-
`;
|
|
4388
|
-
info.appendChild(propsInfo);
|
|
4389
|
-
if (data.properties.Channel_1) {
|
|
4390
|
-
const channelInfo = document.createElement('div');
|
|
4391
|
-
channelInfo.innerHTML = `
|
|
4392
|
-
<strong>Channel 1:</strong><br>
|
|
4393
|
-
<span style="color: rgba(255, 255, 255, 0.7); font-size: 14px;">
|
|
4394
|
-
${data.properties.Channel_1}
|
|
4395
|
-
</span>
|
|
4396
|
-
`;
|
|
4397
|
-
info.appendChild(channelInfo);
|
|
4398
|
-
}
|
|
4399
|
-
}
|
|
4400
|
-
summaryDiv.appendChild(info);
|
|
4401
|
-
container.appendChild(summaryDiv);
|
|
4402
|
-
if (data.timeline && Array.isArray(data.timeline)) {
|
|
4403
|
-
const timelineDiv = document.createElement('div');
|
|
4404
|
-
timelineDiv.style.cssText = `
|
|
4405
|
-
margin-bottom: 20px;
|
|
4406
|
-
padding: 15px;
|
|
4407
|
-
background: rgba(255, 255, 255, 0.05);
|
|
4408
|
-
border-radius: 8px;
|
|
4409
|
-
border-left: 3px solid #ff6b35;
|
|
4410
|
-
`;
|
|
4411
|
-
const timelineTitle = document.createElement('h3');
|
|
4412
|
-
timelineTitle.textContent = 'Timeline Events';
|
|
4413
|
-
timelineTitle.style.cssText = `
|
|
4414
|
-
margin: 0 0 15px 0;
|
|
4415
|
-
color: #ff6b35;
|
|
4416
|
-
font-size: 18px;
|
|
4417
|
-
font-weight: 600;
|
|
4418
|
-
`;
|
|
4419
|
-
timelineDiv.appendChild(timelineTitle);
|
|
4420
|
-
data.timeline.slice(0, 10).forEach((entry, index) => {
|
|
4421
|
-
const entryDiv = document.createElement('div');
|
|
4422
|
-
entryDiv.style.cssText = `
|
|
4423
|
-
padding: 8px 0;
|
|
4424
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
4425
|
-
display: flex;
|
|
4426
|
-
justify-content: space-between;
|
|
4427
|
-
align-items: center;
|
|
4428
|
-
`;
|
|
4429
|
-
const entryInfo = document.createElement('div');
|
|
4430
|
-
entryInfo.style.flex = '1';
|
|
4431
|
-
const entryTitle = document.createElement('div');
|
|
4432
|
-
entryTitle.textContent = entry.title || entry.name || `Event ${index + 1}`;
|
|
4433
|
-
entryTitle.style.cssText = `
|
|
4434
|
-
color: white;
|
|
4435
|
-
font-weight: 500;
|
|
4436
|
-
margin-bottom: 2px;
|
|
4437
|
-
`;
|
|
4438
|
-
const entryDetails = document.createElement('div');
|
|
4439
|
-
let details = [];
|
|
4440
|
-
if (entry.id)
|
|
4441
|
-
details.push(`ID: ${entry.id}`);
|
|
4442
|
-
if (entry.title && entry.title !== entryTitle.textContent)
|
|
4443
|
-
details.push(entry.title);
|
|
4444
|
-
if (entry.start)
|
|
4445
|
-
details.push(`Start: ${entry.start}`);
|
|
4446
|
-
if (entry.end)
|
|
4447
|
-
details.push(`End: ${entry.end}`);
|
|
4448
|
-
entryDetails.textContent = details.length > 0 ? details.join(' • ') : 'No details available';
|
|
4449
|
-
entryDetails.style.cssText = `
|
|
4450
|
-
color: rgba(255, 255, 255, 0.6);
|
|
4451
|
-
font-size: 12px;
|
|
4452
|
-
`;
|
|
4453
|
-
entryInfo.appendChild(entryTitle);
|
|
4454
|
-
entryInfo.appendChild(entryDetails);
|
|
4455
|
-
entryDiv.appendChild(entryInfo);
|
|
4456
|
-
timelineDiv.appendChild(entryDiv);
|
|
4457
|
-
});
|
|
4458
|
-
if (data.timeline.length > 10) {
|
|
4459
|
-
const moreInfo = document.createElement('div');
|
|
4460
|
-
moreInfo.textContent = `... and ${data.timeline.length - 10} more events`;
|
|
4461
|
-
moreInfo.style.cssText = `
|
|
4462
|
-
color: rgba(255, 255, 255, 0.6);
|
|
4463
|
-
font-style: italic;
|
|
4464
|
-
text-align: center;
|
|
4465
|
-
padding: 10px 0;
|
|
4466
|
-
`;
|
|
4467
|
-
timelineDiv.appendChild(moreInfo);
|
|
4468
|
-
}
|
|
4469
|
-
container.appendChild(timelineDiv);
|
|
4470
|
-
}
|
|
4471
|
-
}
|
|
4472
|
-
renderGenericObjectData(container, data) {
|
|
4473
|
-
const keys = Object.keys(data);
|
|
4474
|
-
const channelKeys = keys.filter(key => key.toLowerCase().includes('channel') ||
|
|
4475
|
-
key.toLowerCase().includes('program') ||
|
|
4476
|
-
key.toLowerCase().includes('guide'));
|
|
4477
|
-
if (channelKeys.length > 0) {
|
|
4478
|
-
channelKeys.forEach(key => {
|
|
4479
|
-
const channelData = data[key];
|
|
4480
|
-
const channelDiv = document.createElement('div');
|
|
4481
|
-
channelDiv.style.cssText = `
|
|
4482
|
-
margin-bottom: 20px;
|
|
4483
|
-
padding: 15px;
|
|
4484
|
-
background: rgba(255, 255, 255, 0.05);
|
|
4485
|
-
border-radius: 8px;
|
|
4486
|
-
border-left: 3px solid #ff6b35;
|
|
4487
|
-
`;
|
|
4488
|
-
const channelTitle = document.createElement('h3');
|
|
4489
|
-
channelTitle.textContent = key.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
4490
|
-
channelTitle.style.cssText = `
|
|
4491
|
-
margin: 0 0 10px 0;
|
|
4492
|
-
color: #ff6b35;
|
|
4493
|
-
font-size: 18px;
|
|
4494
|
-
font-weight: 600;
|
|
4495
|
-
`;
|
|
4496
|
-
channelDiv.appendChild(channelTitle);
|
|
4497
|
-
const channelContent = document.createElement('div');
|
|
4498
|
-
if (typeof channelData === 'string') {
|
|
4499
|
-
channelContent.textContent = channelData;
|
|
4500
|
-
channelContent.style.cssText = `
|
|
4501
|
-
color: rgba(255, 255, 255, 0.9);
|
|
4502
|
-
line-height: 1.5;
|
|
4503
|
-
`;
|
|
4504
|
-
}
|
|
4505
|
-
else if (Array.isArray(channelData)) {
|
|
4506
|
-
channelContent.innerHTML = `
|
|
4507
|
-
<div style="color: rgba(255, 255, 255, 0.7);">
|
|
4508
|
-
Array with ${channelData.length} items:
|
|
4509
|
-
</div>
|
|
4510
|
-
`;
|
|
4511
|
-
channelData.slice(0, 5).forEach((item, index) => {
|
|
4512
|
-
const itemDiv = document.createElement('div');
|
|
4513
|
-
itemDiv.style.cssText = `
|
|
4514
|
-
margin: 5px 0;
|
|
4515
|
-
padding: 5px 10px;
|
|
4516
|
-
background: rgba(255, 255, 255, 0.05);
|
|
4517
|
-
border-radius: 4px;
|
|
4518
|
-
`;
|
|
4519
|
-
itemDiv.textContent = typeof item === 'object' ? JSON.stringify(item) : String(item);
|
|
4520
|
-
channelContent.appendChild(itemDiv);
|
|
4521
|
-
});
|
|
4522
|
-
}
|
|
4523
|
-
else {
|
|
4524
|
-
channelContent.innerHTML = `
|
|
4525
|
-
<pre style="color: rgba(255, 255, 255, 0.8); font-size: 12px; margin: 0; white-space: pre-wrap;">${JSON.stringify(channelData, null, 2)}</pre>
|
|
4526
|
-
`;
|
|
4527
|
-
}
|
|
4528
|
-
channelDiv.appendChild(channelContent);
|
|
4529
|
-
container.appendChild(channelDiv);
|
|
4530
|
-
});
|
|
4531
|
-
}
|
|
4532
|
-
else {
|
|
4533
|
-
keys.forEach(key => {
|
|
4534
|
-
const value = data[key];
|
|
4535
|
-
const dataDiv = document.createElement('div');
|
|
4536
|
-
dataDiv.style.cssText = `
|
|
4537
|
-
margin-bottom: 15px;
|
|
4538
|
-
padding: 10px;
|
|
4539
|
-
background: rgba(255, 255, 255, 0.05);
|
|
4540
|
-
border-radius: 6px;
|
|
4541
|
-
border-left: 2px solid #ff6b35;
|
|
4542
|
-
`;
|
|
4543
|
-
const keyTitle = document.createElement('div');
|
|
4544
|
-
keyTitle.textContent = key.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
4545
|
-
keyTitle.style.cssText = `
|
|
4546
|
-
color: #ff6b35;
|
|
4547
|
-
font-weight: 600;
|
|
4548
|
-
margin-bottom: 5px;
|
|
4549
|
-
`;
|
|
4550
|
-
dataDiv.appendChild(keyTitle);
|
|
4551
|
-
const valueDiv = document.createElement('div');
|
|
4552
|
-
if (typeof value === 'string') {
|
|
4553
|
-
valueDiv.textContent = value;
|
|
4554
|
-
valueDiv.style.cssText = `color: rgba(255, 255, 255, 0.9);`;
|
|
4555
|
-
}
|
|
4556
|
-
else {
|
|
4557
|
-
valueDiv.innerHTML = `
|
|
4558
|
-
<pre style="color: rgba(255, 255, 255, 0.7); font-size: 12px; margin: 0; white-space: pre-wrap;">${JSON.stringify(value, null, 2)}</pre>
|
|
4559
|
-
`;
|
|
4560
|
-
}
|
|
4561
|
-
dataDiv.appendChild(valueDiv);
|
|
4562
|
-
container.appendChild(dataDiv);
|
|
4563
|
-
});
|
|
4564
|
-
}
|
|
4565
|
-
}
|
|
4566
4083
|
async cleanup() {
|
|
4567
4084
|
if (this.hls) {
|
|
4568
4085
|
this.hls.destroy();
|