-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: FlatConfigにしたら出るエラーをいくつか解消 #2564
The head ref may contain hidden characters: "hiho-flatconfig\u306B\u3057\u305F\u3089\u51FA\u308B\u30A8\u30E9\u30FC\u3092\u3044\u304F\u3064\u304B\u89E3\u6D88"
chore: FlatConfigにしたら出るエラーをいくつか解消 #2564
Conversation
🚀 プレビュー用ページを作成しました 🚀 更新時点でのコミットハッシュ: |
const base64Encoder = (blob: Blob): Promise<string | undefined> => { | ||
return new Promise((resolve, reject) => { | ||
const reader = new FileReader(); | ||
reader.onload = () => { | ||
// string/undefined以外が来ることはないと思うが、型定義的にArrayBufferも来るので、toStringする | ||
const result = reader.result?.toString(); | ||
if (result) { | ||
// resultの中身は、"data:audio/wav;base64,<content>"という形なので、カンマ以降を抜き出す | ||
resolve(result.slice(result.indexOf(",") + 1)); | ||
} else { | ||
reject(); | ||
} | ||
}; | ||
reader.readAsDataURL(blob); | ||
}); | ||
const base64Encoder = async (blob: Blob): Promise<string> => { | ||
const arrayBuffer = await blob.arrayBuffer(); | ||
return toBase64(new Uint8Array(arrayBuffer)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-base64使って簡単にしました。
一応これでここのコード(音声を全て繋げて保存)が動くことは確認しました。
@sevenc-nanashi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
特に問題なさそう。
レビューありがとうございます!! マージします!! |
内容
@MT224244 さんが
でeslintをflat configにしてくださっています。
このPRをマージするといくつかエラーが出るので、それだけ解決しました。
一旦mainブランチに向けてPR出してますが、mainブランチでエラーになりそうだったら #2560 に向けてPR出そうと思います。
関連 Issue
ref #2560
その他