Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

check the connection for RTMFP/RTMP

Avatar

Former Community Member

Hello,

I would like to report to the user his connection changes.

Is it possible using some addEventlistener?

Thank you in advance,

Kioshin10

1 Reply

Avatar

Former Community Member

Hi,

When a user enters his connection is either rtmfp or rtmp. It doesn't change while he is connected.

You can find the type of connection a user has by checking his userDescriptor i.e. userDesc.isRTMFP is true or false.

However, you can definitely detect when the streaming changes from p2p to hub-spoke and vice versa which depends on RTMFP and many other factors.

For detecting p2p changes, you can do _streamManager.addEventListener(StreamEvent.CONNECTION_TYPE_CHANGE,onConnectionTypeChange) and handle it.

Hope this helps

Thanks

Regards

Hironmay Basu