资 源 简 介
This project contains code samples of HTML5 and the 5th-element library. At the moment, the use of the following objects is shown:
window.camera
window.http
window.audioRecorder
window.speech
window.imageKit
The Camera object lets you take pictures with the built-in camera. Simply use the "capture" method:
if (window.camera && window.imageKit) camera.capture(function(image) { if (typeof image != "number") { var newImage = imageKit.resize(image, 100, 100); var success = camera.send(newImage, "http://localhost:8080/test"); alert(success); } });
As can be seen, the ImageKit object can be used to manipulate images.
The Speech object provides a method for speech synthesis:
if (window.speech) { var result = speech.generate("excellent speech synthesis"); if