Update server
This commit is contained in:
parent
56bdbca537
commit
1369491529
@ -20620,16 +20620,17 @@ const createSendTransport = () => {
|
|||||||
console.log('[createSendTransport');
|
console.log('[createSendTransport');
|
||||||
// see server's socket.on('createWebRtcTransport', sender?, ...)
|
// see server's socket.on('createWebRtcTransport', sender?, ...)
|
||||||
// this is a call from Producer, so sender = true
|
// this is a call from Producer, so sender = true
|
||||||
socket.emit('createWebRtcTransport', { sender: true, callId }, ({ params }) => {
|
socket.emit('createWebRtcTransport', { sender: true, callId }, (value) => {
|
||||||
|
|
||||||
|
console.log(`[createWebRtcTransport] value: ${value}`);
|
||||||
|
|
||||||
|
const params = value;
|
||||||
// The server sends back params needed
|
// The server sends back params needed
|
||||||
// to create Send Transport on the client side
|
// to create Send Transport on the client side
|
||||||
if (params.error) {
|
if (params.error) {
|
||||||
console.log(params.error)
|
console.log(params.error)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('[createWebRtcTransport] params', params)
|
|
||||||
|
|
||||||
// creates a new WebRTC Transport to send media
|
// creates a new WebRTC Transport to send media
|
||||||
// based on the server's producer transport params
|
// based on the server's producer transport params
|
||||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#TransportOptions
|
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#TransportOptions
|
||||||
|
@ -262,16 +262,17 @@ const createSendTransport = () => {
|
|||||||
console.log('[createSendTransport');
|
console.log('[createSendTransport');
|
||||||
// see server's socket.on('createWebRtcTransport', sender?, ...)
|
// see server's socket.on('createWebRtcTransport', sender?, ...)
|
||||||
// this is a call from Producer, so sender = true
|
// this is a call from Producer, so sender = true
|
||||||
socket.emit('createWebRtcTransport', { sender: true, callId }, ({ params }) => {
|
socket.emit('createWebRtcTransport', { sender: true, callId }, (value) => {
|
||||||
|
|
||||||
|
console.log(`[createWebRtcTransport] value: ${value}`);
|
||||||
|
|
||||||
|
const params = value;
|
||||||
// The server sends back params needed
|
// The server sends back params needed
|
||||||
// to create Send Transport on the client side
|
// to create Send Transport on the client side
|
||||||
if (params.error) {
|
if (params.error) {
|
||||||
console.log(params.error)
|
console.log(params.error)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('[createWebRtcTransport] params', params)
|
|
||||||
|
|
||||||
// creates a new WebRTC Transport to send media
|
// creates a new WebRTC Transport to send media
|
||||||
// based on the server's producer transport params
|
// based on the server's producer transport params
|
||||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#TransportOptions
|
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#TransportOptions
|
||||||
|
Loading…
Reference in New Issue
Block a user