PDA

View Full Version : FMS: MP3 duration and scrubber


fuzzylogic
08-30-2007, 08:09 AM
I am playing a mp3 file from FMS. I need to check the duration, and also I need a scrubber so that user can drag the scrubber and jump to any part of audio quickly.

Ideas, codes or examples much appreciated! :D

Thanks,
Fuzzy

This is the link to my original post http://www.actionscript.org/forums/showthread.php3?t=145834

Paul Ferrie
08-30-2007, 09:39 AM
Check out the video tutorials
http://www.gotoandlearn.com/download.php

fuzzylogic
08-30-2007, 10:41 AM
Check out the video tutorials
http://www.gotoandlearn.com/download.php

Thanks, Paul. Are you sure it explains the mp3 controls which is streamed through FMS? I guess it's the progressive one.

Cheers,
Fuzzy

Paul Ferrie
08-30-2007, 10:49 AM
I am pretty sure it says in one of the videos that this can be either mp3 of video.

If you get stuck i have an fla here that will do what you need.

fuzzylogic
08-30-2007, 10:56 AM
Could you please zip and attach it for me? I just need to know how it's done?

Thanks,
Fuzzy

Paul Ferrie
08-30-2007, 11:13 AM
Actually i would rather you took the time to view the videos building yor own player. All your doing once the player has been built is to change the nc from "null" to your fms destination.

fuzzylogic
08-30-2007, 11:44 AM
Paul,

The flv's are working fine for me because I am using metadata function to call the duration and other stuffs. The problem is that this function doesn't exist for loading MP3s. So we may have to write an .asc script to check the duration of mp3.

I am following this code which is in my server:
Client.prototype.getLength = function(streamName){
return Stream.length(streamName);
}
...taken from this (http://www.communitymx.com/content/article.cfm?cid=EDE10) site: "Streaming MP3s with Flash Communication Server".

Now the problem is that I need a scrubber which will seek new positions when dragged and released. I want to know how it's done when you are calling mp3 through FMS. I am sure there must be a way to do it.

Paul Ferrie
08-30-2007, 12:22 PM
Is the stream length being returned to the player?

fuzzylogic
08-30-2007, 12:50 PM
No, the length is not returning but the Stream.time is working fine.

fuzzylogic
08-31-2007, 07:03 AM
Ok, I am getting the length of the MP3 but there is a time glitch when compared to the stream running and the duartion. They don't match when I played the stream till the end! The time displayed is lesser than the total duartion. Any idea? Is it a bug?

miowpro
11-02-2007, 02:16 AM
Hi all

I am also trying to do this.

I think the pos time not matching the total duartion must be something to do with FMS as im getting that with my video also

http://www.homemusicradio.co.uk/video/237