WebCenter User Experience and Interaction From iPads to Xbox
WebCenter User Experience and Interaction From iPads to Xbox
WebCenter User Experience and Interaction From iPads to Xbox
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
};<br />
audioStream = this.data;<br />
recordCtlBut.disabled = false;<br />
// in window.onload<br />
recordCtlBut = document.getElementById("record_ctl_but");<br />
recordCtlBut.onclick = function () {<br />
if (!recorder) {<br />
// start recording<br />
recordCtlBut.value = "S<strong>to</strong>p";<br />
recorder = audioStream.record();<br />
// set the maximum audio clip length <strong>to</strong> 10 seconds<br />
recordTimer = setTimeout(s<strong>to</strong>pRecording, 10000);<br />
} else<br />
s<strong>to</strong>pRecording();<br />
};<br />
function s<strong>to</strong>pRecording() {<br />
clearTimeout(recordTimer);<br />
var audioFile = recorder.s<strong>to</strong>p();<br />
useAudioFile(audioFile);<br />
// reset <strong>to</strong> allow new recording session<br />
recorder = null;<br />
recordCtlBut.value = "Record";<br />
}<br />
<br />
You can implement the above feature using the Web Real-Time Communication API that gives you early access <strong>to</strong><br />
Experimental Browser Features.<br />
https://labs.ericsson.com/developer-community/blog/beyond-html5-audio-capture-web-browsers<br />
1.1 Mobile Web App Frameworks<br />
Finally, if you are creating a mobile web application with a framework like PhoneGap-Callback you have access <strong>to</strong><br />
the capture method that will enable you <strong>to</strong> record <strong>and</strong> transmit audio or video without the requirement of Flash.<br />
The following is an example using phonegap 1.4.1 – The methods have changed since 1.0 which ADF Mobile currently<br />
resides on.<br />
http://docs.phonegap.com/en/1.4.1/phonegap_media_capture_capture.md.html#Capture<br />
<br />
<br />
<br />
// Called when capture operation is finished<br />
//<br />
function captureSuccess(mediaFiles) {<br />
var i, len;<br />
for (i = 0, len = mediaFiles.length; i < len; i += 1) {<br />
uploadFile(mediaFiles[i]);<br />
}<br />
© 2012. Fishbowl Solutions, Inc.