Compare commits
No commits in common. "c823f7578cd59ce91b546bed350a91973c05af6c" and "4bb23def42fdccc04e51d30ea58c707797e7de57" have entirely different histories.
c823f7578c
...
4bb23def42
@ -22,20 +22,17 @@
|
||||
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: https://HOST/sfu/?assetId=1&&accountId=1&producer=true&dest_asset_id=75&assetName=Adi
|
||||
ex: http://localhost:3000/sfu/?assetId=1&&accountId=1&producer=true&assetName=Adi&assetType=linx
|
||||
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
|
||||
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
|
||||
assetType = asset type of the unit on which you are doing the test
|
||||
|
||||
### Demo project
|
||||
The demo project used initially and then modified for our needs `https://github.com/jamalag/mediasoup2`
|
||||
|
@ -20373,6 +20373,7 @@ 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
|
||||
@ -20487,6 +20488,8 @@ const streamSuccess = (stream) => {
|
||||
|
||||
videoParams = {
|
||||
track: videoTrack,
|
||||
// codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'),
|
||||
// codec : 'video/vp9',
|
||||
...videoParams
|
||||
}
|
||||
|
||||
@ -20497,6 +20500,14 @@ 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 = () => {
|
||||
@ -20537,6 +20548,7 @@ 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
|
||||
@ -20547,7 +20559,7 @@ const createDevice = async () => {
|
||||
})
|
||||
|
||||
console.log('Device RTP Capabilities', device.rtpCapabilities)
|
||||
console.log('[createDevice] device', device);
|
||||
console.log('[createDevice] 2 device', device);
|
||||
|
||||
// once the device loads, create transport
|
||||
goCreateTransport()
|
||||
|
@ -15,6 +15,7 @@ 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
|
||||
@ -129,6 +130,8 @@ const streamSuccess = (stream) => {
|
||||
|
||||
videoParams = {
|
||||
track: videoTrack,
|
||||
// codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'),
|
||||
// codec : 'video/vp9',
|
||||
...videoParams
|
||||
}
|
||||
|
||||
@ -139,6 +142,14 @@ 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 = () => {
|
||||
@ -179,6 +190,7 @@ 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
|
||||
@ -189,7 +201,7 @@ const createDevice = async () => {
|
||||
})
|
||||
|
||||
console.log('Device RTP Capabilities', device.rtpCapabilities)
|
||||
console.log('[createDevice] device', device);
|
||||
console.log('[createDevice] 2 device', device);
|
||||
|
||||
// once the device loads, create transport
|
||||
goCreateTransport()
|
||||
|
Loading…
x
Reference in New Issue
Block a user