MG 2.1 Show media videos on XF pages

Andy.N

Well-known member
I have a few videos that I want to show on a XF page. What are the steps to do so?
I uploaded them and then tried to use something like [text]View media item 97[/text] but it does not work.
Is there anyway to do this besides uploading them to Youtube and embed it on XF page?
 
You would need to get the URL of the video file itself. We don't expose that directly, but in most browsers you should be able to right click on the video and click "Copy Video Address":

1567383013884.webp

That will give you a URL that looks like:
Code:
https://xenforo.com/community/data/xfmg/video/198/198377-b196be7cb108a7875d4ac3e8cbcad6a2.mp4

In your XF page, you would then simply use HTML to display the video:
HTML:
<video controls="" data-xf-init="video-init">
    <source src="https://xenforo.com/community/data/xfmg/video/198/198377-b196be7cb108a7875d4ac3e8cbcad6a2.mp4">
</video>
And that should do it.
 
You would need to get the URL of the video file itself. We don't expose that directly, but in most browsers you should be able to right click on the video and click "Copy Video Address":

View attachment 209577

That will give you a URL that looks like:
Code:
https://xenforo.com/community/data/xfmg/video/198/198377-b196be7cb108a7875d4ac3e8cbcad6a2.mp4

In your XF page, you would then simply use HTML to display the video:
HTML:
<video controls="" data-xf-init="video-init">
    <source src="https://xenforo.com/community/data/xfmg/video/198/198377-b196be7cb108a7875d4ac3e8cbcad6a2.mp4">
</video>
And that should do it.
Awesome. Got it to work.
What are my control option over the size of this video window, etc.
I like to put a few of them side by side.
 
Top Bottom