@thestatic-tv/dcl-sdk 2.5.6 → 2.5.8
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/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +33 -2
- package/dist/index.mjs +33 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1042,6 +1042,11 @@ declare class StaticTVClient {
|
|
|
1042
1042
|
* Get the currently playing video URL
|
|
1043
1043
|
*/
|
|
1044
1044
|
get currentVideoUrl(): string;
|
|
1045
|
+
/**
|
|
1046
|
+
* Get the video ID currently being connected/verified (for "CONNECTING" indicator)
|
|
1047
|
+
* Returns null if no stream verification is in progress
|
|
1048
|
+
*/
|
|
1049
|
+
get connectingVideoId(): string | null;
|
|
1045
1050
|
/**
|
|
1046
1051
|
* Internal handler for Guide video selection
|
|
1047
1052
|
* Tries to play the stream and verifies it's working (like M1D-HQ behavior)
|
package/dist/index.d.ts
CHANGED
|
@@ -1042,6 +1042,11 @@ declare class StaticTVClient {
|
|
|
1042
1042
|
* Get the currently playing video URL
|
|
1043
1043
|
*/
|
|
1044
1044
|
get currentVideoUrl(): string;
|
|
1045
|
+
/**
|
|
1046
|
+
* Get the video ID currently being connected/verified (for "CONNECTING" indicator)
|
|
1047
|
+
* Returns null if no stream verification is in progress
|
|
1048
|
+
*/
|
|
1049
|
+
get connectingVideoId(): string | null;
|
|
1045
1050
|
/**
|
|
1046
1051
|
* Internal handler for Guide video selection
|
|
1047
1052
|
* Tries to play the stream and verifies it's working (like M1D-HQ behavior)
|
package/dist/index.js
CHANGED
|
@@ -1341,6 +1341,13 @@ var GuideUIModule = class {
|
|
|
1341
1341
|
const cardW = this.s(UI_DIMENSIONS.guide.content.cardWidth);
|
|
1342
1342
|
const cardH = this.s(UI_DIMENSIONS.guide.content.cardHeight);
|
|
1343
1343
|
const isActive = this._currentVideoId === video.id;
|
|
1344
|
+
const isConnecting = this.client.connectingVideoId === video.id;
|
|
1345
|
+
let cardBgColor = import_math3.Color4.create(0.15, 0.15, 0.15, 0.8);
|
|
1346
|
+
if (isActive && !isConnecting) {
|
|
1347
|
+
cardBgColor = import_math3.Color4.create(0, 0.4, 0, 0.5);
|
|
1348
|
+
} else if (isConnecting) {
|
|
1349
|
+
cardBgColor = import_math3.Color4.create(0.4, 0.3, 0, 0.5);
|
|
1350
|
+
}
|
|
1344
1351
|
return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
|
|
1345
1352
|
key: video.id,
|
|
1346
1353
|
uiTransform: {
|
|
@@ -1353,7 +1360,7 @@ var GuideUIModule = class {
|
|
|
1353
1360
|
flexDirection: "column",
|
|
1354
1361
|
margin: 4
|
|
1355
1362
|
},
|
|
1356
|
-
uiBackground: { color:
|
|
1363
|
+
uiBackground: { color: cardBgColor },
|
|
1357
1364
|
children: [
|
|
1358
1365
|
// Main click area
|
|
1359
1366
|
import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
|
|
@@ -1373,7 +1380,17 @@ var GuideUIModule = class {
|
|
|
1373
1380
|
color: THEME.colors.white
|
|
1374
1381
|
}
|
|
1375
1382
|
}),
|
|
1376
|
-
|
|
1383
|
+
// Status indicator: CONNECTING > PLAYING > LIVE
|
|
1384
|
+
...isConnecting ? [
|
|
1385
|
+
import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
|
|
1386
|
+
key: "connecting",
|
|
1387
|
+
uiText: {
|
|
1388
|
+
value: "CONNECTING...",
|
|
1389
|
+
fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
|
|
1390
|
+
color: THEME.colors.yellow
|
|
1391
|
+
}
|
|
1392
|
+
})
|
|
1393
|
+
] : isActive ? [
|
|
1377
1394
|
import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
|
|
1378
1395
|
key: "playing",
|
|
1379
1396
|
uiText: {
|
|
@@ -3616,6 +3633,13 @@ var StaticTVClient = class {
|
|
|
3616
3633
|
});
|
|
3617
3634
|
});
|
|
3618
3635
|
}
|
|
3636
|
+
if (this.config.videoScreen !== void 0) {
|
|
3637
|
+
const fallbackUrl = this.config.fallbackVideoUrl !== void 0 ? this.config.fallbackVideoUrl : DEFAULT_FALLBACK_VIDEO;
|
|
3638
|
+
if (fallbackUrl !== "") {
|
|
3639
|
+
this._playVideoInternal(fallbackUrl, true, false);
|
|
3640
|
+
this.log(`Auto-playing fallback video: ${fallbackUrl}`);
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3619
3643
|
this.log(`StaticTVClient initialized (${this._keyType} mode)`);
|
|
3620
3644
|
}
|
|
3621
3645
|
/** Get the API base URL (for internal module use) */
|
|
@@ -3884,6 +3908,13 @@ var StaticTVClient = class {
|
|
|
3884
3908
|
get currentVideoUrl() {
|
|
3885
3909
|
return this._currentVideoUrl;
|
|
3886
3910
|
}
|
|
3911
|
+
/**
|
|
3912
|
+
* Get the video ID currently being connected/verified (for "CONNECTING" indicator)
|
|
3913
|
+
* Returns null if no stream verification is in progress
|
|
3914
|
+
*/
|
|
3915
|
+
get connectingVideoId() {
|
|
3916
|
+
return this._pendingVideoData && !this._streamVerified ? this._pendingVideoData.id : null;
|
|
3917
|
+
}
|
|
3887
3918
|
/**
|
|
3888
3919
|
* Internal handler for Guide video selection
|
|
3889
3920
|
* Tries to play the stream and verifies it's working (like M1D-HQ behavior)
|
package/dist/index.mjs
CHANGED
|
@@ -1298,6 +1298,13 @@ var GuideUIModule = class {
|
|
|
1298
1298
|
const cardW = this.s(UI_DIMENSIONS.guide.content.cardWidth);
|
|
1299
1299
|
const cardH = this.s(UI_DIMENSIONS.guide.content.cardHeight);
|
|
1300
1300
|
const isActive = this._currentVideoId === video.id;
|
|
1301
|
+
const isConnecting = this.client.connectingVideoId === video.id;
|
|
1302
|
+
let cardBgColor = Color43.create(0.15, 0.15, 0.15, 0.8);
|
|
1303
|
+
if (isActive && !isConnecting) {
|
|
1304
|
+
cardBgColor = Color43.create(0, 0.4, 0, 0.5);
|
|
1305
|
+
} else if (isConnecting) {
|
|
1306
|
+
cardBgColor = Color43.create(0.4, 0.3, 0, 0.5);
|
|
1307
|
+
}
|
|
1301
1308
|
return ReactEcs2.createElement(UiEntity2, {
|
|
1302
1309
|
key: video.id,
|
|
1303
1310
|
uiTransform: {
|
|
@@ -1310,7 +1317,7 @@ var GuideUIModule = class {
|
|
|
1310
1317
|
flexDirection: "column",
|
|
1311
1318
|
margin: 4
|
|
1312
1319
|
},
|
|
1313
|
-
uiBackground: { color:
|
|
1320
|
+
uiBackground: { color: cardBgColor },
|
|
1314
1321
|
children: [
|
|
1315
1322
|
// Main click area
|
|
1316
1323
|
ReactEcs2.createElement(UiEntity2, {
|
|
@@ -1330,7 +1337,17 @@ var GuideUIModule = class {
|
|
|
1330
1337
|
color: THEME.colors.white
|
|
1331
1338
|
}
|
|
1332
1339
|
}),
|
|
1333
|
-
|
|
1340
|
+
// Status indicator: CONNECTING > PLAYING > LIVE
|
|
1341
|
+
...isConnecting ? [
|
|
1342
|
+
ReactEcs2.createElement(UiEntity2, {
|
|
1343
|
+
key: "connecting",
|
|
1344
|
+
uiText: {
|
|
1345
|
+
value: "CONNECTING...",
|
|
1346
|
+
fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
|
|
1347
|
+
color: THEME.colors.yellow
|
|
1348
|
+
}
|
|
1349
|
+
})
|
|
1350
|
+
] : isActive ? [
|
|
1334
1351
|
ReactEcs2.createElement(UiEntity2, {
|
|
1335
1352
|
key: "playing",
|
|
1336
1353
|
uiText: {
|
|
@@ -3573,6 +3590,13 @@ var StaticTVClient = class {
|
|
|
3573
3590
|
});
|
|
3574
3591
|
});
|
|
3575
3592
|
}
|
|
3593
|
+
if (this.config.videoScreen !== void 0) {
|
|
3594
|
+
const fallbackUrl = this.config.fallbackVideoUrl !== void 0 ? this.config.fallbackVideoUrl : DEFAULT_FALLBACK_VIDEO;
|
|
3595
|
+
if (fallbackUrl !== "") {
|
|
3596
|
+
this._playVideoInternal(fallbackUrl, true, false);
|
|
3597
|
+
this.log(`Auto-playing fallback video: ${fallbackUrl}`);
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3576
3600
|
this.log(`StaticTVClient initialized (${this._keyType} mode)`);
|
|
3577
3601
|
}
|
|
3578
3602
|
/** Get the API base URL (for internal module use) */
|
|
@@ -3841,6 +3865,13 @@ var StaticTVClient = class {
|
|
|
3841
3865
|
get currentVideoUrl() {
|
|
3842
3866
|
return this._currentVideoUrl;
|
|
3843
3867
|
}
|
|
3868
|
+
/**
|
|
3869
|
+
* Get the video ID currently being connected/verified (for "CONNECTING" indicator)
|
|
3870
|
+
* Returns null if no stream verification is in progress
|
|
3871
|
+
*/
|
|
3872
|
+
get connectingVideoId() {
|
|
3873
|
+
return this._pendingVideoData && !this._streamVerified ? this._pendingVideoData.id : null;
|
|
3874
|
+
}
|
|
3844
3875
|
/**
|
|
3845
3876
|
* Internal handler for Guide video selection
|
|
3846
3877
|
* Tries to play the stream and verifies it's working (like M1D-HQ behavior)
|
package/package.json
CHANGED