I've added a new feature at Magnatune, to give you URLs that link directly to a song or a specific tab.
This makes it much easier to blog about a specific song, since people who click on that link will now hear the song you linked to, and not the first song (which is what it used to do).
So...every time a song plays, the URL on the page will change to have a song= on the end of it, like so:
http://magnatune.com/artists/albums/dbautista-symtwob?song=1
http://magnatune.com/artists/albums/dbautista-symtwob?song=2
http://magnatune.com/artists/albums/dbautista-symtwob?song=3
etc...
If you go to this URL, song number 3 will play.
The same thing is now also true for tabs on the artist page.
If you click the URL for a download tab, the url will have "download" on the end:
http://magnatune.com/artists/albums/dbautista-symtwob/download
and going to this url will automatically load the download page.
This new feature doesn't work for IE6, but worked for every other browser I tested.
In other news, those of you using Internet Explorer 11 have been having problems playing music at Magnatune. This should be fixed now. The problem was caused by IE11 identifying itself as Firefox, which can play OGG audio files. IE11 definitely cannot play OGG audio files, and that's what caused the problem.
-john
You should use feature detection and not user agent sniffing to detect what audio files can be played. Maybe even Firefox can play AAC when it uses DirectShow filters/QuickTime? I think it does this now at least for h264, or doesn't it? I use Linux.
See HTMLMediaElement.prototype.canPlayType here: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement
Alternatively you just could define a fallback list of source elements and let the browser choose the first one it understands:
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video
The second option is what I use in http://greattuneplayer.jit.su/
"every time a song plays, the URL on the page will change to have a song= on the end of it"
This does not seem to work for me in Chrome 27. Works in Firefox 25.0.1 though. Do you use history.pushState for this? This should work in Chrome.
Posted by: panzi | November 25, 2013 at 02:41 PM
You mentioned in IE6 that the tabs URL does not change. In addition to that, I am finding that on some (but not all) albums, when I switch tabs, not only does the URL remain the same, but the page content does not change. This is kind of a bummer since I have been using IE6 to listen due to the fact that Firefox still requires me to load the entire song before any music will play in browser.
Posted by: Spike Page | November 26, 2013 at 10:24 AM
Just discovered another interesting glitch that occurs on both IE and FF. When I share a song or album to Facebook from the Share tab, it posts the artist blurb rather than the album blurb, which is why I prefer sharing by posting a link to the Album Info tab page. But when I do that now, rather than display the album blurb as before, that text is replaced by a copy of whatever text I add to my Facebook status update. My current workaround is just to copy and paste the album blurb into my FB status update field, but it seems there's something wonky going on in a script somewhere.
Posted by: Spike | November 27, 2013 at 07:57 PM
Panzi: I had been automatically using OGG for Firefox, because that browser had always supported it, but now, I do as you suggest, and only send OGG audio if the browser says it supports it, since IE changed their browser string to look just like Firefox.
As to the song= it's odd that Chrome 27 doesn't support it. It does work in Chrome 31, which I'm I'm using history.replaceState for that feature, as I don't want to add to the history every time you click a tab (back arrow in the browser then becomes annoying)
Posted by: John from Magnatune | November 28, 2013 at 07:10 AM
re: facebook -- thanks for the tip, I know what it takes to fix the facebook problem and will do this weekend.
-john
Posted by: John from Magnatune | November 28, 2013 at 10:39 AM
This doesn't work. Taken from the member page http://download.magnatune.com/artists/albums/charlieb-transport?song=1 if I change the 1 to a 2, it takes me to the download page. All the albums seem to take me to the album page, and don't play unless I go to album info, and select song 1 which is accesible. At least I can select a song, not necessarily 1, to start with to play.
Posted by: Jared Rimer | November 29, 2013 at 10:28 AM
Also, I notice that when in this mode, I can't go back to the previous page using firefox, for example, I selected damsel down to preview, selected the first CD, had to select album view, then the first song. Going back a page took me to the download page, have to go to download page for artists all over again.
Posted by: Jared Rimer | November 29, 2013 at 10:54 AM
re: Jared download page bug - thanks for pointing out the "download tab" bug, which I've now fixed. I've also added the "link to a tab" feature for the artists page now.
re: Jared firefox back arrow problem - I think that's fixed too now, as I think bug was related to the tab bug fixed above. If it's not, let me know a bit more about what pages you visit to cause the bug. It's working for me on Firefox.
re: facebook - descriptions and album art should post correctly to facebook now
Posted by: John from Magnatune | November 30, 2013 at 09:21 AM
I clicked on an album under http://magnatune.com/brief (jazz tab) and for some reason it suddenly scrolled to the bottom of the page and displayed a html5 audio element there. I opened the JavaScript console in this screenshot, maybe there is helpful information displayed to debug this:
http://i.imgur.com/aKaTmm7.png
Posted by: panzi | December 07, 2013 at 10:13 AM
Hi Panzi -- this can happen if you click the audio play button very quickly after the page loads, and the HTML5 audio engine hasn't yet loaded (it loads asynchronously). Currently, this causes it to think that you don't have HTML5 audio support, and so it moves into "IE6" compatibility mode and plays the audio using an embed tag.
Posted by: John from Magnatune | December 08, 2013 at 12:39 AM