fixed fps within stopPlayback

This commit is contained in:
Quicksticks-oss committed 2024-04-11 16:08:37 -04:00
1 parent 8ae4c657cf
commit 5c8eeb447a
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -191,7 +191,7 @@ export class APIManager {
* @param media_file_token
* @returns
*/
private async getMediaFile(media_file_token: string): Promise<string> {
public async getMediaFile(media_file_token: string): Promise<string> {
const api_base_url = "https://api.fakeyou.com";
const url = `${api_base_url}/v1/media_files/file/${media_file_token}`;
const response = await fetch(url);
+4 -4
View File
@@ -22,7 +22,7 @@ import { AnimationEngine } from "./animation_engine.js";
import { PointerLockControls } from "three/addons/controls/PointerLockControls.js";
import { APPUI_ACTION_TYPES } from "../../../reducers";
import { ClipGroup } from "~/pages/PageEnigma/models/track";
import { ClipGroup, ClipType } from "~/pages/PageEnigma/models/track";
import { XYZ } from "../datastructures/common";
import { StoryTellerProxyScene } from "../proxy/storyteller_proxy_scene";
@@ -836,7 +836,7 @@ class Editor {
async stopPlayback(compile_audio: boolean = true) {
console.log(this.frames*(this.timeline.timeline_limit/this.cap_fps))
let video_fps = this.frames*(this.cap_fps/this.timeline.timeline_limit)
//if (this.generating_preview) {
// return;
@@ -857,7 +857,7 @@ class Editor {
}
await ffmpeg.run(
"-framerate",
"" + this.cap_fps / 2,
"" + video_fps,
"-i",
"image%d.png",
"-f",
@@ -882,7 +882,7 @@ class Editor {
if (compile_audio) {
for (const clip of this.timeline.timeline_items) {
if (clip.type == "lipsync" || clip.type == "audio") {
if (clip.type == ClipType.AUDIO) {
await this.convertAudioClip(itteration, ffmpeg, clip);
itteration += 1;
}