        testPc.close();
                        restrictions.push('WebRTC API error: ' + err.message);
                        resolve(restrictions);
                    });
                });
                
            } catch (error) {
                restrictions.push('WebRTC not available: ' + error.message);
                return restrictions;
            }
        }
        
        async function gatherCandidates() {
            if (pc) {
                pc.close();
                pc = null;
   