0

Audio change src not working

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

kykub gravatar image kykub
75 1

updated 2013-10-30 05:04:38 +0800

sjoshi gravatar image sjoshi flag of India
3508 1 8
http://zkframeworkhint.bl...

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">


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

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

</window>
</zk>
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-11-26 02:53:45 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2013-11-26 02:54:15 +0800

Hi you can try

p.setSrc(s.getText());
p.invalidate();
p.play();
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

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

Seen: 11 times

Last updated: Nov 26 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More