WordPress.org

Ready to get started?Download WordPress

Forums

Audiobar
Muting on certain pages (4 posts)

  1. xalexas
    Member
    Posted 2 years ago #

    Is there option to mute player on specific pages? I have videos on some pages and music overlaps with video sound. Yes, I know I can click stop button but I need it be done automatic.
    Thanks.

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

  2. kalatix
    Member
    Posted 2 years ago #

    Hi xalexas,

    Thanks for checking out Audiobar. There isn't a standard way to automatically stop (or pause) the music, but if you feel comfortable inserting some code, I can talk to the programmer to see if he can whip something up for you! I'll reply here when he gets back to me about it.

    I will also make note of this feature to include it in future versions.

    Thanks,
    Chad.

  3. xalexas
    Member
    Posted 2 years ago #

    OK. Thank you. Meanwhile maybe I can set default silence on other pages? It would be usefull if I could autoplay silence? I have tried to autoplay with adding audiobar-bar.php to my theme folder with following code:
    <?php $autoplay=1; include ABSPATH."wp-content/plugins/audiobar/templates/audiobar-bar.php";?> but it doesn't autoplay file.
    Autoplay works only on home page even without that code, everywhere else there is a play button.
    Also is there any option to stop music? There is only play button. I would like to have option for visitors to turn off the music.

  4. xalexas
    Member
    Posted 2 years ago #

    I have found solution with some JavaScript for hHTML audio but still no luck with flash player. Here is the code for HTML player:

    Put this into header.php:

    <script type="text/javascript">
    
    var iframe = parent.document.getElementById('iframe_play');
    var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
    var song = innerDoc.getElementById('audio');
    
    <?php if($post->ID == 384): ?>
     song.pause();
    
     <?php else: ?>
    
      song.play();
     <?php endif; ?>
    
    </script>

    Does anyone knows how to control flash player with JavaScript?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags