Confusion over WebRTC publishing page syntax in Javascript.

87 views
Skip to first unread message

Paul

unread,
Apr 6, 2020, 5:09:43 PM4/6/20
to Ant Media Server
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",

mahmut asım Onat

unread,
Apr 7, 2020, 6:33:47 AM4/7/20
to Ant Media Server
Hi,
Can you specify on which step do you get the error? When exactly does it happen?

Best,
Asim

Paul

unread,
Apr 7, 2020, 12:25:50 PM4/7/20
to Ant Media Server


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


Paul

unread,
Apr 7, 2020, 12:29:31 PM4/7/20
to Ant Media Server
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:
Reply all
Reply to author
Forward
0 new messages