GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Javascript Question: Getting Run Time of Flash Video? (https://gfy.com/showthread.php?t=842658)

Sands 07-20-2008 05:15 PM

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 :thumbsup

Deej 07-20-2008 05:22 PM

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

like on tube sites and members areas?

fris 07-20-2008 05:31 PM

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

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

and echo accordingly

Sands 07-20-2008 05:33 PM

Quote:

Originally Posted by Deej (Post 14483544)
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.

Quote:

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.

GrouchyAdmin 07-20-2008 05:34 PM

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");

Sands 07-20-2008 05:38 PM

Quote:

Originally Posted by GrouchyAdmin (Post 14483569)
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.

GrouchyAdmin 07-20-2008 05:42 PM

Quote:

Originally Posted by Sands (Post 14483575)
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.

Sands 07-20-2008 05:46 PM

Quote:

Originally Posted by GrouchyAdmin (Post 14483583)
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.


All times are GMT -7. The time now is 03:38 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123