Fli
09-04-2017, 07:34 AM
Hi,
i had the mp3 flash player on my website and flash is no longer supported by many browsers:
<object type="application/x-shockwave-flash" data="<?php echo $this->_tpl_vars['server']; ?>
player/mp3player.swf?file=<?php echo $this->_tpl_vars['url']; ?>
&autostart=false" width="350" height="20"><param name="movie" value="<?php echo $this->_tpl_vars['server']; ?>
player/mp3player.swf?file=<?php echo $this->_tpl_vars['url']; ?>
&autostart=false" /></object>
At http://scriptgenerator.net/really-simple-embed-audio-player-script/ i found nice HTML5 web player embed code generator and this is the result in my case:
<audio controls loop preload="metadata" style=" width:350px;">
<source src="<?php echo $this->_tpl_vars['url']; ?>" type="audio/mpeg">
Your web browser does not support this media player
</audio>
And it works. One just need to replace source src="yourvariablehereMP3URL"
Do you know better audio web player code?
i had the mp3 flash player on my website and flash is no longer supported by many browsers:
<object type="application/x-shockwave-flash" data="<?php echo $this->_tpl_vars['server']; ?>
player/mp3player.swf?file=<?php echo $this->_tpl_vars['url']; ?>
&autostart=false" width="350" height="20"><param name="movie" value="<?php echo $this->_tpl_vars['server']; ?>
player/mp3player.swf?file=<?php echo $this->_tpl_vars['url']; ?>
&autostart=false" /></object>
At http://scriptgenerator.net/really-simple-embed-audio-player-script/ i found nice HTML5 web player embed code generator and this is the result in my case:
<audio controls loop preload="metadata" style=" width:350px;">
<source src="<?php echo $this->_tpl_vars['url']; ?>" type="audio/mpeg">
Your web browser does not support this media player
</audio>
And it works. One just need to replace source src="yourvariablehereMP3URL"
Do you know better audio web player code?