Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter xalexas

    (@xalexas)

    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?

    Thread Starter xalexas

    (@xalexas)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)