import { RTCPeerConnectionWrapper } from './index'; export default async function initializeNodeWebRTC(): Promise { try { // Use require instead of import to avoid build-time dependency const wrtc = require('@roamhq/wrtc'); return { createPeerConnection: (config?: RTCConfiguration): RTCPeerConnection => { return new wrtc.RTCPeerConnection(config); }, }; } catch (error) { // In Bun compiled binaries, native addons are not available console.warn('Node WebRTC (@roamhq/wrtc) not available:', error); return null; } }