Click here to Skip to main content
12,509,269 members (55,355 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# C#4.0
I use this code for playing the song:
<object id="objPlayMusic"  data = "1.mp3" >
</object>

but I want , the song repeated, How can I do this?

Thanks
Posted 31-Dec-12 8:57am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

If you are using HTML5, this would work:

<audio controls="controls" loop="loop">
   <source src="horse.ogg" type="audio/ogg" />
   <source src="horse.mp3" type="audio/mpeg" />
   Your browser does not support the audio element.
 </audio>

http://www.w3schools.com/html5/att_audio_loop.asp[^]
  Permalink  
Comments
parissa nouraie 31-Dec-12 15:36pm
   
No, I'm not using html 5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100