MCPcopy
hub / github.com/midrender/revideo / request

Method request

packages/core/src/app/Player.ts:443–463  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

441 }
442
443 private request() {
444 if (!this.active) return;
445
446 // TODO(konsti): make this loop not run when player is paused
447
448 this.requestId ??= requestAnimationFrame(async time => {
449 this.requestId = null;
450 if (time - this.renderTime >= 1000 / (this.status.fps + 5)) {
451 this.renderTime = time;
452 await this.lock.acquire();
453 try {
454 await this.run();
455 } catch (e: any) {
456 this.logger.error(e);
457 }
458 this.lock.release();
459 } else {
460 this.request();
461 }
462 });
463 }
464
465 public clampRange(frame: number): number {
466 return clamp(this.startFrame, this.endFrame, frame);

Callers 3

activateMethod · 0.95
requestRecalculationMethod · 0.95
runMethod · 0.95

Calls 4

runMethod · 0.95
acquireMethod · 0.80
releaseMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected