This example demonstrates replacing IFRAME-based messaging with the DataChannel SDK.
<iframe src="https://vdo.ninja/?room=myroom&push=cam1&datachannel=true"
style="display:none"></iframe>
// Communicate via postMessage
iframe.contentWindow.postMessage({data: 'hello'}, '*');
const node = new VDONinjaDataChannel();
await node.joinRoom({room: 'myroom', streamID: 'cam1'});
// Direct data channel communication
node.publish({data: 'hello'});
// Subscribe to specific labels
node.subscribe('sensors');
node.addEventListener('data', (e) => {
console.log('Received:', e.detail.data);
});