docfx icon indicating copy to clipboard operation
docfx copied to clipboard

[Bug] Video Markdown syntax not usable?

Open DevTKSS opened this issue 6 months ago • 9 comments

Describe the bug A clear and concise description of what the bug is.

Attempting to use the documentation shown Markdown for Video:

> [!Video https://youtu.be/someValidLink]

Dies not render as video like shown in the docs

Only using markdigExtensions medialinks does work for this but with its own syntax

To Reproduce Steps to reproduce the behavior:

  1. Use the syntax from above taken from the docs here and point to an YouTube video
  2. Build and serve

Expected behavior A clear and concise description of what you expected to happen.

Context (please complete the following information):

  • OS: Windows 11
  • Docfx version: 2.78.3+850a61c2ecb83b0bda21448f1393e480934556fd

Additional context Add any other context about the problem here.

Will add link to my Repo branch if needed but there I did already switch to medialinks to make it work properly.

DevTKSS avatar Jul 07 '25 08:07 DevTKSS

It seems video link is works as expected on docfx official docs site

> [!Video https://youtu.be/someValidLink]

Is this link using embed link URL? https://github.com/dotnet/docfx/issues/2122

filzrev avatar Jul 07 '25 08:07 filzrev

@filzrev 🤔 no there is no embed in the link. This here is the same link text just packed into the medialink format now:

![How To: Einrichten unserer Uno Platform Entwicklungsumgebung](https://youtu.be/oI6IZVOeQBI)

So in docfx's own format:

> [Video https://youtu.be/oI6IZVOeQBI]

or these links here you can also try (all showing up correctly with medialink format, but not one in docfx syntax):

![MvuxGallery Showcase](https://youtu.be/vVvnK02r2ug) ![Navigation-in-Xaml-und-Mvux-mit-Navigation-View](https://youtu.be/knt2oOjHH30) ![How To: Konfigurieren unserer Uno App Visual Studio Wizard](https://youtu.be/UGKidrvdKpQ)

DevTKSS avatar Jul 07 '25 11:07 DevTKSS

It seems works as expected when using youtube.com instead of youtu.be, And replace URL to use embed link.

> [!Video https://www.youtube.com/embed/oI6IZVOeQBI]

filzrev avatar Jul 07 '25 11:07 filzrev

@filzrev oh okay, so I did not know that this link I got from youtube is implied to be invalid for the syntax of docfx. Could you consider adding this detail into the docs, so we would be able to check on this without getting this problem?

DevTKSS avatar Jul 07 '25 11:07 DevTKSS

@filzrev thanks, did work. could this get somehow more highlighted in the docs?

DevTKSS avatar Jul 08 '25 18:07 DevTKSS

Hi, asking here as I only see this open ticket related to videos. Anyone else having problems with the [VIDEO] at the moment? We published an updated version of our docs this week, and all the videos have stopped working (we get a 153 error):

Image

We are using the embed links, and they were working perfectly until now (we are unsure whether the problem is related to the latest update of DocFX or YouTube).

salgiza avatar Oct 30 '25 10:10 salgiza

@salgiza

As far as I've confirmed, Video link is works as expected on latest docfx version (https://dotnet.github.io/docfx/docs/markdown.html?tabs=linux%2Cdotnet#video)

Is it able to view above embedded youtube link? It seems Error 153 problem is caused by recent youtube side changes.

filzrev avatar Oct 30 '25 12:10 filzrev

@filzrev do you see any chance, that the > [!Video https://youtu.be/someValidLink] non /embed/ format could be implemented for the regular docfx video Markdown option?

DevTKSS avatar Nov 13 '25 14:11 DevTKSS

Sorry to change the subject, but @DevTKSS comment made me remember I hadn't written a follow up to my question above.

If anyone has the same problem as we did, it was due to the Referrer-Policy header causing problems. We set it to Referrer-Policy: "strict-origin-when-cross-origin", and everything worked as expected.

salgiza avatar Nov 13 '25 14:11 salgiza