WebRTCAdaptor double initialization

133 views
Skip to first unread message

Schnee Tzel

unread,
Dec 17, 2021, 3:10:37 PM12/17/21
to Ant Media Server
Can someone help me out?

Seems like the WebRTCAdaptor class gets triggered twice, even if I use the index.html example, on my domain, it triggers twice but on the antmedia server instance it works as expected. On all browsers on Ubuntu and on all browsers on Windows. Literally took the index.html file from the antmedia server (with all javascript and stuff) and threw it on a random server and I get

websocket connected
initialized undefined
websocket connected
initialized undefined

it comes from the console.log() inside the callback of the class.

webRTCAdaptor = new WebRTCAdaptor({
debug: false,
websocket_url: "wss://mydomain.tld:5443/WebRTCAppEE/websocket",
mediaConstraints: {
video: {
width: {
min: 720,
max: 1080,
},
aspectRatio: 1.7777,
frameRate: {
min: 20,
max: 30,
ideal: 25,
},
},
audio: true,
},
peerconnection_config: {'iceServers': [{'urls': 'stun:stun1.l.google.com:19302'}]},
localVideoId: "video-element",
bandwidth: "unlimited",
callback: (info, obj) => {
console.log(info, obj);
},
callbackError: function(error, message) {
console.log(error, message);
}
});

On the dev tools' network tab, I see 2 websockets connections

Schnee Tzel

unread,
Dec 18, 2021, 7:23:14 AM12/18/21
to Ant Media Server
The lack of support is frustrating... even with paid license 

Tahir Gölge

unread,
Dec 19, 2021, 11:33:11 AM12/19/21
to Ant Media Server
Hi,

This problem should be resolved in the latest version, which version you are using?

Thanks

Dhimant Bhayani

unread,
Dec 19, 2021, 3:29:56 PM12/19/21
to Tahir Gölge, Ant Media Server
Latest version as in 2.4.1 or the one that will be released next?

Sent from my iPhone

On Dec 19, 2021, at 8:33 AM, 'Tahir Gölge' via Ant Media Server <ant-medi...@googlegroups.com> wrote:

Hi,
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/8e853cc8-5e2d-4eac-b796-eb82f3c0a16bn%40googlegroups.com.

Tahir Gölge

unread,
Dec 19, 2021, 3:38:24 PM12/19/21
to Ant Media Server
It is 2.4.1

Schnee Tzel

unread,
Dec 20, 2021, 3:55:18 AM12/20/21
to Ant Media Server
on 2.4.1

Tahir Gölge

unread,
Dec 20, 2021, 5:36:36 AM12/20/21
to Ant Media Server
Can you give step-by-step scenario of how to recreate this on 2.4.1 .

Schnee Tzel

unread,
Dec 20, 2021, 6:17:30 AM12/20/21
to Ant Media Server
I only thought I was on 2.4.1 since there is no documentation provided. I actually was on 2.3.2 since someone forgot to update their NPM registry https://www.npmjs.com/package/@antmedia/webrtc_adaptor

For now I resorted to include the GitHub release via npm i https://github.com/ant-media/StreamApp/archive/refs/tags/ams-v2.4.1.tar.gz

Even if someone finds the instructions here https://github.com/ant-media/StreamApp/packages/819859, doing npm install @ant-media/webrtc_...@2.4.1 will throw a Not Found from npm. You guys seriously need to update your documentation and properly update any repositories that are out of date. 

Tahir Gölge

unread,
Dec 21, 2021, 4:34:44 AM12/21/21
to Ant Media Server
Hi,

The npm package we use under the github is uploaded into https://npm.pkg.github.com rather than https://registry.npmjs.org , npm uploads the repositories from github to npm.pkg.github.com . To enable github packages from npm go to your ~/.npmrc file and add:


Then you will be able call npm install @ant-media/webrtc_...@2.4.1

For reference:

Thanks 

Tahir Gölge

unread,
Dec 21, 2021, 6:59:00 AM12/21/21
to Ant Media Server
Hi all,

I have also updated the npm registry for your convenience. 


Thanks

Schnee Tzel

unread,
Dec 21, 2021, 7:08:24 AM12/21/21
to Ant Media Server
Great, please check my other issues :) I have also support tickets, please check the emails 
Reply all
Reply to author
Forward
0 new messages