azureamazon-ec2video.jsrecordrtcvideojs-record

Videojs Record not accessing camera/microphone or Share Screen if website running on AWS EC2 & Azure VM


The web page has the capability of using videojs record for screen recording and webcam video recording. It is working fine on localhost and on shared hosting. But I have deployed website on AWS EC2 and Azure VM for testing and videojs record is not working there. As per my understanding it is all javascript and should be working on browsers where ever the site is hosted.

Any clue?

SCREENSHOT-1:

When user clicks on a button within square box, a window should appear for confirmation (shown in SCREENSHOT-2) enter image description here

SCREENSHOT-2

This window appears if site is running on localhost or shared hosting service, but not if site is running on Azure VM or AWS EC2.

enter image description here

Testing Pages

  1. https://clearn.codeschunks.com/test/recordvideo (working)

  2. http://ec2-54-185-50-254.us-west-2.compute.amazonaws.com/index.php/test/recordvideo (not working)


Solution

  • The problem is due to security (https). If you see your connection to codeschunk.com is secure (https) while hosting on EC2 your connection is not secure (http only). You can solve it by two methods.

    1. By making your connection to your hosting on EC2 instance secure (https). It can be done by installing SSL Certificate.

    Or

    1. Follow these steps in your browser (These are for chrome)

    Now it should work.