Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wss:// 404 #20

Open
max-mapper opened this issue Nov 21, 2014 · 3 comments
Open

wss:// 404 #20

max-mapper opened this issue Nov 21, 2014 · 3 comments

Comments

@max-mapper
Copy link

Hi, im trying to do an experiment in screensharing:

var quickconnect = require('rtc-quickconnect')

var constraints = {
  audio: false,
  video: {
    mandatory: {
      chromeMediaSource: 'screen'
    },
    optional: []
  }
}


quickconnect('//rtc.io/switchboard/', { ns: 'screenshare-test', data: true, constraints: constraints }).on('dc:open', function(channel, peerId) {
  console.log(channel, peerId)
  // var video = document.createElement('video')
  // video.src = window.URL.createObjectURL(stream)
  // video.autoplay = true
  // document.body.appendChild(video)
})

to use the screen sharing API you must be on an https server. I'm using npm install crisp -g to do this locally in development.

When I run the above code (using browserify) I get the following error:

WebSocket connection to 'wss://rtc.io/switchboard/' failed: Error during WebSocket handshake: Unexpected response code: 404

Is wss:// supported? I can't use ws:// due to mixed protocol errors

@DamonOehlman
Copy link
Member

Yeah wss:// is definitely supported.

Can you try using //switchboard.rtc.io/ rather than //rtc.io/switchboard? The actual service is running at that location there now, and I have some nginx redirects setup but they may only apply to HTTP traffic (which I'll need to fix).

@DamonOehlman
Copy link
Member

Oh, and this is probably of interest too: https://github.com/rtc-io/rtc-screenshare

@DamonOehlman
Copy link
Member

@maxogden I've just double-checked that it is all working and //switchboard.rtc.io/ definitely works when connecting from a page served via HTTPS. It's likely that you will still see that console.log entry you were talking about, though in actual fact it's working. This is because quickconnect is hitting a couple of different endpoints to determine which one is available (Basically I'm transitioning from using primus to not).

I'll look into suppressing that error message as it's pretty disconcerting and it took me a while to remember why it was there also...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants