So how do you embed a MP4 Video?

Kane Hart

Active member
I assume it would be built in since I think every single browser plays it within the browser now just fine. Is that HTML 5? Anyways how does one post a MP4 Video link directly from its source?
 
For media hosted elsewhere, create a BB Code Media Site for it.

If you want to host it on your own server it will require custom development.
 
I was just talking with the developer of s9e Media BBCodes pack for this functionality. Embedding MP4 and WebM videos using the HTML5 player in the browser. He said to post a thread in the support forum and tag him so doing it here rather than creating another thread.

@JoshyPHP

I have tried creating a bbcode for it but failed. Hence looking for advice. Details:

WebM is not working...
Code:
Match URLs: ((?'id'.*\.webm))
Embed HTML:
<video width="640" height="480" controls>
  <source src="{$id}" type="video/webm">
</video>

Code is being rendered as:
Code:
<video width="640" height="480" controls>
  <source src="http%3A%2F%2Fvideo.webmfiles.org%2Felephants-dream.webm" type="video/webm">
</video>

Since the URL is not rendering properly, the embed fails.
 
Yeah I was trying to also get webm myself working the other day. I guess I need to learn the right bb code media site stuff. I host the media on the same site as the forums of course but still you clearly need the right html code / bb info to add entries for mp4 and webm... Odd though why they not part of the default xenforo now?
 
I guess the popular way of posting videos on the web remains uploading them to YouTube or Vimeo. That ways browser and device compatibility is taken care of. WebM videos would not play on Firefox, IE, Safari for example. But I would still love to get this particular code working as I have a lot of posts containing raw MP4 and WebM links which are supposed to be rendered.
 
I was experimenting with this too. Does anyone know the option regular expression match option so folks can just enter the URL when inserting an mp4 as media? Besides that, I too couldn't get the url to parse correctly. So same boat..
 
Last edited:
Top Bottom