fixes for electron
This commit is contained in:
@@ -13,18 +13,9 @@ var util = require('./util')
|
|||||||
global.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webtorrent.io', 'wss://tracker.btorrent.xyz' ]
|
global.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webtorrent.io', 'wss://tracker.btorrent.xyz' ]
|
||||||
|
|
||||||
var getClient = thunky(function (cb) {
|
var getClient = thunky(function (cb) {
|
||||||
getRtcConfig('/rtcConfig', function (err, rtcConfig) {
|
getRtcConfig('https://instant.io/rtcConfig', function (err, rtcConfig) {
|
||||||
if (err && window.location.hostname === 'instant.io') {
|
if (err) util.error(err)
|
||||||
if (err) util.error(err)
|
createClient(rtcConfig)
|
||||||
createClient(rtcConfig)
|
|
||||||
} else if (err) {
|
|
||||||
getRtcConfig('https://instant.io/rtcConfig', function (err, rtcConfig) {
|
|
||||||
if (err) util.error(err)
|
|
||||||
createClient(rtcConfig)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
createClient(rtcConfig)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function createClient (rtcConfig) {
|
function createClient (rtcConfig) {
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
<button type="submit">Download</button>
|
<button type="submit">Download</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script src="client/index.js"></script>
|
<script>
|
||||||
|
require('./client')
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user