WP-Filebase Pro › Forums › Templates › Template using the mediaelement.js for mp3?
- This topic has 5 replies, 2 voices, and was last updated 9 years, 9 months ago by fafdk.
- 2013-08-11 at 15:22 #623
Do you know how to make a template which uses the mediaelement.js for playing mp3 or other media audio formats?
I have created a 5-col-row with additional “language” and “author” cols, which looks like this:
I’m about to create a 6-col-row template which incorps the mediaplayer (mediaelement.js). Maybe one which opens in a new window. Do you have a hint or a tip on how to make this the right way?
/FAF2013-08-13 at 07:14 #625
Made a test template with the mediaelement.js audio function. Seems to work ok, it’s just not the most elegant display, but it works with the core mediaelement.js.
<tr><td><a href="%file_url%">%file_display_name%</a></td><td>[audio mp3="%file_url%"]</td></tr>
Really interesting with the template system, it opens up for endless ways of doing things.
Thx2013-08-13 at 10:25 #628FabianParticipant
Nice to know that this is working. What Plugin are you using for the [audio…] shortcode?
You can also use the HTML5 audio element http://www.w3schools.com/html/html5_audio.asp
<audio controls autobuffer preload="none"> <source src="%file_url%" /> </audio>2013-08-13 at 10:56 #629
No plugin. Mediaelement.js is in the core now. It degrades to flash too, if no HTML5 support is present.
Right now I’m trying to put it all together in a nice design.2013-08-13 at 11:06 #630
You should utilize the mediaelement.js shortcode [audio mp3=""] in your plugin. Maybe change the MP3 template, so that you can use HTML5 and Flash instead of your FLV player.
Also I’m looking for good ideas on how to build up a nice template with tables and all. I’ve just installed the “tablepress” plugin, to see if I can get some use of it.
I will also make some research on W3S, so that I can understand the HTML5 directive a little better.
Thank you for your input.2013-08-14 at 16:14 #640
Tried to incorporate accordions with the mediaelement.js mp3 player, with the help of a shortcode plugin called: “WordPress Twitter Bootstrap Plugin”.
I created a template like this:
[TBS_COLLAPSE accordion='y'][TBS_COLLAPSE_GROUP title="%file_display_name%" open='n'][audio mp3="%file_url%"][/TBS_COLLAPSE_GROUP]
And from what I can see, then it works, but it seems that the mediaplayer.js is loading in the background on every entry and making the page somewhat slow to load, because I have allot of files on that page. If I try without the accordion, and just with the mp3 player in a table for each file, then it is slow as well, can’t really see a difference there. If I make a separate description page with only one player, then it would load fast of course, but with accordions it could really be eye-candy to have all on one page.
I would have to learn some more about how to prefetch the player, maybe load it in the footer or in a popup. I like the idea of having the mediaplayer in the “footer”, so that the users can look around on the site while listening to the mediafile.
Did you ever hear about “WordPress Twitter Bootstrap Plugin” and if there are any conflicts with it?
Did you think about integrating the WP3.6 core mediaplayer into your plugin? – if so, did you contemplate on using the mediaplayer in the footer or at the bottom of the page, or using accordions?
Also found a page with some jquery components – which maybe could be of some use for you. Don’t know if the page is any good, but I include it anyway.
I think that the media-section of your plugin could bring your plugin to a broader audience, if you made use of the mediaelement.js integration. I know it’s only for WP3.6 and many are still using the older versions, but you could make it so that those with WP3.6 could make better use of it and for their multimedia needs. When your finished with ironing the last bugs out of your plugin, then you maybe could give it some thoughts? I also wish to learn something here 🙂
Thank you for your time and for your plugin.
- You must be logged in to reply to this topic.