YuichirouSeitoku / mdd

0 stars 0 forks source link

動画生成機能を追加 #28

Open gauzesya opened 1 month ago

github-actions[bot] commented 1 month ago

Lint Results

mdd@1.0.0 lint eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix

/home/runner/work/mdd/mdd/src/preload/index.d.ts 1:10 error 'IpcRendererEvent' is defined but never used. Allowed unused vars must match /_/u @typescript-eslint/no-unused-vars

/home/runner/work/mdd/mdd/src/renderer/src/components/Player.tsx 3:24 error 'Explanation' is defined but never used. Allowed unused vars must match /_/u @typescript-eslint/no-unused-vars

✖ 2 problems (2 errors, 0 warnings)

yumetodo commented 1 month ago

image

  const [shortcutEvents, startAt] = await loadProjectFile(mddprojectFilePath)

  // ビデオデータを画像に分割して一時ディレクトリに保存
  const frameInterval = 10 //  FIXME: 仮決め
  const tmpDir = await mkdtemp(join(tmpdir(), 'video-')) // 画像の保存先の一時ディレクトリ
  await splitVideoData(videoPath, frameInterval, tmpDir)

  const files = await readdir(tmpDir)

filesが取れてない

yumetodo commented 1 month ago
    explanation.then((data) => {
      explanations.push(data)
    })

ここが非同期なのに

  return explanations

ここが同期的なのでそれがわるい

image

yumetodo commented 1 month ago

image

とりあえずここまではきた

yumetodo commented 1 month ago

image

image

yumetodo commented 1 month ago
    const url = URL.createObjectURL(video)
    location.href = url

そもそもなんでlocation.hrefが登場したんだっけ・・・?