I am using getUserMedia to get access to web cam. I have a function which toggle on and off the video doing the following: 
  var videoTracks = this.stream.getVideoTracks();
  if (videoTracks.length === 0) {
    trace('No local video available.');
    return;
  }
  trace('Toggling video mute state.');
  for (var i = 0; i < videoTracks.length; ++i) {
    videoTracks[i].enabled = !videoTracks[i].enabled;
  }
  trace('Video ' + (videoTracks[0].enabled ? 'unmuted.' : 'muted.'));
How can receive an event when the the value of enabled is changed? I tried to use Object.observe, but it doesn't work.
                        
As far as I can tell there currently is no event fired/callback invoked when the
enabledproperty changes.From here:
You might have to build this mechanism yourself:
According to the spec this should be part of the MediaStreamTrack interface eventually:
I tried assigning a function to a track's
onmutein Chrome (43) but it never got called (looks like this is not implemented yet).