Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #612918

    Hello,

    Great work guys on this plugin. I have an issue i need help on. I put a WordPress audio shortcode inside an ajax portfolio item (portfolio item called ‘MP3 Test’ on the page in the private content ). When the item is clicked and the contents display via ajax, I see the audio come up. When i click play the audio starts playing which is good.

    The problem comes from closing the ajax display, the audio keeps playing, even when i use the arrow to navigate to the next portfolio item the music keeps playing. I believe the audio should stop/pause when i close the ajax view or use arrow to navigate to the next item or click another portfolio item.

    How can I get this fixed.

    #614611

    Hi adotopanuga!

    Thank you for using Enfold.

    Please add this in the functions.php file:

    // new script
    add_action('wp_footer', 'ava_new_custom_script');
    function ava_new_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
        var audio = $("audio")[0];
        $('.ajax_controlls a').bind('click', function(e) {
            audio.pause();
            audio.currentTime = 0;
        });
    })(jQuery);
    </script>
    <?php
    }

    Remove browser cache or hard refresh the page before testing it.

    Regards,
    Ismael

    #620492

    Hi Ismael.

    Thanks for your response. However the code doesn’t seem to work. I have put the code in child theme’s function.php file. You could check it in the link in the private content area.

    #620954

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #621139

    Hi Rikard,

    Thanks for your quick response. Please see private content.

    #621159

    Hi!

    We modified the code a bit. Please check it now.

    Regards,
    Ismael

    #621166

    Hi Ismael,

    Thanks for this. One more thing.

    1. I noticed the player stops when i click the close button or the 2 navigation arrow buttons beside the close button which is good. However, if the portfolio ajax is opened and audio is playing and then i click another portfolio thumbnail from beneath to see another ajax view, the audio doesn’t stop. Could you help fix such that clicking another portfolio thumbnail also stops the audio from playing.

    2. Also what adjustment/code was used so i can replicate this elsewhere on the main project im working on. Thanks.

    Many thanks and great work on the theme.

    • This reply was modified 8 years, 8 months ago by adotopanuga. Reason: more inquiries
    #621466

    Hello,

    Still waiting for a response on this. Please treat as urgent. Thank you.

    #621869

    Hi!

    Please replace the code with:

    // new script
    add_action('wp_footer', 'ava_new_custom_script');
    function ava_new_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) { 
        $('body').on('click', '.grid-entry, .ajax_controlls a', function(e) {  
            var audio = $(".wp-audio-shortcode")[0];
            if(!audio.paused) {
                audio.pause();
                audio.currentTime = 0;
            }
        });
    })(jQuery);
    </script>
    <?php
    }

    Best regards,
    Ismael

    #622055

    Hi Ismael,

    Sorry for all the stress and thank for your patience so far, This is where (check private content area) am trying to replicate the work. I can’t seem to achieve it. I have used the code in the shild theme functions file but no show. If you look at the page you’ll see that i want each ajax portfolio content to be different songs. Its not working that when i play it and i click any of the control or the ajax thumbnails the music stop. In fact from my observation the music keeps playing and when i click paly in another item that one continues playing over the previous one.

    Please any help will be much appreciated.

    #622830

    Hi!

    Looks like you didn’t replace the code in the functions.php file. Please replace it with the following: https://kriesi.at/support/topic/wordpres-audio-keeps-playing-after-closing-ajax-portfolio-item/#post-621869

    Regards,
    Ismael

    #622870

    Hi Ismael,

    I did it did not work. That why I provided you the login info.
    Lease help look at this as this is really urgent and delaying the launch of the project. I have put the code in. Still has all those issues I mentioned in my previous reply.

    I noticed it takes like 24hrs to get another reply from you. I’m hoping you can help fix this sooner coz I’m out of time on this project. Thanks.

    #622951

    Hi!

    We modified the code in the functions.php file. It’s working now. Please remove browser cache or hard refresh the page.

    It usually takes within 24 hours before we can reply back so if you’re in a hurry, please contact codeable: http://kriesi.at/contact/customization

    Best regards,
    Ismael

    #623238

    Thanks Ismael. Much appreciated.

    It’s working now but just 2 more things.

    1. It doesn’t stop on click of the close button (located at the top-right of the ajax portfolio item content).
    2. In a particular item(see private content) on page 1, i’m experience audio overlapping issue (first song doesn’t stop playing when another play button is clicked) when i use multiple audio shortcodes.

    Could you help fix this..

    Your support has been great and patient very very helpful. Thank you in advance.

    • This reply was modified 8 years, 8 months ago by adotopanuga.
    #623486

    Hi!

    1.) I’m not sure why it’s not working for the close button. Please give us more time to inspect the issue.

    2.) Users will have to pause the other player manually if there are multiple audio shortcode.

    Regards,
    Ismael

    #623695

    Okay. I’ll be expecting your response thanks.

    #625539

    Hi,

    We tried to fix the code but it seems to be incompatible with the portfolio ajax script. Will you consider hiding the close button instead? You can use this:

    .avia_close {
        display: none !important;
    }

    Best regards,
    Ismael

Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.