mirror of
				https://gitlab.crans.org/nounous/ghostream.git
				synced 2025-11-04 00:32:04 +01:00 
			
		
		
		
	Always log ICE change on client
This commit is contained in:
		@@ -10,9 +10,9 @@ startPeerConnection = () => {
 | 
				
			|||||||
    // On connection change, change indicator color
 | 
					    // On connection change, change indicator color
 | 
				
			||||||
    // if connection failed, restart peer connection
 | 
					    // if connection failed, restart peer connection
 | 
				
			||||||
    peerConnection.oniceconnectionstatechange = e => {
 | 
					    peerConnection.oniceconnectionstatechange = e => {
 | 
				
			||||||
 | 
					        console.log("ICE connection state changed, " + peerConnection.iceConnectionState)
 | 
				
			||||||
        switch (peerConnection.iceConnectionState) {
 | 
					        switch (peerConnection.iceConnectionState) {
 | 
				
			||||||
            case "disconnected":
 | 
					            case "disconnected":
 | 
				
			||||||
                console.log(peerConnection.iceConnectionState)
 | 
					 | 
				
			||||||
                document.getElementById("connectionIndicator").style.fill = "#dc3545"
 | 
					                document.getElementById("connectionIndicator").style.fill = "#dc3545"
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
            case "checking":
 | 
					            case "checking":
 | 
				
			||||||
@@ -28,9 +28,6 @@ startPeerConnection = () => {
 | 
				
			|||||||
                peerConnection = null
 | 
					                peerConnection = null
 | 
				
			||||||
                setTimeout(startPeerConnection, 1000)
 | 
					                setTimeout(startPeerConnection, 1000)
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
            default:
 | 
					 | 
				
			||||||
                console.log(peerConnection.iceConnectionState)
 | 
					 | 
				
			||||||
                break
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user