How to enable video from /.attachments/?

493 Views Asked by At

I'm gonna enable a video on Azure Wiki page. This video is not public, so I have attached it to Azure Wiki page like a image and the file was uploaded to /.attachments/ folder. Is it possible to use it during creating a vide section?

I have tried the following options but it now working as expected - it looks, the source was not recognized (Unable to play video)

::: video
/.attachments/2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4
:::
<video src="/.attachments/2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4" width=400 controls></video>
2

There are 2 best solutions below

0
ScottWelker On

You can treat the video as any other Wiki attachment like this:

  • [2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4](/.attachments/2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4)

However, it's conceivable you may loose some of the intended video functionality when you treat it as an attachment.

0
hub On

You can add the video HTML block link following your wiki structure as follow

 <video src="https://dev.azure.com/{tenant}/{projectId}/_apis/git/repositories/{repoId}/Items?path=/.attachments/2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4)" width=1000 controls>
</video>

In order to get the full link with the different {tenant}/{projectId}/_apis/git/repositories/{repoId}, just click on the link of your attachement and copy it removing everything after the "[fullURLlink].mp4/"