Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › How to change MP3 player in wp_eStore_fancy8 and add to product listings
Tagged: mp3
- This topic has 10 replies, 3 voices, and was last updated 12 years, 6 months ago by admin.
-
AuthorPosts
-
May 17, 2012 at 11:08 pm #6345patbloomfieldMember
I’m setting up a website to sell MP3 files but want to use a player that works across all browser and mobile devices, which may not have flash.
On the main product page I can use Jplayer plug-in that can work without having flash.
However on the main shop page, we want to have dynamic listings of available MP3s with the possibility of playing them as you can on sites like Amazon. Is this available now or possible to add?
TIA
May 18, 2012 at 12:07 am #45166patbloomfieldMemberJust had a quick look through the code and traced it down to function eStore_show_audio_player($source,$playerwidth=290) that looks for class AudioPlayer.
The audio plug-in I’d prefer to uses the MP3j_Front class.
Could it be as simple as changing this definition and code syntax somewhere else (assuming no calls are being to the library)?
May 18, 2012 at 7:15 am #45167adminKeymasterYes, you can just change the content of the function to use whatever Audio player you want to use.
May 18, 2012 at 4:00 pm #45168patbloomfieldMemberI tried changing the audio object class but that didn’t work.
I’ll stick with the standard audio plug-in for now. Thanks again.
May 20, 2012 at 3:23 pm #45169RJBubbleMemberOn the back of this question is it possible for a different player to be used for the fancy8 display ?
If so how do I do it ?
For the same reasons as patbloomfield.
It seems to me this is going to become more and more important as mobile devices such as ipod ipad dominate the music market. So probably the default player needs looking at for this plugin.
Could a player like this work ?
http://wordpress.org/extend/plugins/degradable-html5-audio-and-video/
Thanks
May 21, 2012 at 2:53 am #45170adminKeymasterYou can use any audio player really. All it needs is a call to the audio player function that displays the player. I took a quick look at the plugin you shared but it didn’t have any function that can be called directly to render the player. It only has a shortcode option.
You can try using the following line of code inside the extra shortcode plugin’s “eStore_show_audio_player” function to see if it renders the audio player:
do_shortcode('[audio src="http://example.com/wp-content/uploads/mysong.mp3"]');
May 21, 2012 at 11:26 pm #45171patbloomfieldMemberI tried adding the do_shortcode but it kept stopping at the close square bracket – using a back slash made no difference.
In the end I made a new product object by combining eStore_fancy9 with the audio object. I don’t know why but it wasn’t possible to override the border and some of the other CSS code but it looks reasonable. I also switched to RJBubble’s audio plug-in as that’s the first WordPress plug-in that appears to properly handle html5/flash and media formats including ogg if desired.
Here’s a snippet of my code:
Code:<div style=”border: solid 1px #CCC; padding: 5px 5px 0px 5px;” margin-top:0px; overflow:hidden;>
<div style=”margin-bottom: 0px;”>
[wp_eStore_fancy9 id=1]
</div>
[audio src="http://www.xxx.com/wp-content/uploads/2012/05/xxx.mp3"]
</div>Not perfect but a reasonable workaround until something better comes along
May 21, 2012 at 11:52 pm #45172patbloomfieldMemberJust found two problems with the http://wordpress.org/extend/plugins/degradable-html5-audio-and-video/ audio plugin; a) it allows downloads b) it continues playing after selecting another audio file.
Back to the drawing board again…
May 22, 2012 at 8:58 am #45173patbloomfieldMemberI don’t know why but switching back to [http://sjward.org/jplayer-for-wordpress] and putting it before the fancy9 object made my custom css changes take effect on the fancy9 object to give a respectable result.
Code:<div style=”border: solid 1px #CCC; padding: 5px 5px 0px 5px;”>
[mp3j caption=”by Blah! Blah!” track=”Heaven Knows[at]1.Heaven-Knows-edit.mp3″ flip=”y” dload=”n”]
[wp_eStore_fancy9 id=1]
</div>With custom CSS being:
Code:/*
* Change appearance of eStore fancy9 to allow for the addition of audio object
*/
.custom .eStore_fancy9_main { border-style:none; margin-bottom: 0px;}
.custom .eStore_fancy9_button { float: right; }The audio plugin can prevent downloads and when you play a second object the first stops playing. I don’t think it can deliver multiple format such as oog but I believe that only affects old versions of Firefox. It works fine on my Smartphone so assume it’ll work on iPhoones etc. too
The website is still in early design/construction but you can check it out at http://www.scrambledegos.com/mp3-music-downloads-pop/blah-blah-heaven-knows/ to see how it looks. Of course the older this post is, I can’t guarantee it’ll look the same ;-}
Hope that helps others too.
May 24, 2012 at 12:11 pm #45174RJBubbleMemberSo if I was to use the jplayer plugin how would I call that in the shrotcode ?
I basically want to call it and display in fancy8 style.
Here is my page
[http://www.walkingoliver.co.uk/little-monster/]
thanks for your help. Really appreciate it.
May 30, 2012 at 11:29 pm #45175 -
AuthorPosts
- You must be logged in to reply to this topic.