1 Replies - 1205 Views - Last Post: 05 October 2009 - 02:49 AM

#1 altonassociates  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 04-October 09

Javascript / Audio Clip

Posted 04 October 2009 - 06:22 PM

:crazy:

The code below is automatically generated by this service which hosts my web site. My problem ... I cannot get the 2nd sample audio file to appear/play. The first one (Sample 1) works but the 2nd never 'loads'. I have already tried substituting the N1.flv and N2.flv files so I know that is not the problem. thoughts?

</div>
</span></span></div>
<span style="font-size: 10pt"><span style="font-family: Verdana">Sample 1<br />
<div id="player" style="display: block; width: 350px; height: 20px"><span style="font-size: 10pt">VIDEO1</span></div>
</span></span><script src="/common/multimedia/flowplayer/example/flowplayer-3.1.1.min.js"></script>
<div></div>
<div><script language="Javascript">document.getElementById('player').innerHTML = ''; flowplayer("player", "/common/multimedia/flowplayer/flowplayer-3.1.1.swf", { clip : { url: "/userfiles/77860/N1.flv", autoPlay: false, autoBuffering: true }});</script><span style="font-size: 10pt"><span style="font-family: Verdana"><br />
</span></span><span style="font-family: Verdana">Sample 2<br />
<div id="player" style="display: block; width: 350px; height: 20px"><span style="font-size: 10pt">VIDEO2</span></div>
</span></div>
<script src="/common/multimedia/flowplayer/example/flowplayer-3.1.1.min.js"></script>
<div></div>
<div><script language="Javascript">document.getElementById('player').innerHTML = ''; flowplayer("player", "/common/multimedia/flowplayer/flowplayer-3.1.1.swf", { clip : { url: "/userfiles/77860/N2.flv", autoPlay: false, autoBuffering: true }});</script><span style="font-size: 10pt"><span style="font-family: Verdana"><br />
</span></span></div>
<br />



Is This A Good Question/Topic? 0
  • +

Replies To: Javascript / Audio Clip

#2 thehat  Icon User is offline

  • awake ? web();
  • member icon

Reputation: 106
  • View blog
  • Posts: 951
  • Joined: 28-February 08

Re: Javascript / Audio Clip

Posted 05 October 2009 - 02:49 AM

Xhtml id's should be unique. You have two divs with the id 'player', and both bits of javascript are pointing at an element with the id of player.

Try renaming the second player div to 'player2' and changing the second bit of javascript to:
<script language="Javascript">document.getElementById('player2').innerHTML = ''; flowplayer("player2", "/common/multimedia/flowplayer/flowplayer-3.1.1.swf", { clip : { url: "/userfiles/77860/N2.flv", autoPlay: false, autoBuffering: true }});</script>


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1