SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question jQuery Video Tag Support Detection?

    I'm working on adding some code to a section of a client's site which plays a video and then uses jQuery to fade the video out and fade a dynamic slideshow in. I think I can do this by using the jQuery support for video events, but that won't work for older browsers which are displaying the video using flowplayer. Is there a way for me to use jQuery to detect whether a browser supports the video tag conditionally so that I can fall back on a delay before the fade out for older browsers?

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found a solution for this problem in case people come upon this later. You can detect whether the new html5 video events exist to tell whether the browser knows what the video tag is supposed to do like this:

    Code:
    if($('video#my-video').attr('ended') != undefined) {
    //do something with video tag events
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •