ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.17k stars 619 forks source link

Video.js plugin does not use the provided iceServers #6292

Open wheelbarrow777 opened 3 months ago

wheelbarrow777 commented 3 months ago

Short description

In https://github.com/ant-media/videojs-webrtc-plugin, the iceServers provided in the player.src() call is not used in the NPM package.

player.src({
  src: 'ws://localhost:5080/LiveApp/stream1.webrtc',
  iceServers: '[ { "urls": "stun:stun1.l.google.com:19302" } ]'
});

In https://www.npmjs.com/package/@antmedia/videojs-webrtc-plugin?activeTab=code, navigate to /dist/videojs-webrtc-plugin.js. At line 3858, the RTCPeerConnection config used is this.peerconnection_config. this.peerconnection_config is defined once and never changed at line 2869.

Correct behavior would be to change line 3858 to this.remotePeerConnection[streamId] = new RTCPeerConnection(this.pcConfig);, as this.pcConfig is the configuration parsed from the src.

mekya commented 2 months ago

Hi @wheelbarrow777,

Thank you for the report. We've put it to the backlog.

If you want us to make this a priority, please reach out to contact@antmedia.io or continue your discussion with the support channel.

Cheers Oguz