How to get the most updated RTPReceiver and RTPSender in PeerConnectionObserver.java?

I implement my own frame encryptor and decryptor in Jitsi. I modify PeerConnectionObserver.java in react-native-webrtc. To set the frame encryptor, I add in “addStream” function, and then I will loop through all of the RTP Senders to set the frame encryptor. I add my decryptor in “onIceCandidate” and “onAddStream” and then it will loop through all the RTPReceiver and set the decryptor. It is working really well, except when we are doing screen sharing. If we are doing screen share, I immediately could not decrypt another participant’s video, then I tried to add my decryptor in “removeStream” , it works only when I start the screen sharing, when I stop the screen sharing, I could not decrypt video again. I think it it a matter of placement in PeerConnectionObserver.java.

Do you have any recommendations to place this function? I would loop through the most up-to-date rtp senders and rtp receivers. Thank you for help.