@thestatic-tv/dcl-sdk 2.5.22 → 2.5.24
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 +17 -5
- package/dist/index.mjs +17 -5
- 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
|
+
* If stream doesn't confirm within timeout, silently triggers fallback
|
|
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
|
+
* If stream doesn't confirm within timeout, silently triggers fallback
|
|
1126
1126
|
* @internal
|
|
1127
1127
|
*/
|
|
1128
1128
|
private _startCallbackVerification;
|
package/dist/index.js
CHANGED
|
@@ -4326,8 +4326,12 @@ var StaticTVClient = class {
|
|
|
4326
4326
|
}
|
|
4327
4327
|
if (hasCallback) {
|
|
4328
4328
|
this.config.onVideoPlay(video.src);
|
|
4329
|
-
|
|
4330
|
-
|
|
4329
|
+
if (isLiveStream) {
|
|
4330
|
+
this._startCallbackVerification(video);
|
|
4331
|
+
} else {
|
|
4332
|
+
this._streamVerified = true;
|
|
4333
|
+
this._pendingVideoData = null;
|
|
4334
|
+
}
|
|
4331
4335
|
}
|
|
4332
4336
|
if (this.guideUI) {
|
|
4333
4337
|
this.guideUI.currentVideoId = video.id;
|
|
@@ -4335,15 +4339,22 @@ var StaticTVClient = class {
|
|
|
4335
4339
|
}
|
|
4336
4340
|
/**
|
|
4337
4341
|
* Start stream verification for callback-based video playback
|
|
4338
|
-
*
|
|
4342
|
+
* If stream doesn't confirm within timeout, silently triggers fallback
|
|
4339
4343
|
* @internal
|
|
4340
4344
|
*/
|
|
4341
4345
|
_startCallbackVerification(video) {
|
|
4342
|
-
this.
|
|
4346
|
+
this.log(`Starting callback verification for: ${video.name}`);
|
|
4347
|
+
this.showNotification(`Connecting to ${video.name}...`, 5e3);
|
|
4343
4348
|
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4349
|
+
this.log(`Verification timeout check - verified: ${this._streamVerified}, pending: ${!!this._pendingVideoData}`);
|
|
4344
4350
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
4345
4351
|
this.log(`Stream verification timeout (callback mode): ${video.name}`);
|
|
4346
|
-
this.
|
|
4352
|
+
this._pendingVideoData = null;
|
|
4353
|
+
this._clearVerificationTimeout();
|
|
4354
|
+
if (this.guideUI) {
|
|
4355
|
+
this.guideUI.currentVideoId = null;
|
|
4356
|
+
}
|
|
4357
|
+
this.stopVideo();
|
|
4347
4358
|
}
|
|
4348
4359
|
}, 5e3);
|
|
4349
4360
|
}
|
|
@@ -4360,6 +4371,7 @@ var StaticTVClient = class {
|
|
|
4360
4371
|
* ```
|
|
4361
4372
|
*/
|
|
4362
4373
|
confirmVideoPlaying() {
|
|
4374
|
+
this.log(`confirmVideoPlaying called - pending: ${!!this._pendingVideoData}, verified: ${this._streamVerified}`);
|
|
4363
4375
|
if (this._pendingVideoData && !this._streamVerified) {
|
|
4364
4376
|
this._streamVerified = true;
|
|
4365
4377
|
this._clearVerificationTimeout();
|
package/dist/index.mjs
CHANGED
|
@@ -4278,8 +4278,12 @@ var StaticTVClient = class {
|
|
|
4278
4278
|
}
|
|
4279
4279
|
if (hasCallback) {
|
|
4280
4280
|
this.config.onVideoPlay(video.src);
|
|
4281
|
-
|
|
4282
|
-
|
|
4281
|
+
if (isLiveStream) {
|
|
4282
|
+
this._startCallbackVerification(video);
|
|
4283
|
+
} else {
|
|
4284
|
+
this._streamVerified = true;
|
|
4285
|
+
this._pendingVideoData = null;
|
|
4286
|
+
}
|
|
4283
4287
|
}
|
|
4284
4288
|
if (this.guideUI) {
|
|
4285
4289
|
this.guideUI.currentVideoId = video.id;
|
|
@@ -4287,15 +4291,22 @@ var StaticTVClient = class {
|
|
|
4287
4291
|
}
|
|
4288
4292
|
/**
|
|
4289
4293
|
* Start stream verification for callback-based video playback
|
|
4290
|
-
*
|
|
4294
|
+
* If stream doesn't confirm within timeout, silently triggers fallback
|
|
4291
4295
|
* @internal
|
|
4292
4296
|
*/
|
|
4293
4297
|
_startCallbackVerification(video) {
|
|
4294
|
-
this.
|
|
4298
|
+
this.log(`Starting callback verification for: ${video.name}`);
|
|
4299
|
+
this.showNotification(`Connecting to ${video.name}...`, 5e3);
|
|
4295
4300
|
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4301
|
+
this.log(`Verification timeout check - verified: ${this._streamVerified}, pending: ${!!this._pendingVideoData}`);
|
|
4296
4302
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
4297
4303
|
this.log(`Stream verification timeout (callback mode): ${video.name}`);
|
|
4298
|
-
this.
|
|
4304
|
+
this._pendingVideoData = null;
|
|
4305
|
+
this._clearVerificationTimeout();
|
|
4306
|
+
if (this.guideUI) {
|
|
4307
|
+
this.guideUI.currentVideoId = null;
|
|
4308
|
+
}
|
|
4309
|
+
this.stopVideo();
|
|
4299
4310
|
}
|
|
4300
4311
|
}, 5e3);
|
|
4301
4312
|
}
|
|
@@ -4312,6 +4323,7 @@ var StaticTVClient = class {
|
|
|
4312
4323
|
* ```
|
|
4313
4324
|
*/
|
|
4314
4325
|
confirmVideoPlaying() {
|
|
4326
|
+
this.log(`confirmVideoPlaying called - pending: ${!!this._pendingVideoData}, verified: ${this._streamVerified}`);
|
|
4315
4327
|
if (this._pendingVideoData && !this._streamVerified) {
|
|
4316
4328
|
this._streamVerified = true;
|
|
4317
4329
|
this._clearVerificationTimeout();
|
package/package.json
CHANGED