Embedding Video
If docu-notion notices that you have embed a video it should convert that to code useable in Docusaurus by using react-player.
docu-notion does the following when it detects a link to a video:
- Adds a
import ReactPlayer from "react-player";
to the markdown - Inserts html like
<ReactPlayer controls url="https://www.youtube.com/watch?v=5M3nJrlf3p0&t=70s" />
信息
If your site is not based on docu-notion-sample-site
, you may need to add ReactPlayer to your Docusaurus project:
yarn add react-player
or npm i react-player
警告
docu-notion can’t yet tell if the link points to video or not, so it currently just looks for patterns indicating youtube or vimeo.