@thestatic-tv/dcl-sdk 2.5.20 → 2.5.21
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -24
- package/dist/index.mjs +9 -24
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1122,7 +1122,7 @@ declare class StaticTVClient {
|
|
|
1122
1122
|
private _playVideoWithVerification;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Start stream verification for callback-based video playback
|
|
1125
|
-
*
|
|
1125
|
+
* Shows CONNECTING state and triggers fallback if verification times out
|
|
1126
1126
|
* @internal
|
|
1127
1127
|
*/
|
|
1128
1128
|
private _startCallbackVerification;
|
package/dist/index.d.ts
CHANGED
|
@@ -1122,7 +1122,7 @@ declare class StaticTVClient {
|
|
|
1122
1122
|
private _playVideoWithVerification;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Start stream verification for callback-based video playback
|
|
1125
|
-
*
|
|
1125
|
+
* Shows CONNECTING state and triggers fallback if verification times out
|
|
1126
1126
|
* @internal
|
|
1127
1127
|
*/
|
|
1128
1128
|
private _startCallbackVerification;
|
package/dist/index.js
CHANGED
|
@@ -4217,23 +4217,10 @@ var StaticTVClient = class {
|
|
|
4217
4217
|
if (videoEvent.state === import_ecs4.VideoState.VS_PLAYING) {
|
|
4218
4218
|
const timeSinceStart = Date.now() - this._verificationStartTime;
|
|
4219
4219
|
const MIN_VERIFICATION_DELAY = 2e3;
|
|
4220
|
-
if (this._pendingVideoData && !this._streamVerified) {
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
this.log(`Stream verified: ${this._pendingVideoData.name} (after ${timeSinceStart}ms)`);
|
|
4225
|
-
} else {
|
|
4226
|
-
const remainingDelay = MIN_VERIFICATION_DELAY - timeSinceStart;
|
|
4227
|
-
this.log(`VS_PLAYING received early, scheduling verification in ${remainingDelay}ms`);
|
|
4228
|
-
this._clearVerificationTimeout();
|
|
4229
|
-
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4230
|
-
if (this._pendingVideoData && !this._streamVerified) {
|
|
4231
|
-
this._streamVerified = true;
|
|
4232
|
-
this._clearVerificationTimeout();
|
|
4233
|
-
this.log(`Stream verified (delayed): ${this._pendingVideoData.name}`);
|
|
4234
|
-
}
|
|
4235
|
-
}, remainingDelay);
|
|
4236
|
-
}
|
|
4220
|
+
if (this._pendingVideoData && !this._streamVerified && timeSinceStart >= MIN_VERIFICATION_DELAY) {
|
|
4221
|
+
this._streamVerified = true;
|
|
4222
|
+
this._clearVerificationTimeout();
|
|
4223
|
+
this.log(`Stream verified: ${this._pendingVideoData.name} (after ${timeSinceStart}ms)`);
|
|
4237
4224
|
}
|
|
4238
4225
|
}
|
|
4239
4226
|
if (videoEvent.state === import_ecs4.VideoState.VS_ERROR) {
|
|
@@ -4349,19 +4336,17 @@ var StaticTVClient = class {
|
|
|
4349
4336
|
}
|
|
4350
4337
|
/**
|
|
4351
4338
|
* Start stream verification for callback-based video playback
|
|
4352
|
-
*
|
|
4339
|
+
* Shows CONNECTING state and triggers fallback if verification times out
|
|
4353
4340
|
* @internal
|
|
4354
4341
|
*/
|
|
4355
4342
|
_startCallbackVerification(video) {
|
|
4356
|
-
this.
|
|
4357
|
-
this.showNotification(`Connecting to ${video.name}...`, 3e3);
|
|
4343
|
+
this.showNotification(`Connecting to ${video.name}...`, 6e3);
|
|
4358
4344
|
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4359
4345
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
4360
|
-
this.
|
|
4361
|
-
this.
|
|
4362
|
-
this.log(`Stream auto-verified (callback mode): ${video.name}`);
|
|
4346
|
+
this.log(`Stream verification timeout (callback mode): ${video.name}`);
|
|
4347
|
+
this._handleStreamOffline();
|
|
4363
4348
|
}
|
|
4364
|
-
},
|
|
4349
|
+
}, 5e3);
|
|
4365
4350
|
}
|
|
4366
4351
|
/**
|
|
4367
4352
|
* Call this to confirm that a video stream is playing successfully.
|
package/dist/index.mjs
CHANGED
|
@@ -4169,23 +4169,10 @@ var StaticTVClient = class {
|
|
|
4169
4169
|
if (videoEvent.state === VideoState.VS_PLAYING) {
|
|
4170
4170
|
const timeSinceStart = Date.now() - this._verificationStartTime;
|
|
4171
4171
|
const MIN_VERIFICATION_DELAY = 2e3;
|
|
4172
|
-
if (this._pendingVideoData && !this._streamVerified) {
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
this.log(`Stream verified: ${this._pendingVideoData.name} (after ${timeSinceStart}ms)`);
|
|
4177
|
-
} else {
|
|
4178
|
-
const remainingDelay = MIN_VERIFICATION_DELAY - timeSinceStart;
|
|
4179
|
-
this.log(`VS_PLAYING received early, scheduling verification in ${remainingDelay}ms`);
|
|
4180
|
-
this._clearVerificationTimeout();
|
|
4181
|
-
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4182
|
-
if (this._pendingVideoData && !this._streamVerified) {
|
|
4183
|
-
this._streamVerified = true;
|
|
4184
|
-
this._clearVerificationTimeout();
|
|
4185
|
-
this.log(`Stream verified (delayed): ${this._pendingVideoData.name}`);
|
|
4186
|
-
}
|
|
4187
|
-
}, remainingDelay);
|
|
4188
|
-
}
|
|
4172
|
+
if (this._pendingVideoData && !this._streamVerified && timeSinceStart >= MIN_VERIFICATION_DELAY) {
|
|
4173
|
+
this._streamVerified = true;
|
|
4174
|
+
this._clearVerificationTimeout();
|
|
4175
|
+
this.log(`Stream verified: ${this._pendingVideoData.name} (after ${timeSinceStart}ms)`);
|
|
4189
4176
|
}
|
|
4190
4177
|
}
|
|
4191
4178
|
if (videoEvent.state === VideoState.VS_ERROR) {
|
|
@@ -4301,19 +4288,17 @@ var StaticTVClient = class {
|
|
|
4301
4288
|
}
|
|
4302
4289
|
/**
|
|
4303
4290
|
* Start stream verification for callback-based video playback
|
|
4304
|
-
*
|
|
4291
|
+
* Shows CONNECTING state and triggers fallback if verification times out
|
|
4305
4292
|
* @internal
|
|
4306
4293
|
*/
|
|
4307
4294
|
_startCallbackVerification(video) {
|
|
4308
|
-
this.
|
|
4309
|
-
this.showNotification(`Connecting to ${video.name}...`, 3e3);
|
|
4295
|
+
this.showNotification(`Connecting to ${video.name}...`, 6e3);
|
|
4310
4296
|
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4311
4297
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
4312
|
-
this.
|
|
4313
|
-
this.
|
|
4314
|
-
this.log(`Stream auto-verified (callback mode): ${video.name}`);
|
|
4298
|
+
this.log(`Stream verification timeout (callback mode): ${video.name}`);
|
|
4299
|
+
this._handleStreamOffline();
|
|
4315
4300
|
}
|
|
4316
|
-
},
|
|
4301
|
+
}, 5e3);
|
|
4317
4302
|
}
|
|
4318
4303
|
/**
|
|
4319
4304
|
* Call this to confirm that a video stream is playing successfully.
|
package/package.json
CHANGED