Home | Forums | Articles | F@H
Help | Search | Members | Calendar | Forum Map | Cybervillage | Archive
Welcome Guest ( Log In | Register | Resend Validation Email )


>  IceTeks Forums -> Technology made cool -> Programming


  Archived - No replies allowed - start new thread insteadStart new topicStart Poll

>  are there any audio handling functions in php?
Track this topic | Email this topic | Print this topic
Master of Puppets
Posted: Apr 5 2004, 10:20 PM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 15
Member No.: 313
Joined: 24-February 04
Ice Cubes: 0



Me and a friend are starting on this online media player/library kinda thing, and i've got the idea in my head how i'm gonna do it, but it would require too much reloading of the media player page(too much being any at all).

Does anyone know a library of audio handling functions or something of the sort? or maybe know if there are already some functions that could help me. I need to find the length of the song, and hopefully there are already functions for play and stop, because thats where i would have to reload. I have no clue how i'm gonna implement the rewinding or fastfowarding though. I wouldnt know if this is a stupid question, but i'm jus starting to get into php, so sorry if so. All comments appreciated(except negative or otherwise not helpful). Thanks in advance.
PMEmail PosterUsers Website Top
Chris Vogel
Posted: Apr 5 2004, 10:29 PM
Quote Post

Voyageur

Group Icon

Group: Ice Age Members
Posts: 3 346
Member No.: 78
Joined: 10-January 03
Ice Cubes: 1144



Playback and stop? Thinking about how PHP works, I don't see how that's possible. I don't think there are any audio functions. You can check for yourself, but I doubt you will find anything.

To do what you want, I think the best thing to do would be to make use of a media player plug-in. This means that users would have to have that plug-in to utilise your site like you intended, but it seems to be the only way...
PMEmail PosterUsers Website Top
Red Squirrel
Posted: Apr 5 2004, 10:33 PM
Quote Post

ZOMG!

Group Icon

Group: Admins
Posts: 13 964
Member No.: 1
Joined: 18-December 02
Ice Cubes: 163183



Yeah php is more of a one time run scripting language and not interactive. Youwould need a plug in or maybe something made with flash, for better compatibility.


--------------------
user posted image
http://www.redsquirrel.me my blog
http://www.uovalor.com AoS/ML Ultima Online Shard
PMEmail PosterUsers Website Top
Chris Vogel
Posted: Apr 5 2004, 10:37 PM
Quote Post

Voyageur

Group Icon

Group: Ice Age Members
Posts: 3 346
Member No.: 78
Joined: 10-January 03
Ice Cubes: 1144



QUOTE (Red Squirrel @ Apr 5 2004, 09:33 PM)
Yeah php is more of a one time run scripting language and not interactive. Youwould need a plug in or maybe something made with flash, for better compatibility.

FLASH! I forgot all about that. It's a very common plug-in, and it's probably the safest to use. smile.gif
PMEmail PosterUsers Website Top
Master of Puppets
Posted: Apr 7 2004, 09:59 PM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 15
Member No.: 313
Joined: 24-February 04
Ice Cubes: 0



i think i was a little unclear in what i said the first time.

i didnt mean i was gonna use a function php already has; i was pretty sure that was non-existant. By using the <embed> and <bgsound> tag, i'm going to make users able to play files from their computer by
<embed src=file://$song>. I can do this on mine, for i already know the path to all my files, but i need to be able to find the path of files that are inputted into an add song form. Again, due to my 'quest' into php starting just recently, i'm not for sure how to do this yet. I know when you put <input type=file>, a browse button is there so the user can browse his/her/its computer for files, but i dont wanna upload the file, i just want a string that is the path to it, so when a file is clicked in the music library, it opens a pop-under window that has <embed src=file://$song autorun=true hidden=true> on it, so it will play the file. The reloading i spoke of in the previous post would be playing of new songs or stopping, which would be
fopen('play.php','w') and then a window.location='play.php'; so as to make the file empty, stopping the playback, or starting playback of a different song. Can someone help me with the filepath thing? I need the browse button there, but i dont need the file.

That was a whole lot of stuff, so i hope it wasnt too confusing to read. Help is appreciated.
Also, i wanna do this in JavaScript in PHP, so a plug-in isn't required, no matter how common. Thanks anyway

This post has been edited by Master of Puppets on Apr 7 2004, 10:00 PM
PMEmail PosterUsers Website Top
Red Squirrel
Posted: Apr 7 2004, 10:07 PM
Quote Post

ZOMG!

Group Icon

Group: Admins
Posts: 13 964
Member No.: 1
Joined: 18-December 02
Ice Cubes: 163183



You need to put the file on your webspace, or you can use one of the standard windows sounds and link to the windows folder, but even then, sometimes it's windows sometimes it's winnt. Also, those functions don't work in standard browsers. Not sure why they don't standardlize that though, but just to let you know it will only work in IE, unless there's something I do wrong when I try it. unsure.gif


--------------------
user posted image
http://www.redsquirrel.me my blog
http://www.uovalor.com AoS/ML Ultima Online Shard
PMEmail PosterUsers Website Top
Master of Puppets
Posted: Apr 7 2004, 10:20 PM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 15
Member No.: 313
Joined: 24-February 04
Ice Cubes: 0



the purpose of this is for multiple users to be able to login and have their music libraries and playlists loaded if existent, and to be able to add to them. There will be the index, and then it will interpret the playlist and music library files so the file://yada-yada-yada is on that person's machine. it could take up a lot of space, but i doubt many people will sign up with it, at least not at first. the text file that it would interpret/get info from(i havent decided yet) would have a list of info including file://yada so that the file it would be refering to is on that particular persons cp. when me and my friend get it up, i think it'll be pretty cool.

what browser do you use? i'm using mozilla firefox on suse, and it works. if you're also using firefox, try MozPlugger.
PMEmail PosterUsers Website Top
Red Squirrel
Posted: Apr 12 2004, 08:56 PM
Quote Post

ZOMG!

Group Icon

Group: Admins
Posts: 13 964
Member No.: 1
Joined: 18-December 02
Ice Cubes: 163183



For this you could simply use php with a mysql database with links to the files maybe. Basically the same idea as listing the topics of a forum, but for music.


--------------------
user posted image
http://www.redsquirrel.me my blog
http://www.uovalor.com AoS/ML Ultima Online Shard
PMEmail PosterUsers Website Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Programming | Next Newest »

Topic Options Archived - No replies allowed - start new thread insteadStart new topicStart Poll

 



[ Script Execution time: 0.0377 ]   [ 13 queries used ]   [ GZIP Enabled ]

< Home | Forums | Contact >