WordPress Audio Player

WordPress Audio Player

From ThaiiS Note (Wiki)

Jump to: navigation, search

Troubleshooting

Blank space or “Adobe Flash Player required” message showing instead of player

If these messages are being displayed instead of the player, it is very likely that your theme doesn’t call the wp_footer() function in the footer or the wp_head() function in the header. These function calls are very important because without them, plugin developers cannot insert code into the header and footer sections of the page.

To fix this, open the footer.php file of your theme and add this line just before the closing <body> tag (if it is missing).


<?php wp_footer(); ?>
</body>

And open header.php file of your theme and add this line just before the closing <head> tag (if it is missing).


<?php wp_head(); ?>
</head>

custom on template

<?php $values = get_post_custom_values("SOUND-FULL-URL"); echo insert_audio_player('[audio:$values[0]]'); ?>

custom on fm100template

<script type="text/javascript" src="http://www.fm100cmu.com/live/audio-player/audio-player.js"></script>  
  <script type="text/javascript">  
            AudioPlayer.setup("http://www.fm100cmu.com/live/audio-player/player.swf", {  
                width: 290  
            });  
        </script>

<?php
$values = get_post_meta($post->ID, 'SOUND-FULL-URL', true);
if ( $values ) { ?>
    <p id="au<?php the_ID(); ?>">Sound Player</p>  
        <script type="text/javascript">  
        AudioPlayer.embed("au<?php the_ID(); ?>", {soundFile: "<?php echo get_post_meta($post->ID, 'SOUND-FULL-URL', true) ?>"});  
        </script> 
<?php /*?>        <?php  insert_audio_player("[audio:$values[0]]"); ?><?php */?>
    <?php } else { ?>
    NO SOUND
    <?php } ?>