1. 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!

Discussion in 'Closed Suggestions' started by James, Aug 5, 2010.

  1. James

    James Well-Known Member

    I think this should be part of the [MEDIA] tag - HTML5 video element with an <embed> fallback for incompatible browsers.
     
    LancerForHire and Ceri May like this.
  2. James

    James Well-Known Member

    No takers? :p

    I think it'd be a good way to get people in the HTML5 spirit myself!
     
  3. Cezz

    Cezz Well-Known Member

    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 likes this.
  4. James

    James Well-Known Member

    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
     
  5. Kuma

    Kuma Active Member

    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.
     
  6. Cezz

    Cezz Well-Known Member

    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.
     
  7. James

    James Well-Known Member

    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!
     
  8. Kuma

    Kuma Active Member

    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?
     
  9. Forsaken

    Forsaken Well-Known Member

    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).
     
  10. Cezz

    Cezz Well-Known Member

    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...
     
    DaKat likes this.
  11. James

    James Well-Known Member

    I sure hope Kier and Mike implement this. It'd be the first forum software to be HTML5-ready (in some aspects)...
     
  12. ChrisR

    ChrisR Active Member

    I like this idea and with Ceri May code what about the webm format ;)
     
  13. Cezz

    Cezz Well-Known Member

    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.
     
  14. Forsaken

    Forsaken Well-Known Member

    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'.
     
  15. Cezz

    Cezz Well-Known Member

    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.
     
  16. James

    James Well-Known Member

    Ceri's code wasn't for all alternate forms of media :p but yeah, it can be edited to include all forms of video.
     
  17. Forsaken

    Forsaken Well-Known Member

    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.
     
  18. Cezz

    Cezz Well-Known Member

    Hmmm I guess, I am still a really big fan of OGG format, but I WebM sounds cool...
     
  19. Forsaken

    Forsaken Well-Known Member

    http://www.webmproject.org/about/

    If you want to read about it.
     
  20. Cezz

    Cezz Well-Known Member

    From what I read it still uses Vorbis Audio Codec so that is cool, the it is sort of an MKV file for the Web... Ok I am really liking now...

    OGG and OGV is still great but I can see the benefits of WebM now... So Apple are not supporting it currently?
     

Share This Page