add stop playback.

This commit is contained in:
Quicksticks-oss committed 2024-04-15 16:39:12 -04:00
1 parent 3ee9872ecc
commit ce268e6438
2 files changed
+23 -14

No files matched your search

+22 -13
View File
@@ -378,7 +378,7 @@ class Editor {
console.log(result);
}
public async testTestTimelineEvents() {}
public async testTestTimelineEvents() { }
public async loadScene(scene_media_token: string) {
this.dispatchAppUiState({
@@ -854,10 +854,10 @@ class Editor {
audioSegment,
"-filter_complex",
"[1:a]adelay=" +
startTime * 1000 +
"|" +
startTime * 1000 +
"[a1];[0:a][a1]amix=inputs=2[a]",
startTime * 1000 +
"|" +
startTime * 1000 +
"[a1];[0:a][a1]amix=inputs=2[a]",
"-map",
"[a]",
`${itteration}final_tmp.wav`,
@@ -1107,6 +1107,7 @@ class Editor {
this.frame_buffer = [];
this.render_timer = 0;
this.activeScene.renderMode(this.rendering);
this.timeline.scrubber_frame_position = 0;
if (this.activeScene.hot_items) {
this.activeScene.hot_items.forEach((element) => {
element.visible = false;
@@ -1117,15 +1118,23 @@ class Editor {
startPlayback() {
this.updateLoad(25, "Starting Processing");
this.timeline.is_playing = true;
this.timeline.scrubber_frame_position = 0;
if (!this.camera_person_mode) {
this.switchCameraView();
if (!this.rendering && this.timeline.is_playing) {
this.timeline.is_playing = false;
this.timeline.scrubber_frame_position = 0;
this.timeline.resetScene();
}
if (this.activeScene.hot_items) {
this.activeScene.hot_items.forEach((element) => {
element.visible = false;
});
else {
this.timeline.is_playing = true;
this.timeline.scrubber_frame_position = 0;
if (!this.camera_person_mode) {
this.switchCameraView();
}
if (this.activeScene.hot_items) {
this.activeScene.hot_items.forEach((element) => {
element.visible = false;
});
}
}
}
+1 -1
View File
@@ -432,7 +432,7 @@ export class TimeLine {
this.is_playing = true;
}
private async resetScene() {
public async resetScene() {
for (const element of this.timeline_items) {
if (element.type === ClipType.TRANSFORM) {
const object = this.scene.get_object_by_uuid(element.object_uuid);