Hi Guys
I've just installed this plug in
http://wordpress.org/extend/plugins/wp-audio-player/
And cannot find any instructions on how to make the audio auto play.
http://96.125.163.76/~munca78/healingsuperfood.com/
Has anyone used it?
Or does anyone know where I should be adding code to make it autoplay?
Many thanks
Steve
P.s. I'm using this particular plugin because i like the player design
Arnav Joy answers:
i think it will create a meta box in post page where you can add the details .
it is titled as "Featured Video"
see attached screenshot
Daniel Yoen answers:
found this in plugin.php on plugin folder :
$audio_html = '<div class="wp-audio-player-firefox">';
$audio_html .= '<embed src="' . esc_url ( $audio_url ) . '" autostart="false" />';
$audio_html .= '</div>';
// If they're use IE8, we need to use a completely different version of the audio embed element
} else if ( $this->user_is_using_ie8() ) {
$audio_html = '<div class="wp-audio-player-ie8">';
$audio_html .= '<embed src="' . esc_url ( $audio_url ) . '" autostart="false" />';
$audio_html .= '</div><!-- /.wp-audio-player-ie8 -->';
should be :
$audio_html = '<div class="wp-audio-player-firefox">';
$audio_html .= '<embed src="' . esc_url ( $audio_url ) . '" autostart="true" />';
$audio_html .= '</div>';
// If they're use IE8, we need to use a completely different version of the audio embed element
} else if ( $this->user_is_using_ie8() ) {
$audio_html = '<div class="wp-audio-player-ie8">';
$audio_html .= '<embed src="' . esc_url ( $audio_url ) . '" autostart="true" />';
$audio_html .= '</div><!-- /.wp-audio-player-ie8 -->';
Steve Watson comments:
Hi Daniel
Are you saying this new snippet will enable auto play?
Can you show me in the code where that happens?
Cheers
Steve
Daniel Yoen comments:
try to change :
autostart="false"
to
autostart="true"
Hope this help :-)
Steve Watson comments:
haha.... oh yes I see what you mean now. Unfortunately it didn't make any difference. :(
Daniel Yoen comments:
line 277
$audio_html = '<audio preload="auto" controls src="' . esc_url ( $audio_url ) . '" class="wp-audio-player"></audio>';
to
$audio_html = '<audio preload="auto" controls autoplay src="' . esc_url ( $audio_url ) . '" class="wp-audio-player"></audio>';
work for me :-)
Daniel Yoen comments:
for firefox and ie :
autostart="true"
for other :
controls autoplay
tested with safari, work with autoplay :-)
hope this help :-)