From 6093ef131a742281c5c209991a0f128584ed3d96 Mon Sep 17 00:00:00 2001
From: DrMint <29893320+DrMint@users.noreply.github.com>
Date: Mon, 22 May 2023 20:07:45 +0200
Subject: [PATCH] Added videos in Markdawn
---
src/components/Markdown/Markdawn.tsx | 12 ++++++++++++
src/components/Player.tsx | 14 +++++++++++---
src/pages/dev/editor.tsx | 21 +++++++++++++++++++++
3 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx
index db81f3f..43dba8e 100644
--- a/src/components/Markdown/Markdawn.tsx
+++ b/src/components/Markdown/Markdawn.tsx
@@ -17,6 +17,8 @@ import { atoms } from "contexts/atoms";
import { useAtomGetter } from "helpers/atoms";
import { Link } from "components/Inputs/Link";
import { useFormat } from "hooks/useFormat";
+import { VideoPlayer } from "components/Player";
+import { getVideoFile } from "helpers/videos";
/*
* ╭─────────────╮
@@ -144,6 +146,16 @@ export const Markdawn = ({ className, text: rawText }: MarkdawnProps): JSX.Eleme
},
},
+ Video: {
+ component: (comProps) => (
+
{title}
+{title}
)}+
{prettyDuration(currentTime)}
/
} -+
{prettyDuration(duration)}