Jump to content
  • 0

WebRTCAdaptor double initialization


Schnee Tzel
 Share

Question

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
Link to comment
Share on other sites

  • Answers 10
  • Created
  • Last Reply

Top Posters For This Question

10 answers to this question

Recommended Posts

  • 0

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-media-server@googlegroups.com> wrote:

 

Hi,

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

Thanks

 

 

--

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-server+unsubscribe@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.

Link to comment
Share on other sites

  • 0

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_adaptor@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. 

Link to comment
Share on other sites

  • 0

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:

//npm.pkg.github.com/:_authToken={personal_access_token_from_github}

@ant-media:registry=https://npm.pkg.github.com

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

For reference:

Thanks 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...