0

Here's one that's got me a bit confused on how to do something. I have a broadcast TV channel and depending on the programme it can either be in 16:9 or 4:3. So basically there are aspect ratio switches, live during broadcast. Quite common when old content is being shown.

If I've put a graphic on screen at position 1000, 40 for example and then the aspect ratio changes, how do I detect that aspect ratio has changed, so I can put the graphic in the correct 4:3 position.

Or is there a something that is done in the CSS.

Thank you in advance.

2 Answers2

0

This functionality should be achievable using extensions to video/broadcast for playback of selected components:

https://developer.hbbtv.org/references/apis/scheduled-content-and-hybrid-tuner-apis/extensions-to-video-broadcast-for-playback-of-selected-components/

One should be able to utilize method: AVComponentCollection getComponents( Integer componentType ) of the video/broadcast object with componentType set to video type according to table below:

component type constants

The AVVideoComponent object representing the video has readonly Number aspectRatio property as documented here:

https://developer.hbbtv.org/references/apis/shared-utility-classes-and-features/extensions-for-playback-of-selected-media-components/

0

Really sorry to hear about implementations across different receivers. It might be of value to consult the appendix A.2.14 of the standard document ETSI TS 102 796 V1.6.1 (2021-04) which lays out the rules for presentation, scaling and positioning of video depending on aspect ratio.