Description
I created an HTMLCanvasElement to render multiple videos on the canvas. I want to set the background color of the canvas element to be transparent, so I set the style backgroundColor to 'transparent', but it is not working on some browsers.
I tried to use the 2D context as suggested in (javascript - How to fill the whole canvas with specific color? - Stack Overflow) to set the canvas background, but it didn’t work. It threw the following error:
DOMException: Failed to execute 'getContext' on 'HTMLCanvasElement': Cannot get context from a canvas that has transferred its control to offscreen.
This also mentioned in this thread:
How can I fix this? Is there any way in VideoSDK that I can use to resolve this issue?
Video SDK version
1.11.10
Evident
In the image above, I tried to set the background color to ‘red’, but it didn’t work.
Devices:
- MacMini M1:
+ Browser: Brave - Version 1.67.123 Chromium: 126.0.6478.126 - Macbook Pro 13 inch:
+ Chrome
