LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-10-2006, 06:19 PM   #1
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Rep: Reputation: 31
Question Javascript Song


I'm writing a script that controls embeded audio on a webpage...a playlist is provided...is there a way that I could display the name of the currently playing track? Really, all I need is something to happen when each song is over...like an event at the end of the song or something...any ideas?

Thanks,

Scott K Logan
logans@cottsay.net
 
Old 03-23-2006, 12:48 PM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Presumably you are you using some command to play each song, & presumably you are/can execute anew for each title. If you aren't using a loop already, would something like this work:

Code:
# pseudo code
for SONG in $PLAYLIST
do
   echo "Playing $SONG"
   _play_song $SONG
done
The above is bash-ish, but surely there is a loop structure in whatever you are using.
 
Old 03-23-2006, 02:45 PM   #3
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
Yea I know what you mean - its just that there's now way of senseing when a song is through in javascript...is there?
 
Old 03-24-2006, 10:01 PM   #4
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
Hey man.

I didn't know that javascript can play songs (executables). (Just by having file:// url on a local drive?).

It should be possible to set the settings in the song playing executable to close on exit instead of rewinding and restarting.

Also, since it is browser based (javascript!?!?!) you could always open it in the same window and will this help?

End
 
Old 03-25-2006, 12:24 AM   #5
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
I use the <embed> tag to get the music, but I know javascript can control the playback (play/pause) - I also know that you can embed a playlist file...now if I can just make something display what the current track is...

Thanks,

Scott
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
finnish song translation aizkorri General 1 11-27-2005 10:55 AM
Slow Down a Song RySk8er30 Linux - Software 8 05-25-2005 08:19 PM
Help with a song -> The_Nerd General 2 10-21-2004 01:30 AM
Song Naming Boffy Linux - Software 4 09-28-2004 03:18 PM
Name the song JesseJames General 46 03-16-2003 06:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration