@@ -35,24 +35,30 @@ You can see what people are building with Trystero [here](https://github.com/jer
3535
3636## Contents
3737
38- - [ How it works] ( #how-it-works )
39- - [ Get started] ( #get-started )
40- - [ Listen for events] ( #listen-for-events )
41- - [ Broadcast events] ( #broadcast-events )
42- - [ Audio and video] ( #audio-and-video )
43- - [ Advanced] ( #advanced )
44- - [ Binary metadata] ( #binary-metadata )
45- - [ Action promises] ( #action-promises )
46- - [ Progress updates] ( #progress-updates )
47- - [ Encryption] ( #encryption )
48- - [ React hooks] ( #react-hooks )
49- - [ Connection issues] ( #connection-issues )
50- - [ Running server-side (Node, Deno, Bun)] ( #running-server-side-node-deno-bun )
51- - [ Supabase setup] ( #supabase-setup )
52- - [ Firebase setup] ( #firebase-setup )
53- - [ API] ( #api )
54- - [ Strategy comparison] ( #strategy-comparison )
55- - [ How to choose] ( #how-to-choose )
38+ - [ ✨🤝✨ Trystero] ( #-trystero )
39+ - [ Contents] ( #contents )
40+ - [ How it works] ( #how-it-works )
41+ - [ Get started] ( #get-started )
42+ - [ Listen for events] ( #listen-for-events )
43+ - [ Broadcast events] ( #broadcast-events )
44+ - [ Audio and video] ( #audio-and-video )
45+ - [ Advanced] ( #advanced )
46+ - [ Binary metadata] ( #binary-metadata )
47+ - [ Action promises] ( #action-promises )
48+ - [ Progress updates] ( #progress-updates )
49+ - [ Encryption] ( #encryption )
50+ - [ React hooks] ( #react-hooks )
51+ - [ Connection issues] ( #connection-issues )
52+ - [ Running server-side (Node, Deno, Bun)] ( #running-server-side-node-deno-bun )
53+ - [ Supabase setup] ( #supabase-setup )
54+ - [ Firebase setup] ( #firebase-setup )
55+ - [ API] ( #api )
56+ - [ ` joinRoom(config, roomId, [onJoinError]) ` ] ( #joinroomconfig-roomid-onjoinerror )
57+ - [ ` selfId ` ] ( #selfid )
58+ - [ ` getRelaySockets() ` ] ( #getrelaysockets )
59+ - [ ` getOccupants(config, roomId) ` ] ( #getoccupantsconfig-roomid )
60+ - [ Strategy comparison] ( #strategy-comparison )
61+ - [ How to choose] ( #how-to-choose )
5662
5763---
5864
@@ -649,6 +655,12 @@ the same namespace will return the same room instance.
649655 [ ` Libp2pOptions ` ] ( https://libp2p.github.io/js-libp2p/types/libp2p.index.Libp2pOptions.html )
650656 where you can specify a list of static peers for bootstrapping.
651657
658+ - ` manualRelayReconnection ` - ** (optional, 🐦 Nostr and 🌊 BitTorrent only)**
659+ Boolean (default: ` false ` ) that when set to ` true ` disables
660+ automatically pausing and resuming reconnection attempts when the browser
661+ goes offline and comes back online. This is useful if you want to manage
662+ this behavior yourself.
663+
652664- ` roomId ` - A string to namespace peers and events within a room.
653665
654666- ` onJoinError(details) ` - ** (optional)** A callback function that will be
@@ -893,6 +905,18 @@ console.log(trystero.getRelaySockets())
893905// }
894906```
895907
908+ ### ` pauseRelayReconnection() `
909+
910+ ** (🐦 Nostr, 🌊 BitTorrent only)** Normally Trystero will try to automatically
911+ reconnect to relay sockets unless ` manualRelayReconnection: true ` is set in
912+ the room config. Calling this function stops relay reconnection attempts until
913+ ` resumeRelayReconnection() ` is called.
914+
915+ ### ` resumeRelayReconnection() `
916+
917+ ** (🐦 Nostr, 🌊 BitTorrent, only)** Allows relay reconnection attempts to resume.
918+ (See ` pauseRelayReconnection() ` above).
919+
896920### ` getOccupants(config, roomId) `
897921
898922** (🔥 Firebase only)** Returns a promise that resolves to a list of user IDs
0 commit comments