Custom aspect ratio and background color with attachVideo()

I’m able to render participant video to the video-player element with the attachVideo() method, but got some minor issues that’s not alignin to our app:

  • it renders to 16:9 ratio.
  • it adds dark background to the video-player-container

a. Is it possible to customize width and the height of it?

b. Is it possible to make the video-player-background to transparent instead?

c. we are moving to this approach because we’re hit with the too many webGL context limitation, can you confirm if this approach will resolve that issue?

I was able to solve a by modifying the startVideo width and height from the video-sender.

still need help for b and c :slight_smile:

we’ve just also confirmed c
it does solve the too many webGL context issue

just b now :slight_smile:

Hey @shi88.andy

Is it possible to make the video-player-container to transparent instead?

It’s transparent by default. The shadow dom of the video-player-container only includes a canvas, which is transparent by default.

Can you share some code snippets with us for troubleshooting?

Thanks
Vic

sorry forgot to update this, it was our other component that’s making it dark, it’s transparent. thanks