I see that I am to wait for what will be exhibited by death.
Filed under: Uncategorized | Leave a Comment »
I see that I am to wait for what will be exhibited by death.
Filed under: Uncategorized | Leave a Comment »
Filed under: Uncategorized | Leave a Comment »
Filed under: Uncategorized | Leave a Comment »
Let’s face it. We all love the functionality of the .xspf music player. It’s sleek if we need it to be (everything stripped off of it except for a single button), or it can contain multiple fields of information like Artist, Album, Year, and even Album Cover.
But there’s one major problem I have always encountered with it, and in the past I’ve overlooked it. The friggin’ embed code will NOT validate, no matter what. Here’s a list of the errors I recieved just from the player when validating through W3C’s HTML Validator:
Line 91, Column 11: there is no attribute “src” .
<embed src="xspf_player.swf?playlist_url=playlist.xspf" quality="high" bgcolor="Line 91, Column 64: there is no attribute "quality".
…?playlist_url=playlist.xspf" quality="high" bgcolor="#E6E6E6" name="xspf_playLine 91, Column 79: there is no attribute "bgcolor".
…laylist.xspf" quality="high" bgcolor="#E6E6E6" name="xspf_player" allowscriptLine 91, Column 94: there is no attribute "name".
…uality="high" bgcolor="#E6E6E6" name="xspf_player" allowscriptaccess="sameDomLine 91, Column 126: there is no attribute "allowscriptaccess".
…name="xspf_player" allowscriptaccess="sameDomain" type="application/x-shockwaLine 91, Column 144: there is no attribute "type".
… allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspLine 91, Column 188: there is no attribute "pluginspage".
…ation/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplLine 91, Column 240: there is no attribute "align".
…romedia.com/go/getflashplayer" align="center" height="55" width="225" /></objLine 91, Column 256: there is no attribute "height".
…etflashplayer" align="center" height="55" width="225" /></object> <!-- END PLLine 91, Column 267: there is no attribute "width".
…er" align="center" height="55" width="225" /></object> <!-- END PLAYER! *****Line 91, Column 274: element "embed" undefined.
…gn="center" height="55" width="225" /></object> <!-- END PLAYER! ************
WHOA! I know, most of them are simple-fixes, but I hated the fact that some weren’t; that fact would stay on my mind for quite a while. So I needed to find an alternative – something that would validate easily, and (hopefully) clean up the code I had to be more presentable. So I turned to my trusty Google and after some searching I was able to find an article on A List Apart. I was kind of skeptical, but it was on A List Apart so If anything it had a reputable name behind it.
In the article Drew McClellan talks of similar problems – I instantly knew his pain and could totally relate. I am a self taught coder, though, so much of what he talked about I knew but just didn’t understand why it was there, and what purpose it served.
So after some reading i got to the final code that he came up with:
<object type="application/x-shockwave-flash" data="c.swf?path=movie.swf" width="400" height="300"> <param name="movie" value="c.swf?path=movie.swf" /> </object>
Compared to MY original code for the .xspf player:
<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″
codebase=”http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0″
width=”225″ height=”55″ >
<param name=”allowScriptAccess” value=”sameDomain”/>
<param name=”movie” value=”xspf_player.swf”/>
<param name=”quality” value=”high”/>
<param name=”bgcolor” value=”#E6E6E6″/>
<embed src=”xspf_player.swf?playlist_url=playlist.xspf“
quality=”high” bgcolor=”#E6E6E6″ name=”xspf_player” allowscriptaccess=”sameDomain”
type=”application/x-shockwave-flash”
pluginspage=”http://www.macromedia.com/go/getflashplayer”
align=”center” height=”55″ width=”225″> </embed>
</object>
I was completely blown away by the stripped-downed looks and simplicity of his coding. Again, whoa! But one thing perturbed me – he was talking about movies, and I had a .swf playlist, not a movie. But a .swf is (basically) a .swf no matter what, right? So I gave it a shot.
Here’s what I did: I pasted his code right into mine and looked at the three real pualities I would have to work with: object data, dimensions, and param value.
I knew my object type already from the original code I had because that was the same as the param value, so I pasted in xspf_player.swf?playlist_url=playlist.xspf to both the object data and param value fields.
The only thing left to change was the dimensions – how simple could this get? There must be a major bug coming when I browser test…. here comes……
No bugs – nothing? Really?
Yup. You don’t get more simple than that, people. I went back to the validator and input my local file and voila! A nice pretty green bar showing that there are NO problems anywhere in the code. What a good feeling.
I compared before and after, and the player looks exactly the same and works beautifully. So here’s my final code:
<object type=”application/x-shockwave-flash”
data=”xspf_player.swf?playlist_url=playlist.xspf“
width=”225″ height=”55″>
<param name=”movie”
value=”xspf_player.swf?playlist_url=playlist.xspf” />
</object>
And you’re done. Hope you find this helpful! Leave me comments if so. Many thanks to Drew McClellan and A List Apart, as well as the people behind the .xspf music player!
-Movlogger
Filed under: Uncategorized | Leave a Comment »
Filed under: Uncategorized | Leave a Comment »
Mobile post sent by Movlogger using Utterz. Replies.
Filed under: Uncategorized | Leave a Comment »
Mobile post sent by Movlogger using Utterz. Replies.
Filed under: Uncategorized | Leave a Comment »
Mobile post sent by Movlogger using Utterz. Replies.
Filed under: Uncategorized | Leave a Comment »
Mobile post sent by Movlogger using Utterz. Replies. mp3
Filed under: Uncategorized | Leave a Comment »
Mobile post sent by Movlogger using Utterz. Replies.
Filed under: Uncategorized | Leave a Comment »