Videos are not exported with <video> tag

luc_j_bourhis's Avatar

luc_j_bourhis

05 Dec, 2018 11:46 AM

The following Markdown

![Slicing with no tilt](slicing-tilt-0.mp4)

get exported as

<figure>
<img src="slicing-tilt-0.mp4" alt="Slicing with no tilt">
<figcaption>Slicing with no tilt</figcaption>
</figure>

whereas I would liked it to be exported with the HTML5 tag <video>

<figure>
<video autoplay muted>
<source src="slicing-tilt-0.mp4" type="video/mp4">
</video>
<figcaption>Slicing with no tilt</figcaption>
</figure>

Now, I realise that autoplay muted might not be what somebody else wants. Let the user choose in preferences?

  1. Support Staff 1 Posted by Brett on 05 Dec, 2018 06:59 PM

    Brett's Avatar

    Video tags aren't part of Markdown. The syntax you're using will always
    result in an img tag. The only way to get what you're looking for is to
    manually add the HTML (which would need to include the figure markup as
    that won't be automatically generated), or to use a custom processor
    that does a search and replace for image tags with video source urls.

    -Brett

  2. 2 Posted by nachiket on 07 Feb, 2019 12:31 AM

    nachiket's Avatar

    I tried to use the

  3. Support Staff 3 Posted by Brett on 07 Feb, 2019 03:22 PM

    Brett's Avatar

    No, they should play fine, assuming you're not running into a sandbox
    issue. Please let me know which version of Marked you're running (Mac
    App Store, Paddle, Setapp) and show me exactly what markup (the video
    tag(s)) you're using.

    -Brett

  4. 4 Posted by nachiket on 07 Feb, 2019 08:38 PM

    nachiket's Avatar

    Hi — sorry I just debugged this again and it seems to be playing now. However the window size is much larger than text width. If I rescale the Marked window, images scale perfectly fine but the video window remains stubbornly massive.

    I’m running Marked 2 installed via App Store on MacOS Mojave.

    Somewhat related — is there a Gitlab Flavored Markdown processor we can use instead of the Github Flavored Markdown processor (Discount)? Is it just a matter of configuring CSS files or is do I need to configure something else?

    Details of Gitlab’s markdown —> https://docs.gitlab.com/ee/user/markdown.html#videos

    They allow video embeds using the image embedding syntax and relying on the right extension to detect type.
    ![](video.mov)

    Nachiket

  5. Support Staff 5 Posted by Brett on 07 Feb, 2019 08:54 PM

    Brett's Avatar

    The size of the video player would depend entirely on the size of the video. You can constrain it using width and height tags in the tag, or add a line to the Extra CSS box in Style preferences like:

         video { max-width: 100%; }

    Or 50% or whatever works best in your layout.

    As far as custom processors, if there's a command line tool provided for a syntax, you can use it under advanced preferences. If not, it would have to be replicated using some relatively advanced scripting.

    - Brett

  6. 6 Posted by nachiket on 07 Feb, 2019 09:30 PM

    nachiket's Avatar

    No content.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac