Speed up init() by >= 2x

Lazy load the WebTorrent, Chromecast, and Airplay modules
This commit is contained in:
DC
2016-03-26 22:46:55 -07:00
parent 1e6e101c4e
commit 906da4d977
6 changed files with 113 additions and 95 deletions

View File

@@ -30,6 +30,7 @@ module.exports = {
isPaused: true,
mouseStationarySince: 0 /* Unix time in ms */
},
pendingTorrents: {}, /* infohash to WebTorrent handle */
devices: { /* playback devices like Chromecast and AppleTV */
airplay: null, /* airplay client. finds and manages AppleTVs */
chromecast: null /* chromecast client. finds and manages Chromecasts */