Const
The function to update the primary transport object.
The function to update the primary transport creation state.
The function to update the local transport object.
The function to update the local transport creation state.
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.