Remove Modernizr dependency

And inline its only use site.
This commit is contained in:
Arlo Breault 2019-05-01 09:26:25 -04:00
parent 25dac378ee
commit f3254e3402
6 changed files with 7 additions and 27 deletions

View file

@ -22,17 +22,15 @@ else
window = this
location = window.location.search.substr(1)
prop = Modernizr.prefixed 'RTCPeerConnection', window, false
if not prop
console.log 'webrtc feature not detected. shutting down'
return
PeerConnection = window[prop]
### FIXME: push these upstream ###
PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection ||
window.webkitRTCPeerConnection
IceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate
SessionDescription = window.RTCSessionDescription ||
window.mozRTCSessionDescription
if typeof PeerConnection isnt 'function'
console.log 'webrtc feature not detected. shutting down'
return
WebSocket = window.WebSocket
XMLHttpRequest = window.XMLHttpRequest