Changeset 14041
- Timestamp:
- 06/02/12 20:29:40 (13 years ago)
- Location:
- trunk/FACT++/www/smartfact
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/smartfact/index.css
r14040 r14041 221 221 h3 { 222 222 margin:0; 223 color:#206; 223 224 } 224 225 … … 226 227 margin:0; 227 228 color:#206; 229 } 230 231 .astro { 232 width:100%; 228 233 } 229 234 -
trunk/FACT++/www/smartfact/index.html
r13686 r14041 4 4 <head> 5 5 <title>SmartFACT++</title> 6 <script type="text/javascript"src="index.js"></script>6 <script src="index.js"></script> 7 7 <link rel="stylesheet" type="text/css" href="index.css" /> 8 <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1 .0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />8 <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=0, minimum-scale=1, maximum-scale=1, target-densitydpi=device-dpi" /> 9 9 </head> 10 10 11 <body id="body" onload="onload();" onresize="onresize();"/> 11 <body id="body" onload="onload();" onresize="onresize();"> 12 <audio autoplay id="audio"> 13 <source type="audio/mp3"/> 14 <source type="audio/ogg"/> 15 </audio> 16 </body> 12 17 </html> -
trunk/FACT++/www/smartfact/index.js
r14031 r14041 64 64 65 65 $("audio").date = new Date(); 66 67 66 68 67 /* … … 672 671 table.appendChild(tf); 673 672 674 // ==================================================================675 /*676 var audio = $new("AUDIO");677 678 audio.autoplay = true;679 audio.date = new Date();680 audio.id = "audio"+z;681 682 var ogg = $new("SOURCE");683 var mp3 = $new("SOURCE");684 audio.appendChild(ogg);685 audio.appendChild(mp3);686 687 $("body").appendChild(audio);688 */689 690 673 $("body").appendChild(table); 691 674 … … 978 961 // Time stamp of audio file must be newer than page load 979 962 // or last audio play respecitvely 980 if (audio_date>audio.date) 981 { 963 if (audio_date>audio.date && header[2].length>0) 964 { 965 var name = "audio/"+header[2]; 966 967 var mp3 = $new("SOURCE"); 968 var ogg = $new("SOURCE"); 969 mp3.src = name+".mp3"; 970 ogg.src = name+".ogg"; 971 972 // If audio file has changed play the new one 973 if (audio.firstChild.src!=mp3.src) 974 { 975 audio.replaceChild(mp3, audio.firstChild); 976 audio.replaceChild(ogg, audio.lastChild); 977 978 } 979 982 980 audio.date = audio_date; 983 981 984 var name_ogg = "audio/"+header[2]+".ogg"; 985 var name_mp3 = "audio/"+header[2]+".mp3"; 986 987 var ogg = $new("SOURCE"); 988 var mp3 = $new("SOURCE"); 989 ogg.type = "audio/ogg"; 990 mp3.type = "audio/mp3"; 991 ogg.src = name_ogg; 992 mp3.src = name_mp3; 993 994 if (audio.firstChild.src!=ogg.src) 995 { 996 audio.replaceChild(ogg, audio.firstChild); 997 audio.replaceChild(mp3, audio.lastChild); 998 } 982 /* 983 audio.firstChild.src = name_mp3; 984 audio.lastChild.src = name_ogg; 985 audio.load(); 986 */ 999 987 } 1000 988 }
Note:
See TracChangeset
for help on using the changeset viewer.