flash music player?

The hub of Aura activity, the cortex that binds the forum together.
Post Reply
User avatar
kaos
Noble Warrior
Posts: 4089
Joined: Mon Jun 14, 2004 3:09 pm
Location: Atlanta, Ga

Post by kaos » Tue Feb 13, 2007 9:27 pm

anybody know where i can get a free flash player to go on a webpage, that'll play mp3's without having me go thru some crazy process?

id like to just point it to the directory that the music is in and but done with it.
EchoPark
Vagabond
Posts: 1832
Joined: Tue Jun 15, 2004 11:30 am
Location: Scotland
Contact:

Post by EchoPark » Wed Feb 14, 2007 12:58 am

I know chewi is building one but it will probaly be crap XD,

kidding but yea i dont think he is building it as such but moding it out for a site he is doing. Maybe he will know a good one, i use to know one but fuck that i know now. Stupid brain
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Wed Feb 14, 2007 11:03 am

Yep I've been seriously hacking one. It may sound silly but I can't actually think of a straightforward way to point something at a directory like that. You sometimes see directory listings while browsing but they are pages generated by the server, there's no standard format to them. With the player I'm messing with, you can either point it to a single MP3 or you can point it to an XML file listing each of the files. The syntax for the XML isn't hard.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
  <trackList>
    <track>
      <location>http://www.foobar.com/song1.mp3</location>
      <creator>Chewi</creator>
      <title>Darkened Soul</title>
      <image>http://www.foorbar.com/song1.jpg</image>
    </track>
    <track>
      <location>http://www.foobar.com/song2.mp3</location>
      <creator>Kaos</creator>
      <title>Foolz Gold</title>
      <image>http://www.foobar.com/song2.jpg</image>
    </track>
  </trackList>
</playlist>
The image files are optional. You can also link to a page for each track but that's optional too. The player comes from http://musicplayer.sourceforge.net but I've practically rewritten half of it. My changes have been sent to the author but he hasn't had time to put out a new release yet. If you want a copy of my version then let me know.
Last edited by Chewi on Wed Feb 14, 2007 11:04 am, edited 1 time in total.
User avatar
kaos
Noble Warrior
Posts: 4089
Joined: Mon Jun 14, 2004 3:09 pm
Location: Atlanta, Ga

Post by kaos » Wed Feb 14, 2007 3:19 pm

Picachewi, I choose you!

(besides, I if run into a problem I know who to bother about it)
Last edited by kaos on Wed Feb 14, 2007 3:21 pm, edited 1 time in total.
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Thu Feb 22, 2007 10:22 pm

Okay sorry this took so long. I've been busy and was still hacking at it.

Here's my demo page. The tracks might break up because the upload bandwidth isn't great. View the source to see how to do the HTML.
http://www.aura-online.co.uk/~chewi/mp3/index.html

Here's the SWF file. There's also a slim version.
http://www.aura-online.co.uk/~chewi/mp3/xspf_player.swf
http://www.aura-online.co.uk/~chewi/mp3/xspf_player_slim.swf

And here's the playlist file I used for the demo.
http://www.aura-online.co.uk/~chewi/mp3/chewi.xspf

If you're wondering about the HTML missing the embed tag that you find in most HTML used for Flash, it actually isn't required. object is the standard tag but Internet Explorer fucked with it to the point where other browsers weren't actually able to make proper sense of it. The embed tag is usually provided for those other browsers. For some content though, you can get away with just using object. It works for Flash as long as you don't mind IE downloading the whole SWF before playing it. In this case, the player is only 60KB and it won't work until it's finished downloading anyway.

While I'm on the subject, you may find this hard to believe but apparently the img tag will not form part of XHTML 2.0. object should be used for images instead.
Last edited by Chewi on Thu Feb 22, 2007 10:34 pm, edited 1 time in total.
User avatar
Mik
Born under a bad sign
Posts: 3394
Joined: Mon Jun 14, 2004 8:44 am
Location: Beyond your borders
Contact:

Post by Mik » Fri Feb 23, 2007 12:12 pm

track 2 ftw
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Fri Feb 23, 2007 1:06 pm

:D
User avatar
kaos
Noble Warrior
Posts: 4089
Joined: Mon Jun 14, 2004 3:09 pm
Location: Atlanta, Ga

Post by kaos » Sat Feb 24, 2007 8:02 pm

Sweet deal.
it was so easy to setup.

Just one question tho.

is their a way to make it auto play the first song without the visitor having to hit play?

if not, thats cool, dont worry about it, they shouldnt be so lazy anway.
but if so...
User avatar
kaos
Noble Warrior
Posts: 4089
Joined: Mon Jun 14, 2004 3:09 pm
Location: Atlanta, Ga

Post by kaos » Sat Feb 24, 2007 9:06 pm

just ran into a problem,
but Its probably not to do with the player.

I need deny people direct access to the music directory

but when I drop a "deny from all" in the htaccess thing, the player wont grab the music. it'll just sort of hang.

I'm guessomg the real issue is that I probably need to use somthing else in the ataccess bit. but im amature at this. so I dunno what that is.
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Sat Feb 24, 2007 9:46 pm

Deny from all will stop all downloads, including through the player. Preventing people from "saving" content played through Flash players and the like is a total myth and it really pisses me off when companies claim to offer that kind of protection. Even my experienced sysadmin friend believed it was possible and gave YouTube as an example. Two minutes later, I had a YouTube video saved to my home directory and playing through my regular media player.

If all you want to do is prevent people getting a directory listing of the music directory, you can either pop a blank index.html file in there or you can add "Options -Indexes" to your htaccess file.

To autoplay, just add &autoplay=1 after autoload=1. Easy huh?
Last edited by Chewi on Sun Feb 25, 2007 1:43 pm, edited 1 time in total.
User avatar
kaos
Noble Warrior
Posts: 4089
Joined: Mon Jun 14, 2004 3:09 pm
Location: Atlanta, Ga

Post by kaos » Sat Feb 24, 2007 11:15 pm

easy
EchoPark
Vagabond
Posts: 1832
Joined: Tue Jun 15, 2004 11:30 am
Location: Scotland
Contact:

Post by EchoPark » Sun Feb 25, 2007 12:57 am

I've been doing the whole ripping vids of utube and google vid for ages. I like the idea of doing it so i dont hvae to go back to a website to see my fav vids.
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Sun Feb 25, 2007 1:44 pm

Oops I said "Options -Index" above but I should have said "Options -Indexes". Corrected now. My Apache is a bit rusty.
Last edited by Chewi on Sun Feb 25, 2007 1:44 pm, edited 1 time in total.
User avatar
Bogey
Not-A-Deserter
Posts: 1147
Joined: Wed Jun 16, 2004 11:30 pm

Post by Bogey » Sun Feb 25, 2007 3:17 pm

you have a helicopter? I'd keep it in better condition if I were you.
Last edited by Bogey on Sun Feb 25, 2007 3:17 pm, edited 1 time in total.
Post Reply