Web Camera access allowed by default.

246 views
Skip to first unread message

minojs...@gmail.com

unread,
Feb 13, 2020, 1:43:41 PM2/13/20
to PHP Desktop
My PHP application uses the Web Camera through the use of webcam.js. But PHP Desktop by default restricts access. How can I allow access by default?

Thank you,
Hoping for a speedy reply.

Terry J

unread,
Feb 13, 2020, 2:42:17 PM2/13/20
to PHP Desktop
Been a long time since I used PHP Desktop (use to use in training sessions a lot). Seems I recall dealing with on student issue and solved by:


Cannot swear to it working, but best my ole memory recalls:

Forces to use chrome camera app when camera icon is clicked.

Example:

command_line_switches: {
"lang": "en",
"enable-media-stream": "",
"force-use-chrome-camera": ""
},

From settings.json:

"chrome": {
       
"log_file": "debug.log",
       
"log_severity": "default",
       
"cache_path": "",
       
"external_drag": true,
       
"external_navigation": false,
       
"reload_page_F5": false,
       
"devtools_F12": false,
       
"remote_debugging_port": 0,
       
"command_line_switches": {
 
"lang": "en",
 
"enable-media-stream": "",
 
"force-use-chrome-camera": ""
 
},
       
"enable_downloads": true,
       
"context_menu": {
           
"enable_menu": false,
           
"navigation": true,
           
"print": false,
           
"view_source": false,
           
"open_in_external_browser": true,
           
"devtools": false
       
}
   
}

minojs...@gmail.com

unread,
Feb 13, 2020, 10:05:00 PM2/13/20
to PHP Desktop
Hi Terry J,

Thanks alot for that solution, it got the job done.
Works like a charm.

Terry J

unread,
Feb 13, 2020, 10:27:21 PM2/13/20
to PHP Desktop
Glad it worked out for you!

Christine Sanjaya

unread,
Oct 6, 2020, 5:22:08 AM10/6/20
to PHP Desktop
Hello All, 

I'm using webcam.js too, But still cannot access the webcam. Could you share your html code that works to access the webcam? 
I already add these line in my setting.json but still not works : 
        "command_line_switches": {
"enable-media-stream": "",
"force-use-chrome-camera": ""
},

Any help will be very appreciated. Thank you. 

Regards, 
Christine 

Reply all
Reply to author
Forward
0 new messages