https://www.icyphoenix.com/viewtopic.php?f=35&t=8630&p=56320#p56320
-----------------------------------
nothere
Thu 16 Aug, 2012 02:48

HTML5 Video
-----------------------------------
Hello all.

I would like to add HTML5 video or possibly replace(?) the existing video tag, parameters, etc. in the bbcode file. However, I've no idea where to start or even know if it's possible.

For example, using Firefox or Chrome, I know the code itself [i]can[/i] be very simple:

[code linenumbers=false]<video controls width="" height="">
<source src="path_to_video/some_video.ogv">
</video>[/code]
... and by disabling bbcode and html in the post it works. But that's not very practical since you lose your formatting and so on.

Looking at the bbcode.php I'm guessing I would need to define, say, html5video in the array, then in the tag and finally something in the content (parameters) section. And that's where I'm stuck. What would I place for the content?
Example:

[code linenumbers=false]
... array
'html5video' => array('nested' => true, 'inurl' => true, 'allow_empty' => false),
... tag
 || ($tag === 'html5video') 
... parameters
elseif ($tag === 'htmlvideo')
				{
					$html = parameters?
				}[/code]

Any suggestions would be greatly appreciated.

Thank you,

Dan :)


