mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-08-24 00:02:50 +00:00
Receivers: Store connection state in main process
This commit is contained in:
parent
75f2f3dded
commit
5782fcc3ca
8 changed files with 32 additions and 16 deletions
|
@ -15,12 +15,12 @@ let qrWidth = null;
|
|||
window.addEventListener('resize', (event) => calculateQRCodeWidth());
|
||||
|
||||
connectionMonitor.setUiUpdateCallbacks({
|
||||
onConnect: (connections: string[], connectionInfo: any) => {
|
||||
onConnect: (connections: string[], initialUpdate: boolean = false) => {
|
||||
connectionStatusText.textContent = connections.length > 1 ? 'Multiple devices connected:\r\n Ready to cast' : 'Connected: Ready to cast';
|
||||
connectionStatusSpinner.style.display = 'none';
|
||||
connectionStatusCheck.style.display = 'inline-block';
|
||||
},
|
||||
onDisconnect: (connections: string[], connectionInfo: any) => {
|
||||
onDisconnect: (connections: string[]) => {
|
||||
if (connections.length === 0) {
|
||||
connectionStatusText.textContent = 'Waiting for a connection';
|
||||
connectionStatusSpinner.style.display = 'inline-block';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue