Jump to content
  • 0

Confusion over WebRTC publishing page syntax in Javascript.


Paul
 Share

Question

https://github.com/ant-media/Ant-Media-Server/wiki/WebRTC-Publishing

I'm following the above tutorial. I can manage to get a screen successfully on the page, but the console outputs the following:


browser screen share supported
webrtc_adaptor.js:1184 WebSocket connection to 'wss://myserverIP:5443/WebRTCApp/' failed: Error during WebSocket handshake: Unexpected response code: 200


My question is. code: should the websocket_url look like a b or c?  At the minute, using community edition I can't seem to get a handshake to work. 


a) 

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/",

b) websocket - as shown in some documentation

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/websocket",

c) ( the long URL which is available via the management console)

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/12432dfs34fsd324fsd",

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0
Hi,
Can you specify on which step do you get the error? When exactly does it happen?

Best,
Asim

On Tuesday, April 7, 2020 at 12:09:43 AM UTC+3, Paul wrote:
https://github.com/ant-media/Ant-Media-Server/wiki/WebRTC-Publishing

I'm following the above tutorial. I can manage to get a screen successfully on the page, but the console outputs the following:


browser screen share supported
webrtc_adaptor.js:1184 WebSocket connection to 'wss://myserverIP:5443/WebRTCApp/' failed: Error during WebSocket handshake: Unexpected response code: 200


My question is. code: should the websocket_url look like a b or c?  At the minute, using community edition I can't seem to get a handshake to work. 


a) 

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/",

b) websocket - as shown in some documentation

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/websocket",

c) ( the long URL which is available via the management console)

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/12432dfs34fsd324fsd",

Link to comment
Share on other sites

  • 0


I get this problem when loading the Sample application in my browser.  See below example app: 







On Tuesday, 7 April 2020 11:33:47 UTC+1, mahmut asım Onat wrote:
Hi,
Can you specify on which step do you get the error? When exactly does it happen?

Best,
Asim

On Tuesday, April 7, 2020 at 12:09:43 AM UTC+3, Paul wrote:
https://github.com/ant-media/Ant-Media-Server/wiki/WebRTC-Publishing

I'm following the above tutorial. I can manage to get a screen successfully on the page, but the console outputs the following:


browser screen share supported
webrtc_adaptor.js:1184 WebSocket connection to 'wss://myserverIP:5443/WebRTCApp/' failed: Error during WebSocket handshake: Unexpected response code: 200


My question is. code: should the websocket_url look like a b or c?  At the minute, using community edition I can't seem to get a handshake to work. 


a) 

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/",

b) websocket - as shown in some documentation

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/websocket",

c) ( the long URL which is available via the management console)

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/12432dfs34fsd324fsd",

Link to comment
Share on other sites

  • 0
As I say, I'm somewhat confused as to where the WSS should point..


Below tutorial offers some guidance... but I'm not sure if I need the /websocket ? Or if /websocket represents a socket ID or anything?








On Tuesday, 7 April 2020 11:33:47 UTC+1, mahmut asım Onat wrote:
Hi,
Can you specify on which step do you get the error? When exactly does it happen?

Best,
Asim

On Tuesday, April 7, 2020 at 12:09:43 AM UTC+3, Paul wrote:
https://github.com/ant-media/Ant-Media-Server/wiki/WebRTC-Publishing

I'm following the above tutorial. I can manage to get a screen successfully on the page, but the console outputs the following:


browser screen share supported
webrtc_adaptor.js:1184 WebSocket connection to 'wss://myserverIP:5443/WebRTCApp/' failed: Error during WebSocket handshake: Unexpected response code: 200


My question is. code: should the websocket_url look like a b or c?  At the minute, using community edition I can't seem to get a handshake to work. 


a) 

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/",

b) websocket - as shown in some documentation

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/websocket",

c) ( the long URL which is available via the management console)

var webRTCAdaptor = new WebRTCAdaptor({
websocket_url : "wss://myserverIP:5443/WebRTCApp/12432dfs34fsd324fsd",

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