LH-265-enable-audio-in-mediasoup #16
@ -22,17 +22,20 @@
|
||||
2. Run the `npm start:prod` command to start the server in production mode.
|
||||
(To connect to the terminal, use `pm2 log video-server`)
|
||||
|
||||
---
|
||||
|
||||
### Web client
|
||||
|
||||
- The server will start by default on port 3000, and the ssl certificates will have to be configured
|
||||
- The web client can be accessed using the /sfu path
|
||||
ex: http://localhost:3000/sfu/?assetId=1&&accountId=1&producer=true&assetName=Adi&assetType=linx
|
||||
ex: https://HOST/sfu/?assetId=1&&accountId=1&producer=true&dest_asset_id=75&assetName=Adi
|
||||
assetId = asset id of the unit on which you are doing the test
|
||||
accountId = account id of the unit on which you are doing the test
|
||||
producer = it will always be true because you are the producer
|
||||
(it's possible to put false, but then you have to have another client with producer true)
|
||||
assetName = asset name of the unit on which you are doing the test
|
||||
assetType = asset type of the unit on which you are doing the test
|
||||
dest_asset_id= the addressee with whom the call is made
|
||||
- To make a call using this client, you need a microphone and permission to use it
|
||||
- For any changes related to the client, the command `npm run watch' will have to be used to generate the bundle.js used by the web client
|
||||
|
||||
### Demo project
|
||||
The demo project used initially and then modified for our needs `https://github.com/jamalag/mediasoup2`
|
||||
|
@ -15,7 +15,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
|
||||
@ -130,8 +129,6 @@ const streamSuccess = (stream) => {
|
||||
|
||||
videoParams = {
|
||||
track: videoTrack,
|
||||
// codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'),
|
||||
// codec : 'video/vp9',
|
||||
...videoParams
|
||||
}
|
||||
|
||||
@ -142,14 +139,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 = () => {
|
||||
@ -190,7 +179,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
|
||||
@ -201,7 +189,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()
|
||||
|
Loading…
Reference in New Issue
Block a user