LH-265: Update client

This commit is contained in:
Sergiu Toma 2022-11-29 13:27:33 +02:00
parent 6cc14cdf30
commit c823f7578c

View File

@ -20373,7 +20373,6 @@ console.log('[URL] ASSET_ID', ASSET_ID, '| ACCOUNT_ID', ACCOUNT_ID, '| callId',
console.log('🟩 config', config)
let socket, hub
let doIHaveAudio = false
let device
let rtpCapabilities
let producerTransport
@ -20488,8 +20487,6 @@ const streamSuccess = (stream) => {
videoParams = {
track: videoTrack,
// codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'),
// codec : 'video/vp9',
...videoParams
}
@ -20500,14 +20497,6 @@ const streamSuccess = (stream) => {
console.log('[streamSuccess] videoParams', videoParams, ' | audioParams', audioParams);
goConnect()
// console.log('[streamSuccess]');
// localVideo.srcObject = stream
// const track = stream.getVideoTracks()[0]
// videoParams = {
// track,
// ...videoParams
// }
// goConnect()
}
const getLocalStream = () => {
@ -20548,7 +20537,6 @@ const goCreateTransport = () => {
// server side to send/recive media
const createDevice = async () => {
try {
console.log('[createDevice] 1 device', device);
device = new mediasoupClient.Device()
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#device-load
@ -20559,7 +20547,7 @@ const createDevice = async () => {
})
console.log('Device RTP Capabilities', device.rtpCapabilities)
console.log('[createDevice] 2 device', device);
console.log('[createDevice] device', device);
// once the device loads, create transport
goCreateTransport()