Page 1 of 2

It's Song Fight, Playa!

Posted: Wed Jan 18, 2012 3:16 pm
by JonPorobil
I notice an embedded player showing up on some pages of the "Listen to My New Song" thread, and any thread to which Caravan Ray has posted...

The feature appears to be a possible game-changer. If I'm interpreting it correctly, it scrapes the entire page for links to mp3 files and creates a playlist out of them. This is awesome, because now all you need to do is paste all the links to the songs from a given fight into its review thread, and everyone will be able to easily listen and stream from the forums. AMAZING.

However... the fact that it's showing up wherever C-Ray (who has a link to an mp3 in his signature) has posted is indicative of an early bug: susceptibility to stray links. To whomever is working on this right now: can an exception be set against links inside people's signatures?

Re: It's Song Fight, Playa!

Posted: Wed Jan 18, 2012 3:21 pm
by fluffy
It's being done by the Yahoo Media Player, which only provides an opt-in mechanism (rather than an opt-out mechanism). Unfortunately that opt-in mechanism would also be very difficult to implement in phpBB. Basically you have to change phpBB to add

Code: Select all

class="htrack"
to every MP3 link that's in the message body but not in signatures.

Of course, if you change the link to be a tinyurl or t.co or whatever, the player won't pick it up as being a media file so it'll work like the old-fashioned way.

Re: It's Song Fight, Playa!

Posted: Wed Jan 18, 2012 3:34 pm
by Manhattan Glutton
Options:
1. Do nothing.
2. Automatically remove MP3 links from signatures.
3. Add a class="sigtrack" to signature links, then run code to add class="htrack" to all MP3 links except those with "sigtrack"
4. Get knee-deep in PHPBB code and hate your life doing things the "correct" way.

Re: It's Song Fight, Playa!

Posted: Wed Jan 18, 2012 3:40 pm
by fluffy
I guess I could try hacking something up as a Javascript function that fires off before the Yahoo Media Player loader though. Of course phpBB takes a shit all over the DOM too. I guess you have to look for all 'a class="postbody"' that are inside 'div class="content"' and change the class to htrack if the URL ends in .mp3 or something. (phpBB already adds the 'postbody' class to all links that are in the body of the post, and that includes the signature for some strange reason. I suspect they're driving their CSS decisions that way instead of using nested selectors, because hey, phpBB people don't have to actually know how things work to crap their bullshit code out, right?)

Re: It's Song Fight, Playa!

Posted: Wed Jan 18, 2012 4:26 pm
by JonPorobil
Okay, I know nothing about PHPBB except for what I've gleaned from hearing Spud, JB, and fluffy kvetch about it, so I didn't want to presume any given task to be easier than it actually is.

It's a really cool feature, and when paired with JB's new Review-O-Matic, it's an especially powerful tool that removes a lot of the hassle from listening to and reviewing fights (arguably the central defining action of this community). If the flip side of that is that a fart noise sneaks into the playlist anytime Caravan Ray has made a post, then so be it.

Re: It's Song Fight, Playa!

Posted: Wed Jan 18, 2012 10:29 pm
by jb
Options:

1. Ask Tex to modify the link to his fart to give it a class of "no play".
class: noplay

The "noplay" class lets you explicitly mark an item to be ignored by the player. Setting class="noplay" will prevent the item from appearing in the Yahoo! WebPlayer's playlist. For example:
<a class="noplay" href="example.mp3">song that won't show up in the playlist</a>

2. Add class "htrack" to your mp3 links
class: htrack

Setting the class of an item to htrack explicitly marks that item to be added to the playlist. When the Yahoo! WebPlayer detects at least one link with the htrack classs, it will include all links with the htrack class in the playlist, and it will ignore any links that do not have the htrack class. This is helpful if you want the player to detect specific items and ignore others.
<a href="mysong.mp3" class="htrack">a song</a>
<a href="song-to-exclude-from-playlist.mp3">Ignored song</a>

