How to stretch video to fill video element

Hi,
I am using the SDK with customized UI. I’d like to eliminate “black bars” from the rendering of the video contained in a video element. Is there any option to stretch the content (preserving aspect) so that the video fills the smallest side of the video element?

Hi bragma,

Thanks for the post. We do not have any interfaces to auto-fill the video element at the moment. You will need to handle the window messages and use the interface SetPos to modify the video size and its position.

Hope this helps. Thanks!

Hi @carson.zoom,
the problem is that since I don’t have information about the source aspect ratio, I cannot use the SetPos to set the video size correctly to remove bars. Moreover if I do it, I will cut away the user name which is overlayed by the sdk.

Hi @bragma,

Thanks for the reply. In Custom UI mode, the video aspect will be either 16:9 or 4:3, it depends on the user settings in Setting -> Video; The corresponding interface is: IVideoSettingContext.EnableAlwaysUse16v9(). You may rely on this to get the aspect ratio.

Hope this helps. Thanks!