Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function html5orjavamenu()
- {
- var s;
- if (sup_webaudio) {
- if (sup_webaudio) {
- if (!document['ct']) document['ct']= new sup_webaudio;
- try {
- var cc=document['ct'].createConvolver;
- } catch (e) {
- document['ct']=null; // firefox 23 supports webaudio, but not yet createConvolver(), making it unusable.
- sup_webaudio=false;
- };
- }
- }
- sup_iOS = 0; // global!
- sup_android = 0; // global!
- sup_chrome = 0; // global!
- try {
- var n=navigator.userAgent.toLowerCase();
- if (n.indexOf('iphone')!=-1) sup_iOS=1;
- if (n.indexOf('ipad')!=-1) sup_iOS=1;
- if (n.indexOf('ipod')!=-1) sup_iOS=1;
- if (n.indexOf('ios')!=-1) sup_iOS=1;
- if (n.indexOf('android')!=-1) sup_android=1;
- } catch (e) {};
- if (sup_iOS) isTouchDev=true;
- var usecookie= readCookie('usejava');
- if (!usecookie) {
- if (sup_socket && sup_canvas) usecookie="n"; else usecookie="y";
- if (sup_socket && (sup_webaudio || sup_mozaudio)) usecookie+="n"; else usecookie+="y";
- }
- usejavawaterfall=(usecookie.substring(0,1)=='y');
- usejavasound=(usecookie.substring(1,2)=='y');
- var javacolor=checkjava();
- s='<b>Waterfall:</b>';
- s+='<span style="color: '+javacolor+'"><input type="radio" name="groupw" value="Java" onclick="html5orjava(0,1);"'+(usejavawaterfall?" checked":"")+'>Java</span>';
- if (sup_socket && sup_canvas) s+='<span style="color:green">'; else s+='<span style="color:red">';
- s+='<input type="radio" name="groupw" value="HTML5" onclick="html5orjava(0,0);"'+(!usejavawaterfall?" checked":"")+'>HTML5</span>';
- s+=' <b>Sound:</b>';
- s+='<span style="color: '+javacolor+'"><input type="radio" name="groupa" value="Java" onclick="html5orjava(1,1);"'+(usejavasound?" checked":"")+'>Java</span>';
- if (sup_socket && sup_webaudio) s+='<span style="color: green">';
- else if (sup_socket && sup_mozaudio) s+='<span style="color: blue">';
- else s+='<span style="color: red">';
- s+='<input type="radio" name="groupa" value="HTML5" onclick="html5orjava(1,0);"'+(!usejavasound?" checked":"")+'>HTML5</span>';
- if (sup_iOS && sup_socket && sup_webaudio) s+='<input type="button" value="iOS audio start" onclick="iOS_audio_start()">';
- document.getElementById('html5choice').innerHTML = s;
- document.getElementById('record_span').style.display = usejavasound ? "none" : "inline";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement