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

Unable to run lightning on QT5 browser #491

Open
MikePask opened this issue Jun 19, 2023 · 3 comments
Open

Unable to run lightning on QT5 browser #491

MikePask opened this issue Jun 19, 2023 · 3 comments

Comments

@MikePask
Copy link

I have been trying to compile a version of lightning that will run on QT5. The issue I currently have is ImageData() is not a constructor. ImageData constructor is not available on this browser, QT5 is similar to safari 7. ImageData constructor appears to be available from Safari 8.

@erikhaandrikman
Copy link
Contributor

Are you using the canvas2d renderer? And is this line causing the error?

const imageData = new ImageData(new Uint8ClampedArray(options.source.buffer), options.w, options.h);

@MikePask
Copy link
Author

Yes I am and that is the line.

@erikhaandrikman
Copy link
Contributor

https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData is available since Safari 8 but we can try to fallback to createImageData() method, that is available since Safari 4: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createImageData

I've added a quick implementation for you to test: https://github.com/rdkcentral/Lightning/compare/feat/c2d-imagedata-fallback if this works we can do a proper implementation

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

3 participants