Surveillance Art?

An interesting sounding site, Artificial Senses, which “visualizes sensor data of the machines that surround us to develop an understanding how they experience the world”.

Artificial Senses is a project by Kim Albrecht in collaboration with metaLAB (at) Harvard, and supported by the Berkman Klein Center for Internet & Society. The project is part of a larger initiative researching the boundaries between artificial intelligence and society.

But along the way, so you can “participate”, it prompts you for access to various sensors on the device you are viewing the page from. So for example, your location:

To your camera:

And to your microphone:

Here’s the Javascript:

var touching = true;
var seeing = false;
var hearing = false;
var orienting = false;
var moving = false;
var locating = false;

var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);

// // // // // // // // // // // // // // // // // // // // Seeing

document.getElementById('liveTouching').style.visibility = "visible";
document.getElementById('touchingLiveButton').style.visibility = "visible";

// // // // // // // // // // // // // // // // // // // // Seeing

var constraintsSee = {
  audio: false,
  video: { }
};

function handleSuccessSee() {
    seeing = true;
    document.getElementById('liveSeeing').style.visibility = "visible";
  document.getElementById('seeingLiveButton').style.visibility = "visible";
}
function handleErrorSee(error) {
  console.log('navigator.getUserMedia error: ', error);
}

if (!isSafari) {
  navigator.mediaDevices.getUserMedia(constraintsSee).then(handleSuccessSee).catch(handleErrorSee);
}

// // // // // // // // // // // // // // // // // // // // Hearing

var constraintsHear = {
  audio: true,
  video: false
};

function handleSuccessHear() {
    hearing = true;
    document.getElementById('liveHearing').style.visibility = "visible";
  document.getElementById('hearingLiveButton').style.visibility = "visible";
}
function handleErrorHear(error) {
  console.log('navigator.getUserMedia error: ', error);
}

if (!isSafari) {
  navigator.mediaDevices.getUserMedia(constraintsHear).then(handleSuccessHear).catch(handleErrorHear);
}

// // // // // // // // // // // // // // // // // // // // Orienting

if (!orienting) {
  window.addEventListener('deviceorientation', function(event) {

    if (event.alpha !== null) {
        // orienting = true;
        document.getElementById('liveOrienting').style.visibility = "visible";
      document.getElementById('orientingLiveButton').style.visibility = "visible";
    }

  });
}  


// // // // // // // // // // // // // // // // // // // // Moving

if (!moving) {
  window.addEventListener('devicemotion', function(event) {

    if (event.acceleration.x !== null) {
        moving = true;
        document.getElementById('liveMoving').style.visibility = "visible";
      document.getElementById('movingLiveButton').style.visibility = "visible";
    }

  });
} 

// // // // // // // // // // // // // // // // // // // // Locating

navigator.geolocation.getCurrentPosition(function(position) {

  locating = true;

  document.getElementById('liveLocating').style.visibility = "visible";
  document.getElementById('locatingLiveButton').style.visibility = "visible";

});

One of the things I wanted to do in my (tiny) bit of the new OU level 1 course, a section on “location based computing”, was try to get folk to reflect on how easily tracked we are through our computational devices. (If you want to play along, try this browser based activity sign up for a Microsoft Live account (OU staff/ALs can sign in with their OUCU*oen.ac.uk credentials) and try these notebooks: TM112 Geo Activity Notebooks.)

The same course has a section on the mobile phone system more generally. I’m not sure if it has similarly minded activities that demonstrate the full range of sensors that that can be found on most of today’s smartphones? If not, the Artifical Senses sight might be worth adding as a resource – with a reminder for folk to disable site access to the sensors once they’ve done playing…

Author: Tony Hirst

I'm a lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...