The options for creating the send transport.
A promise that resolves when the send transport is created and configured.
const options = {
option: 'video',
parameters: {
islevel: '1',
member: 'John Doe',
socket: socketInstance,
localSocket: localSocketInstance,
device: deviceInstance,
producerTransport: null,
localProducerTransport: null,
transportCreated: false,
localTransportCreated: false,
updateProducerTransport: (transport) => console.log('Primary transport updated:', transport),
updateLocalProducerTransport: (transport) => console.log('Local transport updated:', transport),
updateTransportCreated: (state) => console.log('Primary transport created:', state),
updateLocalTransportCreated: (state) => console.log('Local transport created:', state),
},
};
createSendTransport(options)
.then(() => console.log('Send transport created successfully'))
.catch((error) => console.error('Error creating send transport:', error));
Creates a WebRTC send transport and sets up event handlers for the transport. Supports both primary and local transports with modular handling.