dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Passing the supported video extension to a MYSQL query

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Passing the supported video extension to a MYSQL query

    Using Modernizr to pick the video type(s) I want to pass the supported file extension to the MYSQL query.

    The following code decides which types will run

    <script type="text/javascript">
    $(document).ready(function()
    {
    if (Modernizr.video)
    {
    if (Modernizr.video.ogg) {
    // $("#result").html('Your browser has support for ogg ');
    }
    if (Modernizr.video.webm) {
    // $("#result2").html('Your browser has support for webm ');
    }
    if (Modernizr.video.h264){
    // $("#result3").html('Your browser has support for h264');
    }
    }
    else
    {
    // $("#result3").html('Your browser does not support video');
    }
    });
    </script>

    But how do I pass the correct extension ($ext) to the query?
    $kazvideo1 = p4::find_kazand_by_cgs($id,$ext);

    Thank you

  2. #2
    Join Date
    Jan 2011
    Location
    United Kingdom, London
    Posts
    117
    You have to understand that Javascript is executed on Client Side when mysql query is executed on Server side. The only solution now is to use AJAX and pass correct type as GET or POST value to your server side script that will return whatever you need i.e. list of available videos

  3. #3
    Join Date
    Jan 2013
    Posts
    2
    Thank you for your help. I understand now and I have it working.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles