@needle-tools/engine 4.16.6 → 4.16.7-beta
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/SKILL.md +229 -27
- package/dist/{needle-engine.bundle-BN_X4iTv.js → needle-engine.bundle-B-O5F3Ur.js} +22 -17
- package/dist/{needle-engine.bundle-DY-lNV9M.min.js → needle-engine.bundle-DXoiNlde.min.js} +5 -5
- package/dist/{needle-engine.bundle-D-slQEcs.umd.cjs → needle-engine.bundle-DnyRDOFZ.umd.cjs} +69 -69
- package/dist/needle-engine.d.ts +18 -15
- package/dist/needle-engine.js +2 -2
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/xr/NeedleXRSession.d.ts +2 -0
- package/lib/engine/xr/NeedleXRSession.js +24 -6
- package/lib/engine/xr/NeedleXRSession.js.map +1 -1
- package/lib/engine-components/ReflectionProbe.js +2 -0
- package/lib/engine-components/ReflectionProbe.js.map +1 -1
- package/lib/engine-components/VideoPlayer.d.ts +1 -0
- package/lib/engine-components/VideoPlayer.js +5 -1
- package/lib/engine-components/VideoPlayer.js.map +1 -1
- package/package.json +1 -1
- package/plugins/vite/build-pipeline.js +16 -6
- package/src/engine/xr/NeedleXRSession.ts +21 -5
- package/src/engine-components/ReflectionProbe.ts +2 -0
- package/src/engine-components/VideoPlayer.ts +4 -1
|
@@ -428,6 +428,8 @@ export class VideoPlayer extends Behaviour {
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
+
private _playErrors: number = 0;
|
|
432
|
+
|
|
431
433
|
/** start playing the video source */
|
|
432
434
|
play() {
|
|
433
435
|
if (!this._videoElement) this.create(false);
|
|
@@ -448,7 +450,8 @@ export class VideoPlayer extends Behaviour {
|
|
|
448
450
|
if (debug) console.log("Video Play()", this.clip, this._videoElement, this.time);
|
|
449
451
|
this._videoElement.currentTime = this.time;
|
|
450
452
|
this._videoElement.play().catch(err => {
|
|
451
|
-
console.
|
|
453
|
+
if (this._playErrors++ < 10) console.error(err);
|
|
454
|
+
else if (this._playErrors === 10) console.error("Multiple errors playing video, further errors will be suppressed. Use 'debugvideo' param to see all errors.");
|
|
452
455
|
// https://developer.chrome.com/blog/play-request-was-interrupted/
|
|
453
456
|
if (debug)
|
|
454
457
|
console.error("Error playing video", err, "CODE=" + err.code, this.videoElement?.src, this);
|