fixes for electron

This commit is contained in:
Feross Aboukhadijeh
2016-02-16 17:47:00 -08:00
parent 82db0b7d40
commit 6e1af4543c
2 changed files with 6 additions and 13 deletions

View File

@@ -13,18 +13,9 @@ var util = require('./util')
global.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webtorrent.io', 'wss://tracker.btorrent.xyz' ]
var getClient = thunky(function (cb) {
getRtcConfig('/rtcConfig', function (err, rtcConfig) {
if (err && window.location.hostname === 'instant.io') {
if (err) util.error(err)
createClient(rtcConfig)
} else if (err) {
getRtcConfig('https://instant.io/rtcConfig', function (err, rtcConfig) {
if (err) util.error(err)
createClient(rtcConfig)
})
} else {
createClient(rtcConfig)
}
getRtcConfig('https://instant.io/rtcConfig', function (err, rtcConfig) {
if (err) util.error(err)
createClient(rtcConfig)
})
function createClient (rtcConfig) {

View File

@@ -28,6 +28,8 @@
<button type="submit">Download</button>
</form>
</div>
<script src="client/index.js"></script>
<script>
require('./client')
</script>
</body>
</html>