Greetings.
Environment Info:
Server Ubuntu Ubuntu 18.04.4 LTS
Server language Node.js
Client language Javascript
OpenVidu version : 2.22.0
I am trying to add support for IP cameras that server provides to individual classrooms (sessions)
i followed tutorial IP cameras - OpenVidu Docs and server code look like this:
// mine object where i keep info about individual classrooms
// classroom.session is openvidu session object created by function OV.createSession(properties)
var classroom = SESSIONS["6270d936fd31f16e6e51e0a1"]
var connectionProperties = {
type: "IPCAM",
rtspUri: "rtsp://147.251.36.114:7777/live1.sdp",
adaptativeBitrate: true,
onlyPlayWithSubscribers: false,
networkCache: 1000
};
classroom.session.createConnection(connectionProperties).then(async c => {
console.log("IP camera created")
// fetch data after 5 sec about connections
async function f(){
await classroom.session.fetch()
console.log(classroom.session.connections)
}
const myTimeout = setTimeout(f, 5000);
}).catch(error => {console.log("IP camera Error 1");console.log(error)});
when i execute this code i end up with this object in mine console
Connection {
publishers: [],
subscribers: [],
connectionId: 'con_GOM6HauHBR',
status: 'pending',
createdAt: 1663587115979,
activeAt: null,
location: null,
platform: null,
clientData: null,
token: 'wss://polygraf.app:4443?sessionId=ses_VdtYGZKNRU&token=tok_WsM0H0mdLHaLXvyR',
connectionProperties: {
type: 'WEBRTC',
data: undefined,
record: true,
role: 'PUBLISHER',
kurentoOptions: null,
rtspUri: null,
adaptativeBitrate: null,
onlyPlayWithSubscribers: null,
networkCache: null
},
role: 'PUBLISHER',
serverData: undefined
}
But nothing has started. (even if i waited longer) Publisher was never added to this connection and for some reason in connectionProperties there is type set to be WEBRTC not IPCAM how it should be.
I did not found any errors either in console or in OpenVidu log. In OpenVidu i did not found any information about connection with id con_GOM6HauHBR.
Currently i am not sure where i can find out where was a problem. If error is that he could not get to that ip camera (tested form server he could reach it) or if there are any problems like i should in some configurations allow IP cameras
I would appreciate any help or hint where i can find out what went wrong.