views:

14

answers:

0

Hi All,

I am using Html with Java Script to create webpage.

Steps to be follow.

  1. Create Folder name as "onlinesongs" and keep this as your parent folder.
  2. In that again create one folder name as "songs".
  3. Copy 10 mp3 songs into songs folder you have created in second step.
  4. Rename all songs which u copied as 1,2,3,4,5,6,7,8,9,10 like so on...
  5. Copy the code below and paste it in notepad then save name as "songsplay.html" into "onlinesongs" folder.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>Online Songs</title>
<style type="text/css">
<!--
body {
text-align:center;
}
form {
margin:0;
padding:0;
}
-->
</style>
<script type="text/javascript">
<!--
function PlayIt(){
document.getElementById("music1").innerHTML='<object

id="mediaPlayer" width="270" height="45" ' +'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ' +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ' +'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">' +'' +'' +'' +'' +'' +'' +'' +'' +'' }

function AlertIt(){
var val=document.getElementById('cancion-temp').value;
if(val==''){
alert('Please Enter The Value');
}else if(val.length>=7){
alert('Please Enter Character Less Than 6');
}
var path='songs/'+val+'.mp3';
document.getElementById('cancion').value=path;
PlayIt();
}


//-->
</script>
</head>
<body onload="document.forms['player'].reset()">
<form name="player" action="" method="">

Enter TrackID Between 1 - 10<br></br>
<input type= "text" id="cancion-temp"  size="26">
<input type= "hidden" id="cancion"  size="26">
<input type= "Submit" value="Go" id="cancion1" onClick=

"AlertIt();return false;">

</form>
<span id="music1">
<object type="application/x-mplayer2"

width="300" height="45" data=""> Your system does cannot find the windows media player that was specified.

  1. Double click the html file which u created in %th step.

Problem Is In my system browser it is playing fine, but if i u use via mobile browser it getting start to play after buffering full song.

I need to play in mobile browser while streaming.

If any one have idea please let me know.....