0

I am working on WebRTC video call using Twilio and Firebase as described in this blog post.

My website (e.g. http://example1.com) doesn't have SSL certificate and so this application cannot use my camera and microphone. So I am thinking of getting another domain with SSL (e.g. https://example2.com) and putting this application there.

Thereafter I want to embed this application (https://example2.com) into http://example1.com, but I am not sure if by after embedding https://example2.com on http://example1.com, it will still be able to access the camera and microphone.

So basically, I want to create something like this, where we can just embed the pubnub code into any website, irrespective of SSL certificate.

Also how do I pass the userid from my website to the application? TIA

AL.
  • 36,815
  • 10
  • 142
  • 281
Gaurav
  • 47
  • 7
  • 1
    You'll need https across the board. When you state: "where we can just embed the pubnub code into any website, irrespective of SSL certificate", note that "any website" will need https too for this to work. – Michael Gorham Dec 13 '16 at 16:26
  • If certs in general are your problem, what about something like https://letsencrypt.org/ ? – Kristen Waite Dec 13 '16 at 20:26

1 Answers1

3

What you are trying to do will be difficult, because CORS is one thing, and mixing http/https is not recommended.

You are better off just going with https across the board. Get yourself a wildcard SSL certificate, so that any site eg, www.abc.example1.com, www.def.example1.com will all be supported.

Mikkel
  • 7,693
  • 3
  • 17
  • 31