React-markdown: [feature request] Audio / video html tag rendering with native markdown

Created on 20 Sep 2019  路  13Comments  路  Source: remarkjs/react-markdown

E.g. even ![](asd.wav) / ![](asd.mp3) -> <audio src="asd.wav" /> would be super-useful.

馃憖 areexternal 馃檵 typquestion

All 13 comments

It doesn't belong to the "native" markdown.
I'm going to work on something related to it this month (but not on video tag). :+1:

Well, as I search about it, Markdown has a native way to show a thumb to your video link:

[![The Waffle Ninja](https://img.youtube.com/vi/StTqXEQ2l-Y/0.jpg "This is my Youtube video")](https://www.youtube.com/watch?v=aeiou)

It will generate the preview:

The Waffle Ninja

So, no need to do anything in the code!

You can read more here:

I'm actually more concerned about embedding HTML5-audio player that can work on the page without having to navigate away to youtube.

@francisrod01 It is good for common providers, but what if we want to render the video inside of content? For instance, using _React Player_, we can get, as @vadimkantorov, video from the _markdown_ and rendering it with custom components.
Is there any way to get a video from its file extension as Gitlab does?

Gastby already has a plugin for it.

I see. You're right!!
I look forward to see that here but I'll think in something related to it also.
Until now here some references to it:

How is this going on guys?

It doesn't belong to the "native" markdown.

Correct, this is not native markdown,
however it can be supported through a remark plugin.
You can find more information on creating plugins see https://unifiedjs.com/learn/

@ChristianMurphy retext or remark plugin?

a remark plugin.


retext is another unified project, specifically for NLP applications.
Both remark and retext (as well as rehype and redot) build off unist, but are designed for different languages/goals.

Is anyone working on this?

working on what?

@wooorm a plugin for videos.

You can search online, such as here on GitHub, or on npm, for remark + video and it seems there are some plugins yeah. But I haven鈥檛 tried them.

I think it鈥檚 a bad idea to add a custom syntax for things to markdown though. It means it won鈥檛 render as such here on GitHub, or on any other platform. My suggestions is: use an image, with a link.

Was this page helpful?
0 / 5 - 0 ratings