Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HTML5 Sensitivo

Caio Gondim
November 01, 2012
350

HTML5 Sensitivo

Caio Gondim

November 01, 2012
Tweet

Transcript

  1. API

  2. eventData = { alpha: 0.01042012, // graus beta: 11.34221344, //

    graus gamma: 27.102012102, // graus absolute: true, ... // propriedades de Event } Dados de deviceorientation
  3. eventData = { interval: 200, // milisegundos acceleration: { x:

    0.1534532, // metro/s² y: 3.9876581, // metro/s² z: 1.0092722 // metro/s² }, accelerationIncludingGravity: { x, y, z }, // idem rotationRate: { alpha, beta, gamma } // orientation ... // propriedades de Event } Dados de devicemotion
  4. API

  5. Dados de .getCurrentPosition position = { timestamp: 307770135, // DOMTimeStamp

    coords: { accuracy: 12, // metros latitude: -35.29873363499, // graus longitude: 123.44334887755,// graus altitude: 400.3, // metros (opcional) heading: 45.5, // graus (opcional) speed: 5.4 // m/s (opcional) } }
  6. API

  7. function sucessoCallback(stream) { var video = document.getElementsByTagName(‘video’)[0] video.autoplay = true

    video.src = window.webkitURL.createObjectURL(stream) } Linkando no <video>
  8. API

  9. { }

  10. eventData = { results: [ { confidence: 0.61285305, utterance: ‘praia’

    }, ... ], ... // propriedades de Event } Dados de webkitspeechange
  11. function sucessoCallback( stream ) { var context = new webkitAudioContext()

    var mediaStreamSource = context .createMediaStreamSource( stream ) mediaStreamSource.connect( filter1 ) ... filter1.connect( context.destination ) } Callback
  12. ?