Revision history [back]

click to hide/show revision 1
initial version

asked 2013-10-30 04:00:21 +0800

kykub gravatar image kykub

Audio change src not working

hi i have problem when i call Audio.setSrc("http://mydomain.com/1.mp3"); first time i click button it not working if i click again (not change src ) it working please help

audio.zul

<zk> <window title="new page title" border="normal">

<textbox id="s"></textbox> <audio id="p"></audio>

<button id="play" label="Play" onclick="getAudio()" &gt;<="" button=""> <zscript> getAudio() { p.setSrc(s.getText()); p.play(); } </zscript>

</window> </zk>

Audio change src not working

hi i have problem when i call Audio.setSrc("http://mydomain.com/1.mp3"); first time i click button it not working if i click again (not change src ) it working please help

audio.zul

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="new page title" border="normal">

border="normal">

<textbox id="s"></textbox> <audio id="p"></audio>

id="p"></audio>

<button id="play" label="Play" onclick="getAudio()" &gt;<="" button=""> onClick="getAudio()" ></button> <zscript> getAudio() { p.setSrc(s.getText()); p.play(); } </zscript>

</zscript>

</window> </zk>

</zk>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More