@thestatic-tv/dcl-sdk 2.5.2 → 2.5.3
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.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -3493,6 +3493,7 @@ function setupStaticUI(client) {
|
|
|
3493
3493
|
|
|
3494
3494
|
// src/StaticTVClient.ts
|
|
3495
3495
|
var import_ecs3 = require("@dcl/sdk/ecs");
|
|
3496
|
+
var utils = __toESM(require("@dcl-sdk/utils"));
|
|
3496
3497
|
var DEFAULT_BASE_URL = "https://thestatic.tv/api/v1/dcl";
|
|
3497
3498
|
var DEFAULT_FALLBACK_VIDEO = "https://media.thestatic.tv/fallback-loop.mp4";
|
|
3498
3499
|
var KEY_TYPE_CHANNEL = "channel";
|
|
@@ -3560,6 +3561,7 @@ var StaticTVClient = class {
|
|
|
3560
3561
|
this._pendingVideoData = null;
|
|
3561
3562
|
this._streamVerified = false;
|
|
3562
3563
|
this._verificationTimeoutId = null;
|
|
3564
|
+
// DCL timer ID
|
|
3563
3565
|
this._videoEventsRegistered = false;
|
|
3564
3566
|
this._featuresReadyPromise = new Promise((resolve) => {
|
|
3565
3567
|
this._featuresReadyResolve = resolve;
|
|
@@ -3840,7 +3842,7 @@ var StaticTVClient = class {
|
|
|
3840
3842
|
if (this._pendingVideoData) {
|
|
3841
3843
|
this.showNotification(`Connecting to ${this._pendingVideoData.name}...`, 1e4);
|
|
3842
3844
|
}
|
|
3843
|
-
this._verificationTimeoutId = setTimeout(() => {
|
|
3845
|
+
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
3844
3846
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
3845
3847
|
this.log(`Stream verification timeout for: ${this._pendingVideoData.name}`);
|
|
3846
3848
|
this._handleStreamOffline();
|
|
@@ -3866,7 +3868,7 @@ var StaticTVClient = class {
|
|
|
3866
3868
|
*/
|
|
3867
3869
|
_clearVerificationTimeout() {
|
|
3868
3870
|
if (this._verificationTimeoutId) {
|
|
3869
|
-
clearTimeout(this._verificationTimeoutId);
|
|
3871
|
+
utils.timers.clearTimeout(this._verificationTimeoutId);
|
|
3870
3872
|
this._verificationTimeoutId = null;
|
|
3871
3873
|
}
|
|
3872
3874
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3450,6 +3450,7 @@ function setupStaticUI(client) {
|
|
|
3450
3450
|
|
|
3451
3451
|
// src/StaticTVClient.ts
|
|
3452
3452
|
import { VideoPlayer, Material, videoEventsSystem, VideoState } from "@dcl/sdk/ecs";
|
|
3453
|
+
import * as utils from "@dcl-sdk/utils";
|
|
3453
3454
|
var DEFAULT_BASE_URL = "https://thestatic.tv/api/v1/dcl";
|
|
3454
3455
|
var DEFAULT_FALLBACK_VIDEO = "https://media.thestatic.tv/fallback-loop.mp4";
|
|
3455
3456
|
var KEY_TYPE_CHANNEL = "channel";
|
|
@@ -3517,6 +3518,7 @@ var StaticTVClient = class {
|
|
|
3517
3518
|
this._pendingVideoData = null;
|
|
3518
3519
|
this._streamVerified = false;
|
|
3519
3520
|
this._verificationTimeoutId = null;
|
|
3521
|
+
// DCL timer ID
|
|
3520
3522
|
this._videoEventsRegistered = false;
|
|
3521
3523
|
this._featuresReadyPromise = new Promise((resolve) => {
|
|
3522
3524
|
this._featuresReadyResolve = resolve;
|
|
@@ -3797,7 +3799,7 @@ var StaticTVClient = class {
|
|
|
3797
3799
|
if (this._pendingVideoData) {
|
|
3798
3800
|
this.showNotification(`Connecting to ${this._pendingVideoData.name}...`, 1e4);
|
|
3799
3801
|
}
|
|
3800
|
-
this._verificationTimeoutId = setTimeout(() => {
|
|
3802
|
+
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
3801
3803
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
3802
3804
|
this.log(`Stream verification timeout for: ${this._pendingVideoData.name}`);
|
|
3803
3805
|
this._handleStreamOffline();
|
|
@@ -3823,7 +3825,7 @@ var StaticTVClient = class {
|
|
|
3823
3825
|
*/
|
|
3824
3826
|
_clearVerificationTimeout() {
|
|
3825
3827
|
if (this._verificationTimeoutId) {
|
|
3826
|
-
clearTimeout(this._verificationTimeoutId);
|
|
3828
|
+
utils.timers.clearTimeout(this._verificationTimeoutId);
|
|
3827
3829
|
this._verificationTimeoutId = null;
|
|
3828
3830
|
}
|
|
3829
3831
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thestatic-tv/dcl-sdk",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "Connect your Decentraland scene to thestatic.tv - full channel lineup, metrics tracking, and interactions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -46,9 +46,11 @@
|
|
|
46
46
|
"url": "https://github.com/thestatic-tv/dcl-sdk/issues"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
+
"@dcl-sdk/utils": ">=1.0.0",
|
|
49
50
|
"@dcl/sdk": ">=7.0.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
53
|
+
"@dcl-sdk/utils": "^1.4.0",
|
|
52
54
|
"@dcl/sdk": "^7.0.0",
|
|
53
55
|
"@vitest/coverage-v8": "^4.0.16",
|
|
54
56
|
"tsup": "^8.0.0",
|