detect-features
Version:
Detect and report browser and hardware features.
19 lines (17 loc) • 391 B
JavaScript
// @ts-check
/**
* Tests for WebRTC support
*
* @returns {boolean}
*/
// @ts-ignore
export default (() => (!!window.RTCPeerConnection && !!window.RTCDataChannelEvent)
// @ts-ignore
|| !!window.webkitRTCPeerConnection
// @ts-ignore
|| !!window.mozRTCPeerConnection
// @ts-ignore
|| !!window.msRTCPeerConnection
// @ts-ignore
|| !!window.oRTCPeerConnection
|| false)();