I'll see if I can modify the RoM so that it adds the classes. Probably have to make a new BBCode, as I dunno if I can modify the built-in URL tag.

JB

Re: It's Song Fight, Playa!

Posted: Wed Jan 18, 2012 11:29 pm
by fluffy
Oh, "noplay" must have been added to the latest version of the media player. The older version didn't have that.

Probably the easiest and safest way to go is to just modify the phpBB theme to add "noplay" to the class list for links in a signature (so it'd be <a href="..." class="noplay postlink"> instead).

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 1:16 am
by Caravan Ray
You can take my fart signature when you can prise it out of my cold, dead anus.

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 2:10 am
by Caravan Ray
BTW - I am not sure where I am stealing that fart sound from. I really should record my own and host it myself.

How does one mic up an anal sphincter? Dynamic? Passive? Should I use a pop filter? Or poop filter? Could you pop one of those little bridge pick-ups in? Or do you need to insert an SM58? Surely someone's done it here. BLT? All the stuff you recorded before teaming up with Den sounded like it came out of your arse.

-----------------------------
BTW:
"mike up an anal sphincter" sounds like a good rap name. Sort of....

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 6:39 am
by jb
fluffy wrote:Oh, "noplay" must have been added to the latest version of the media player. The older version didn't have that.

Probably the easiest and safest way to go is to just modify the phpBB theme to add "noplay" to the class list for links in a signature (so it'd be <a href="..." class="noplay postlink"> instead).
Yeah and now they call it Web Player, instead of Media Player. Bunch of other changes too.

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 9:40 am
by fluffy
Yeah, I knew about the new name but it's dumb. What the hell is a "web player?" We're not playing the web!

Also I became aware of the new player when all of my carefully-set-up YMP-oriented stylesheet rules completely broke when it got forcefully updated on sockpuppet.us. They did something weird with how they position the buttons now which completely interfered with the way I was positioning my links. Bleh. Yet another reason I hate relying on externally-hosted Javascript libraries; on the plus side they can be upgraded at any time without any action on your part, but on the minus side they can be upgraded at any time without any action on your part.

Oh and the API docs are even worse than they were before. Fortunately the old options all seem to work (for now) but for example they no longer document the means of hiding the player until it's activated, and there's still no way to position the player on the right side of the page or putting it up top or any number of other things that would be better than having it interfere with the main content flow of 95% of websites.

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 11:08 am
by Manhattan Glutton
If you're not playing the web, you're already losing.

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 4:05 pm
by jb
I can position it up and down via CSS, but only exact positioning (I can't just say "stick it at the top of teh page"). I also haven't tried putting it on the right side as I kind of suspect that it wouldn't "just work" and fly out to the right but would rather just not fly out at all. Also, after giving it the default album art and making a new logo and then putting it in the CSS to show up, I was just about done messing with the motherfucker for all time. It works, it's useful, it's got some SF style, so I'll leave it at that.

I am gonna try making it so Tex's goddamn fart noise doesn't pollute the motherfuckin' playlist on every thread though. That would be good.

Oh and I think it does hide itself until there's a link on the page that activates it. But I also have the "search for media" function turned on and that doesn't seem to work at all. Thought it might be interesting to try but oh well.

JB

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 4:20 pm
by jb
I have added a new BBCode called "sigurl", which adds the class=noplay to the link in my own signature, as seen in all my posts now.

I haven't turned off URLs in signatures yet, but I'm considering it. I'll post in the forum announcements and see what the reaction is, but since it's a pretty easy change to make and will make the player a lot cleaner, I think it's a good change. Unless there's a better way that doesn't involve me editing PHP files for each theme I want the change to apply to. :P

JB

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 4:22 pm
by fluffy
What I meant by completely hiding it is such that the player doesn't appear AT ALL until someone clicks on an audio link. That used to be documented as setting displaystate to -1, and that still works, but it's no longer documented which means it's likely to disappear at some point.

I wish they'd actually document their various CSS classes (or at least the ones you're supposed to dick with) in addition to the JS API (which they also hardly document at all). DOM inspection gets old fast, and also that doesn't provide any sort of guarantee that the classes you're using are the "right" ones for long-term support.

Since tex's fart noise is a .wav you might be able to either tell the player to ignore .wav, or you could just have a JS that runs before YWP that adds the "noplay" class to all .wav links.

Turning off URLs in signatures would be annoying but as long as sigurl exists and is easy for people to find out about that shouldn't be too bad.

Re: It's Song Fight, Playa!

Posted: Thu Jan 19, 2012 4:23 pm
by Caravan Ray
I am so pleased I am keeping you boys busy.

Re: It's Song Fight, Playa!

Posted: Fri Jan 20, 2012 11:11 am
by Billy's Little Trip
Jon, if you are ever on a slow computer, you can switch to Milky Way to speed up page loading. JB hasn't added the playa to that theme. I use two computers throughout the day. A new fast one, and an old slow one. I use two themes now.

Re: It's Song Fight, Playa!

Posted: Fri Jan 20, 2012 12:20 pm
by JonPorobil
Billy's Little Trip wrote:Jon, if you are ever on a slow computer, you can switch to Milky Way to speed up page loading. JB hasn't added the playa to that theme. I use two computers throughout the day. A new fast one, and an old slow one. I use two themes now.
Thanks for the tip. However, I'm seldom on slow PCs anymore these days. My home PC has 4GB of RAM and a 2.8GHz 4-core processor. My work PC has 3.25GB of RAM and a 2.6GHz dual-core processor. My laptop is the slowpoke of the bunch, running 1.5GB of RAM on a 2.2GHz processor. Heck, even my phone has a dual-core proc these days. Sometimes my home web connection chokes up for no reason, though, so I'll bear that in mind for those occasions.

Re: It's Song Fight, Playa!

Posted: Fri Jan 20, 2012 1:05 pm
by Billy's Little Trip
Generic wrote:
Billy's Little Trip wrote:Jon, if you are ever on a slow computer, you can switch to Milky Way to speed up page loading. JB hasn't added the playa to that theme. I use two computers throughout the day. A new fast one, and an old slow one. I use two themes now.
Thanks for the tip. However, I'm seldom on slow PCs anymore these days. My home PC has 4GB of RAM and a 2.8GHz 4-core processor. My work PC has 3.25GB of RAM and a 2.6GHz dual-core processor. My laptop is the slowpoke of the bunch, running 1.5GB of RAM on a 2.2GHz processor. Heck, even my phone has a dual-core proc these days. Sometimes my home web connection chokes up for no reason, though, so I'll bear that in mind for those occasions.
La-dee-dah! Mr. Fancy pants with your highfalutin broadband interwebz and gigaboats of rom. pfffttt

Re: It's Song Fight, Playa!

Posted: Fri Jan 20, 2012 2:24 pm
by JonPorobil
Billy's Little Trip wrote: La-dee-dah! Mr. Fancy pants with your highfalutin broadband interwebz and gigaboats of rom. pfffttt
That would have seriously been an issue at my old job, though. I couldn't get the Song Fight! boards on my workstation - I had to RDP into a "server" that was actually just an old Dell Optiplex with like 512MB of RAM. Would have been a killer, there.

My current employer seems to care about making sure I've got the tools to do my job efficiently, and doesn't seem to care as much about making sure I don't get distracted between phone calls. :)

Re: It's Song Fight, Playa!

Posted: Fri Jan 20, 2012 3:57 pm
by Manhattan Glutton
I have an easier fix that requires no coding. Let's all add Caravan Ray to our block lists.

Re: It's Song Fight, Playa!

Posted: Mon Jan 23, 2012 10:19 am
by nyjm
Slight change of subject, but rather than starting a new thread:

Is anyone else having problems with the player in Chrome? It will buffers for a moment for me, and then times out. The player works fine when I use Firefox, but I don't use Firefox all that much any more.