screen sharing
Some checks failed
Deploy / deploy (push) Successful in 35s
Deploy / publish-web (push) Failing after 22s

This commit is contained in:
2025-12-26 17:36:30 +06:00
parent 4f59cbcf65
commit 4d5db12e1b
2 changed files with 3 additions and 2 deletions

View File

@@ -148,7 +148,7 @@ export default function (io: SocketServer, router: types.Router) {
}
})
socket.on('produce', async ({ transportId, kind, rtpParameters }, cb) => {
socket.on('produce', async ({ transportId, kind, rtpParameters, appData }, cb) => {
if (!socket.data.joined) {
consola.error('Peer not joined yet')
cb({ error: 'Peer not joined yet' })
@@ -166,7 +166,7 @@ export default function (io: SocketServer, router: types.Router) {
}
try {
const producer = await transport.produce({ kind, rtpParameters, appData: { socketId: socket.id } })
const producer = await transport.produce({ kind, rtpParameters, appData: { ...appData, socketId: socket.id } })
socket.data.producers.set(producer.id, producer)

View File

@@ -55,6 +55,7 @@ export interface ClientToServerEvents {
transportId: types.WebRtcTransport['id']
kind: types.MediaKind
rtpParameters: types.RtpParameters
appData: { source: 'share' | string }
},
cb: EventCallback<{ id: types.Producer['id'] }>
) => void