How to measure delay to broadcaster?

Hello community. I would like to ask if someone know how to read the delay to broadcaster from the iframe twitch player.
The only way i found is that the user manually go to the settings - advanced - show video stats.
But i need this value, because i must warn those users who are over X seconds of delay, because this is a requirement.
There is a way to read this value somehow?

The extension javascript helper onContext callback has info about the stream, which includes among other things hlsLatencyBroadcaster.