There is no direct way to detect via javascript if the plugin is disabled in the preferences.
If the plugin is disabled in the preferences, the AJS will still inject it in the DOM and the browser just won't start the plugin.
Other articles you may be interested in
End of Support for Temasys WebRTC Plugin on Safari 12 and onwards