shaka-project / eme_logger

Logs Encrypted Media Extension (EME) events and calls to help investigate issues in premium media sites.
https://chrome.google.com/webstore/detail/eme-call-and-event-logger/cniohcjecdcdhgmlofniddfoeokbpbpb
Apache License 2.0
104 stars 24 forks source link

Disable Pointer Events logging by default #65

Open xhwang-chromium opened 1 year ago

xhwang-chromium commented 1 year ago

Right now when using EME logger, by default it'll log Pointer Events that happened on the HTMLVideoelement (see below for an example). This adds a lot of noise to the log.

We should disable logging Pointer Events by default.

Thu May 18 2023 09:42:32 GMT-0700 (Pacific Daylight Time)
video
HTMLVideoElement pointerrawupdate Event
HTMLVideoElement pointerrawupdate Event instance {
  pointerId: 1,
  width: 1,
  height: 1,
  pressure: 0,
  tiltX: 0,
  tiltY: 0,
  azimuthAngle: 0,
  altitudeAngle: 1.5707963267948966,
  tangentialPressure: 0,
  twist: 0,
  pointerType: "mouse",
  isPrimary: true,
  getCoalescedEvents: Function instance {},
  getPredictedEvents: Function instance {},
  screenX: 100.66667175292969,
  screenY: 255.33334350585938,
  clientX: 62.22222137451172,
  clientY: 92,
  ctrlKey: false,
  shiftKey: false,
  altKey: false,
  metaKey: false,
  button: -1,
  buttons: 0,
  relatedTarget: null,
  pageX: 62.22222137451172,
  pageY: 92,
  x: 62.22222137451172,
  y: 92,
  offsetX: 54.22222137451172,
  offsetY: 84,
  movementX: 5,
  movementY: 0,
  fromElement: null,
  toElement: null,
  layerX: 62,
  layerY: 92,
  getModifierState: Function instance {},
  initMouseEvent: Function instance {},
  view: Window instance,
  detail: 0,
  sourceCapabilities: null,
  which: 0,
  initUIEvent: Function instance {},
}
xhwang-chromium commented 1 year ago

Looks like it not only pointer events, there are also mouse event etc

Fri May 19 2023 09:44:55 GMT-0700 (Pacific Daylight Time)
video
HTMLVideoElement mousemove Event
HTMLVideoElement mousemove Event instance {
  screenX: 1018,
  screenY: 282,
  clientX: 243,
  ...
xhwang-chromium commented 1 year ago

It looks like we can add all these events into the skipEvents in eme-trace-config.js. But I hope there's a better way...

@joeyparrish Do you have any suggestions? Thanks!

joeyparrish commented 8 months ago

I think adding them all to skipEvents seems reasonable, but if you're hoping for a better way, make a pitch! What sort of solution would you like better?