Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1355924
    jquinn33
    Participant

    Hi! I’m using Ethos and have an audio player on the Home page. As the page scrolls down there is an embedded video. Is there a way to have the audio player stopped when someone clicks to play the embedded video?

    Thank you!

    #1356251
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    Could you please provide us with your website URL so we can take a closer look?

    Thanks.

    #1356781
    jquinn33
    Participant
    This reply has been marked as private.
    #1357266
    Rad
    Moderator

    Hi there,

    If the video is a self-hosted, then it’s possible. Currently, the video is hosted and communication from iframe window and your site aren’t possible. Hence, can’t detect if the video is played or clicked.

    Try adding the video as self-hosted. Then we can add something like this to self-hosted play event.

    $('audio').each(function() {
          $(this)[0].pause();
    });

    Thanks!

    #1357279
    jquinn33
    Participant

    Thank you so much, Rad! I’ll try this out!! You guys are the BEST! 🙂

    #1357570
    jquinn33
    Participant

    Hi Rad! I was able to change this to a self-hosted video. Can you tell me where the self-hosted play event is for me to add the code you suggested?

    Thank you again!

    #1357672
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Please add the following JS code in the customizer, Appearance > Customize > Custom > Javascript

    (function(){
      $('audio').each(function() {
          $(this)[0].pause();
      });
    })(jQuery);

    Hope this helps.

    #1357898
    jquinn33
    Participant

    You’re my HERO!! Thank you! It works perfectly!

    You guys are the BEST!!

    #1357954
    Thai
    Moderator

    You’re most welcome 🙂

  • <script> jQuery(function($){ $("#no-reply-1355924 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>