Javascript Question: Getting Run Time of Flash Video?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sands
    Confirmed User
    • Feb 2007
    • 3134

    #1

    Javascript Question: Getting Run Time of Flash Video?

    Is there a way to get the run time of a Flash video using Javascript? Any help would be greatly appreciated. Thanks
  • Deej
    I make pixels work
    • Jun 2005
    • 24386

    #2
    are you trying to have the video time length next to it without it playing?

    like on tube sites and members areas?

    Deej's Designs n' What Not
    Hit me up for Design, CSS & Photo Retouching


    Icq#30096880

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55679

      #3
      dont think so but you could use the php-ffmpeg module

      <?
      $movie = new ffmpeg_movie('trailer.flv');
      $duration = $movie->getduration();
      ?>

      and echo accordingly
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      • Sands
        Confirmed User
        • Feb 2007
        • 3134

        #4
        Originally posted by Deej
        are you trying to have the video time length next to it without it playing?

        like on tube sites and members areas?
        This is more along the lines of a submission form. Select the video, the video length is read by Javascript, and is then added as a value in a form field.

        Originally posted by fris
        dont think so but you could use the php-ffmpeg module

        <?
        $movie = new ffmpeg_movie('trailer.flv');
        $duration = $movie->getduration();
        ?>

        and echo accordingly
        Thanks fris. I'll have to keep that in my pocket as plan B and add a little AJAX voodoo to it if it comes to that.

        Comment

        • GrouchyAdmin
          Now choke yourself!
          • Apr 2006
          • 12085

          #5
          Now that'd be an interesting feat. Your best bet is probably to just rebuild the player, and write your JS code to do the div container replacement with ExternalInterface.call("WhateverYourRoutineIs");

          Comment

          • Sands
            Confirmed User
            • Feb 2007
            • 3134

            #6
            Originally posted by GrouchyAdmin
            Now that'd be an interesting feat. Your best bet is probably to just rebuild the player, and write your JS code to do the div container replacement with ExternalInterface.call("WhateverYourRoutineIs");
            Heh, I may not be swimming in the web programming kiddie pool, but I've still got my noob floaties on. This is out of my depth. Looks like Plan B is in order. Thanks dude.

            Comment

            • GrouchyAdmin
              Now choke yourself!
              • Apr 2006
              • 12085

              #7
              Originally posted by Sands
              Heh, I may not be swimming in the web programming kiddie pool, but I've still got my noob floaties on. This is out of my depth. Looks like Plan B is in order. Thanks dude.
              In this case, you might make your 'submission' form use php-ffmpeg (as noted above); Just qualify the movie's content and autofill this data when it's submitted, before you do your mail() or whatever other notification you are planning to use. That'll keep people from just sending shit, but it won't help with bandwidth use/waste.

              Comment

              • Sands
                Confirmed User
                • Feb 2007
                • 3134

                #8
                Originally posted by GrouchyAdmin
                In this case, you might make your 'submission' form use php-ffmpeg (as noted above); Just qualify the movie's content and autofill this data when it's submitted, before you do your mail() or whatever other notification you are planning to use. That'll keep people from just sending shit, but it won't help with bandwidth use/waste.
                Word. I wanted to make it all razzle-dazzle by auto-filling it right into the field as the user tends to it, and the best way is, I guess to send an asynchronous request to a little script that'll kick back the run time using ffmpeg, and then jam that shizzle in.

                Comment

                Working...