Can we detect is someone's internet is bad?

How to check if someone’s internet connection is not fine? for example, if someone joins from a poor internet connection and the call quality drops, then can we detect it? I am using getStats api to check the data transfer. But I need help in checking bad connectivity.
Thanks in advance.