binarykitchen / videomail-client

A wicked npm package to record videos directly in the browser, wohooo!
https://videomail.io
Creative Commons Zero v1.0 Universal
55 stars 19 forks source link

Improve error handling when HTTP header forbid webcam #186

Open binarykitchen opened 2 years ago

binarykitchen commented 2 years ago

When apache header protection is not set to allow camera from the website for security reason (especially for children), the videomail client produces a different error message saying webcam is not available.

Improve this somehow by parsing headers if possible. Watch for these:

content-security-policy: block-all-mixed-content // <-- what is this? block something like webcams?
expires: Wed, 11 Jan 1984 05:00:00 GMT // <-- why does get everything expired? dont you want to use cache?
permissions-policy: geolocation=*, midi=(), sync-xhr=(self "https://echointerpreting.com.au" "https://www.echointerpreting.com.au"), microphone=(), camera=(), magnetometer=(), gyroscope=(), payment=(), fullscreen=(self "https://echointerpreting.com.au" "https://www.echointerpreting.com.au") // <-- whoah, permission policy? never seen before.