Skip to content

Exposing cursor image (SVG/PNG/...) and dimensions (width, height) #4

@eladalon1983

Description

@eladalon1983

Many of the potential use-cases of this API consist of suppressing the "traditional" capture of the cursor in the video frames, so that it could be redrawn later, other faithfully or after some enhancing modification. Often, this would require a way to discover the original look and size of the cursor. It seems that it would be useful to align on a way to expose those.

Examining for the time being exposure of the image, but not the dimensions...

One way would be to expose some image of the cursor on each CapturedMouseEvent. That seems a bit wasteful, though. For the user agent, this might require some avoidable work with each event. For the Web app, checking whether the cursor changed between two subsequent events, might be less efficient than it could be.

Another way might be to expose a cursor-ID, which could simply be a long, and then introduce a separate API surface which would allow an interested app to query the user agent for the actual image of cursor. An example might be:

partial interface CapturedMouseEvent {
  readonly attribute long cursorId;
};

partial interface CaptureController {
  SVGElement cursorAsSvg(long cursorId);
};

(I'm using SVG as an example. It might very well be that we prefer a different format.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions