diff --git a/proxy/modernizr-config.json b/proxy/modernizr-config.json deleted file mode 100644 index 1cad4d3..0000000 --- a/proxy/modernizr-config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "minify": true, - "options": [ - "prefixed" - ], - "feature-detects": [ - "test/websockets", - "test/webrtc/datachannel", - "test/webrtc/peerconnection" - ] -} \ No newline at end of file diff --git a/proxy/package.json b/proxy/package.json index 276adcf..cc4cc78 100644 --- a/proxy/package.json +++ b/proxy/package.json @@ -11,7 +11,6 @@ "lint": "cake lint", "build": "cake build", "clean": "cake clean", - "modern": "modernizr -c modernizr-config.json -d static/", "prepublish": "npm run build", "start": "node build/snowflake.js" }, @@ -22,8 +21,7 @@ "license": "BSD-3-Clause", "devDependencies": { "coffeelint": "^1.16.0", - "jasmine": "2.5.2", - "modernizr": "^3.3.1" + "jasmine": "2.5.2" }, "dependencies": { "coffee-script": "^1.12.2", diff --git a/proxy/shims.coffee b/proxy/shims.coffee index 325184c..a0f53ea 100644 --- a/proxy/shims.coffee +++ b/proxy/shims.coffee @@ -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 diff --git a/proxy/static/embed.html b/proxy/static/embed.html index 9efe369..32c26ca 100644 --- a/proxy/static/embed.html +++ b/proxy/static/embed.html @@ -3,7 +3,6 @@ -