Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser extension not detecting offscreen canvas passed to webworker? #149

Open
kevzettler opened this issue Apr 2, 2020 · 13 comments
Open

Comments

@kevzettler
Copy link

The browser extension doesn't seem to be detecting my a canvas that I have passed to a webworker

const offscreen = canvas.transferControlToOffscreen();
const worker = new Worker();
worker.postMessage(
  {
    type: "main/canvas-init",
    payload: {
      canvas:  offscreen,
      width: window.innerWidth,
      height: window.innerHeight,
      player: fetchLocalStoragePlayerData(),
    }
  },
  [offscreen]
);

Is this supported? Should I manually use the spector.js lib instead?

@sebavan
Copy link
Member

sebavan commented Apr 2, 2020

Yup unfortunately it is not supported and even the lib would not be working due to the way we capture texture.

As this is getting more and more common, I really need to work on it but I won t have time before a month I guess.

@kevzettler
Copy link
Author

Thanks @sebavan Any notes on the work needed? Maybe I or other community could hack on it.

@sebavan
Copy link
Member

sebavan commented Apr 2, 2020

Feel free that would be perfect, I would say at first we would need to detect the offscreen and be able to record the calls to them by simply disabling the texture captures (who relies on canvas2D internally).

This would be a great start :-)

@XiaoDiDiDa
Copy link

is there any progress of this ticket?

@sebavan
Copy link
Member

sebavan commented Jul 18, 2022

Not at the moment, would would like to give it a try ?

@Jeggery
Copy link

Jeggery commented Jan 3, 2024

It has been three years and I really hope to see this feature implemented

@sebavan
Copy link
Member

sebavan commented Jan 3, 2024

I wish I had more time, but I will not be able to work on it unfortunately. As it is open source, do you want to give it a try ?

@Jeggery
Copy link

Jeggery commented Jan 4, 2024

I wish I had more time, but I will not be able to work on it unfortunately. As it is open source, do you want to give it a try ?

This is a lot of difficulty for me, and I still need to delve deeper into the Spector source code and webgl principles

@junyuecao
Copy link

junyuecao commented Jan 11, 2024

@sebavan I created a PR which might support this feature.
#298

@Jeggery Maybe you can have a try.

BTW, the extension is based on Chrome extension manifest versoin 2 which is deprecated and can't be update anymore without upgrading to version 3

@pmhpereira
Copy link

Hey @junyuecao.
I wanted to test your PR, but I haven't been able to compile your fork locally.
I ran npm install and npm run build and I'm getting a lot of typescript errors.

@junyuecao
Copy link

@pmhpereira
Could you try with npm run start? It works on my Ubuntu 20.04

image

@sebavan
Copy link
Member

sebavan commented Feb 29, 2024

I completely missed all of this !!! I am so sorry @junyuecao I will have a deep look ASAP but it sounds really good !!!

@junyuecao
Copy link

@sebavan
I think the problem is that Google have deprecated the Chrome extesion manifest V2 so the extension can not be updated without updating to V3. I am not that familliar with Chrome extension so I didn't migrate to V3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants