asjqkkkk / markdown_widget

📖Rendering markdown by flutter!Welcome for pr and issue.
MIT License
331 stars 95 forks source link

How to custom Video tag like this #185

Open zhouzhuo810 opened 3 months ago

zhouzhuo810 commented 3 months ago

my video tag format is:

<video width="320" height="240" controls>
  <source src="xxx/movie.mp4" type="video/mp4">
</video>

This code does not work: https://github.com/asjqkkkk/markdown_widget/blob/dev/example/lib/markdown_custom/video.dart

please tell me how to get src of source,thank you~

zhouzhuo810 commented 3 months ago

@asjqkkkk help

asjqkkkk commented 3 months ago

Hi @zhouzhuo810 , you need change the html like this:

<video width="320" height="240" src="xxx/movie.mp4">

then you can get the src.

Or you need custom your own html parser with : https://github.com/asjqkkkk/markdown_widget/blob/dev/example/lib/markdown_custom/html_support.dart