• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Implemented HTML5 <video> with <embed> fallback!

James

Well-known member
#1
I am sure the geo-location feature can be defined to how specific you want it to be... So if you set it to "Town Level" - "City Level" etc... still a nice idea... I would love to see HTML5 Video Tags being used for other video types like mpeg2 and OGG too.... Would be really cool...
I think this should be part of the [MEDIA] tag - HTML5 video element with an <embed> fallback for incompatible browsers.
 

Cezz

Well-known member
#3
I totally agree I suggested this somewhere else myself... I think it is a brilliant idea :D

HTML:
<video controls width="500">
    <source src="video.ogg" type="video/ogg" />
    <source src="video.mp4" type="video/mp4" />
    <embed src="flashmp4player.swf?video.mp4" type="application/x-shockwave-flash" width="1024" height="798" allowscriptaccess="always" allowfullscreen="true"></embed>
</video>
 

James

Well-known member
#4
I totally agree I suggested this somewhere else myself... I think it is a brilliant idea :D
I used your quote in the original post (give credit where credit is due) because your post was embedded inside 5-6 pages inside a general discussion :p
 

Kuma

Active member
#5
I think that using an inline iframe would be useful, thats how youtube does it now. If XF would borrow the concept of using an iframe and detecting the browser, the correct code would always be delivered.
 

Cezz

Well-known member
#6
I think that using an inline iframe would be useful, thats how youtube does it now. If XF would borrow the concept of using an iframe and detecting the browser, the correct code would always be delivered.
Why use an iframe? I am confused there is no need... If you use the <video> tag and the browser doesn't understand it it then reads the <embed> code instead, no browser detection required.
 

James

Well-known member
#7
Yeah. Anything in between the <video> and </video> tag is only rendered if the browser doesn't recognise the <video> tag - there's really nothing else required.

If it isn't included by default I will be creating custom BBCode for it!
 

Kuma

Active member
#8
Why use an iframe? I am confused there is no need... If you use the <video> tag and the browser doesn't understand it it then reads the <embed> code instead, no browser detection required.
What stops the browser from doing both? How do you make sure you send the right video format for the right browser since they all seem to have their own codec standard?
 

Forsaken

Well-known member
#9
HTML5 stops them from doing them both.


Any HTML5 ready browser will ignore the information between , and display only the information provided in the actual tag. Anything between the video/audio tags are there as a fallback measure (Or in case JS is turned off I think, I haven't read up on the spec much in a while).
 

Cezz

Well-known member
#10
What stops the browser from doing both? How do you make sure you send the right video format for the right browser since they all seem to have their own codec standard?
HTML5 stops them from doing them both. Any HTML5 ready browser will ignore the information between , and display only the information provided in the actual tag. Anything between the video/audio tags are there as a fallback measure (Or in case JS is turned off I think, I haven't read up on the spec much in a while).
What he said... The browsers are built this way... you can see from my markup example at


HTML:
<video controls width="500">
    <source src="video.ogg" type="video/ogg" />
    <source src="video.mp4" type="video/mp4" />
    <embed src="flashmp4player.swf?video.mp4" type="application/x-shockwave-flash" width="1024" height="798" allowscriptaccess="always" allowfullscreen="true"></embed>
</video>
It is VERY clean, and most browsers... mp4 and ogg will be understood by 90% of browsers... no need for special codecs/versions for each, that is the magic behind the <video> tag :D...
 

James

Well-known member
#11
I sure hope Kier and Mike implement this. It'd be the first forum software to be HTML5-ready (in some aspects)...
 

Cezz

Well-known member
#13
I sure hope Kier and Mike implement this. It'd be the first forum software to be HTML5-ready (in some aspects)...
Agreed it will really show xenForo as being forward thinking... Plus I love how customizable HTML5 video tag is... Look at SublimeVideo and what he has managed to do with that... It is really nice crisp HD video in the browser with no need for any plugins like flash... But then he has also created a flash version that looks identical and give the exsact same user experience for older browsers...

I am not saying xenForo should use sublimeVideo just using it as an example, of what greatness can be done with the <video> tag.
 

Forsaken

Well-known member
#14
I was going to mention WebM, but was to lazy.

I'm hoping Apple chooses to adopt it, rather then remaining hypocritical regarding 'open-web'.
 

Cezz

Well-known member
#15
I like this idea and with Ceri May code what about the webm format ;)
What are the benefits of WebM over OGG format??? It should work just the same, though you would have to create a flash player that can play WebM files on older browsers... There are already flash players for MP4 and OGG not sure about WebM though.
 

James

Well-known member
#16
Ceri's code wasn't for all alternate forms of media :p but yeah, it can be edited to include all forms of video.
 

Forsaken

Well-known member
#17
What are the benefits of WebM over OGG format??? It should work just the same, though you would have to create a flash player that can play WebM files on older browsers... There are already flash players for MP4 and OGG not sure about WebM though.
Duh, its done by Google! Therefore its superior!

No, the benefits will probably be in the compression and various other things that Google and others intend to do with it.
 

Cezz

Well-known member
#18
Duh, its done by Google! Therefore its superior!

No, the benefits will probably be in the compression and various other things that Google and others intend to do with it.
Hmmm I guess, I am still a really big fan of OGG format, but I WebM sounds cool...