Skip to content

Commit

Permalink
fix: timestamp must be fixed for youtube
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 9, 2023
1 parent 9e3b40e commit 5e33d11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Sentence.tsx
Expand Up @@ -22,8 +22,8 @@ export default function videoIdSentence({

const matchResult = extractSentence(sentence);
if (matchResult) {
// simplify the seconds with number, todo: 0.003 is not able
const seconds = matchResult[1].split(":")[0];
// simplify the seconds with number: 1:11 or 1.11 -> 7, todo: 0.003 is not able
const seconds = Number(matchResult[1].split(":")[0]).toFixed();
const { formattedContent, timestamp } = extractTimestamp(matchResult);

return (
Expand Down

1 comment on commit 5e33d11

@vercel
Copy link

@vercel vercel bot commented on 5e33d11 Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.