WordPress.org

Ready to get started?Download WordPress

Forums

podPress
Have any way to open the podpress tracs in jplayer? (4 posts)

  1. BrunoSousa
    Member
    Posted 2 years ago #

    Hello

    I'm trying a few days to open podpress trac into a jplayer.

    I'd like to do this because the jplayer is fully customizable and works on mobiles, and the default podpress player doesnt work perfectly in ipad or iphones.
    I know there is the option of using html5 players for mobiles, but they are not customizable. So I have some questions:

    1 - have any way to open the podpress tracks in Jplayer?

    2 - How do I remove or format the buttons play / hide, play in popup and download.

    Thanks in advance anyone who can help.

    http://wordpress.org/extend/plugins/podpress/

  2. ntm
    Member
    Plugin Author

    Posted 2 years ago #

    I'm trying a few days to open podpress trac into a jplayer.

    I'm not sure what you are trying. Maybe if describe a little more what you are doing (do you use a further plugin? or do you try to implement the jplayer into podPress?) I might be able to help.

    2 - How do I remove or format the buttons play / hide, play in popup and download

    On the general settings page of podPress are some options in the section Post Content which may help with hiding those elements.
    You may format them with CSS. (Some of these elements have class names)

  3. BrunoSousa
    Member
    Posted 2 years ago #

    Hi NTM.

    I'd like to put Jplayer on the top of my website, which the mp3 podPress tracks playing into Jplayer.

    I want to do this because Jplayer layout is customizable and you can also position it anywhere in the site layout, while the podpres default player is not customizable and can only be placed within the posts or in widget area.

    See jplayer script below:

    1. $ (document). ready (function () {
    2. $ ("# jquery_jplayer_1"). jPlayer ({
    3. ready: function () {
    4. $ (this). jPlayer ("setMedia", {
    5. mp3 "/ media/mysound.mp3"
    6. oga, "/ media / mysound.ogg"
    7. });
    8. }
    9. swfPath: "/ js",
    10. supplied: "mp3, oga"
    11. });
    12. });
    13.

    I want the jplayer capture automatically the mp3 file link generated by podPress and play it in jplayer. For example:

    1. $ (this). jPlayer ("setMedia", {
    2. mp3: "http://mysite.com/podpress_trac/web/1234/0/01/my_track.mp3"

    I do not know if this is possible or if it is very hard to do, but you really help me if I show me how i do this.

    There is a Brazilian site of podcasts that did it. See the link below:

    http://jovemnerd.ig.com.br/categoria/nerdcast/

    To see an podPress track playing on the jplayer click on the button "CLIQUE AQUI PARA OUVIR" just below each post, and jplayer appear at the top of the site playing the podcast.

    Thanks in advance and sorry for my "google translator" English.

  4. ntm
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Bruno,

    is your jplayer a player with a playlist? Or is it a play which is visible solely on the single post view pages?
    In other words: Are you searching for a solution to add all media files on the home page of the blog to a playlist or is the jplayer in your case only visible on the single post view pages?

    One way to detect the podPress file and add it to the player is this:

    $(document).ready(function() {
    	var mediafile = '';
    	$('a.podpress_downloadimglink_audio_mp3').each(function(index) {
    		mediafile = $(this).attr('href');
    		return false;
    	});
    	$("#jquery_jplayer_1").jPlayer( {
        		ready: function () {
    			$(this).jPlayer("setMedia", {mp3: mediafile});
        		},
        		solution: "flash, html",
        		supplied: "mp3",
    		.....

    You can retrieve the URL of the media file from the link of the file type button/icon. This image is surrounded by a <a>-tag with the class="podpress_downloadimglink_audio". If the media file is for instance an .mp3 file then the class name is podpress_downloadimglink_audio_mp3. You can use the jQuery function each() to inspect every selected element. If there is more than one media file on the page then return false; makes sure that only the URL of the first file will be stored in the variable mediafile. In stead of a static URL you can use a variable like e.g. mediafile to set the media file of the jplayer.

    If you want to change the file later or per click on a button like on this Brazilian Podcast page then you should read about the jplayer method change or changeAndPlay see: http://jplayer.org/0.2.1/developer-guide/#jPlayer-change

    Regards,
    Tim

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic