@thestatic-tv/dcl-sdk 2.5.24 → 2.5.26
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 +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4345,6 +4345,7 @@ var StaticTVClient = class {
|
|
|
4345
4345
|
_startCallbackVerification(video) {
|
|
4346
4346
|
this.log(`Starting callback verification for: ${video.name}`);
|
|
4347
4347
|
this.showNotification(`Connecting to ${video.name}...`, 5e3);
|
|
4348
|
+
this._verificationStartTime = Date.now();
|
|
4348
4349
|
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4349
4350
|
this.log(`Verification timeout check - verified: ${this._streamVerified}, pending: ${!!this._pendingVideoData}`);
|
|
4350
4351
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
@@ -4371,7 +4372,13 @@ var StaticTVClient = class {
|
|
|
4371
4372
|
* ```
|
|
4372
4373
|
*/
|
|
4373
4374
|
confirmVideoPlaying() {
|
|
4374
|
-
|
|
4375
|
+
const timeSinceStart = Date.now() - this._verificationStartTime;
|
|
4376
|
+
const MIN_DELAY = 200;
|
|
4377
|
+
this.log(`confirmVideoPlaying called - pending: ${!!this._pendingVideoData}, verified: ${this._streamVerified}, elapsed: ${timeSinceStart}ms`);
|
|
4378
|
+
if (timeSinceStart < MIN_DELAY) {
|
|
4379
|
+
this.log(`Ignoring early VS_PLAYING (stale event, ${timeSinceStart}ms < ${MIN_DELAY}ms)`);
|
|
4380
|
+
return;
|
|
4381
|
+
}
|
|
4375
4382
|
if (this._pendingVideoData && !this._streamVerified) {
|
|
4376
4383
|
this._streamVerified = true;
|
|
4377
4384
|
this._clearVerificationTimeout();
|
package/dist/index.mjs
CHANGED
|
@@ -4297,6 +4297,7 @@ var StaticTVClient = class {
|
|
|
4297
4297
|
_startCallbackVerification(video) {
|
|
4298
4298
|
this.log(`Starting callback verification for: ${video.name}`);
|
|
4299
4299
|
this.showNotification(`Connecting to ${video.name}...`, 5e3);
|
|
4300
|
+
this._verificationStartTime = Date.now();
|
|
4300
4301
|
this._verificationTimeoutId = utils.timers.setTimeout(() => {
|
|
4301
4302
|
this.log(`Verification timeout check - verified: ${this._streamVerified}, pending: ${!!this._pendingVideoData}`);
|
|
4302
4303
|
if (!this._streamVerified && this._pendingVideoData) {
|
|
@@ -4323,7 +4324,13 @@ var StaticTVClient = class {
|
|
|
4323
4324
|
* ```
|
|
4324
4325
|
*/
|
|
4325
4326
|
confirmVideoPlaying() {
|
|
4326
|
-
|
|
4327
|
+
const timeSinceStart = Date.now() - this._verificationStartTime;
|
|
4328
|
+
const MIN_DELAY = 200;
|
|
4329
|
+
this.log(`confirmVideoPlaying called - pending: ${!!this._pendingVideoData}, verified: ${this._streamVerified}, elapsed: ${timeSinceStart}ms`);
|
|
4330
|
+
if (timeSinceStart < MIN_DELAY) {
|
|
4331
|
+
this.log(`Ignoring early VS_PLAYING (stale event, ${timeSinceStart}ms < ${MIN_DELAY}ms)`);
|
|
4332
|
+
return;
|
|
4333
|
+
}
|
|
4327
4334
|
if (this._pendingVideoData && !this._streamVerified) {
|
|
4328
4335
|
this._streamVerified = true;
|
|
4329
4336
|
this._clearVerificationTimeout();
|
package/package.json
CHANGED