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

Method next

packages/core/src/app/PlaybackManager.ts:147–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145 }
146
147 private async next(): Promise<boolean> {
148 if (this.previousScene) {
149 await this.previousScene.next();
150 if (this.currentScene.isFinished()) {
151 this.previousScene = null;
152 }
153 }
154
155 this.frame += this.speed;
156
157 if (this.currentScene.isFinished()) {
158 return true;
159 }
160
161 await this.currentScene.next();
162 if (this.previousScene && this.currentScene.isAfterTransitionIn()) {
163 this.previousScene = null;
164 }
165
166 if (this.currentScene.canTransitionOut()) {
167 this.previousScene = this.currentScene;
168 const nextScene = this.getNextScene(this.previousScene);
169 if (nextScene) {
170 this.previousScene.stopAllMedia();
171 this.currentScene = nextScene;
172 await this.currentScene.reset(this.previousScene);
173 }
174 if (!nextScene || this.currentScene.isAfterTransitionIn()) {
175 this.previousScene = null;
176 }
177 }
178
179 return this.currentScene.isFinished();
180 }
181
182 private findBestScene(frame: number): Scene {
183 let lastScene = this.scenes.current[0];

Callers 2

progressMethod · 0.95
seekMethod · 0.95

Calls 7

getNextSceneMethod · 0.95
isFinishedMethod · 0.80
isAfterTransitionInMethod · 0.80
canTransitionOutMethod · 0.80
nextMethod · 0.65
stopAllMediaMethod · 0.65
resetMethod · 0.65

Tested by

no test coverage detected