Safari vs Browser Widget

Andre Alves Garzia andre at
Fri Nov 30 04:53:27 EST 2018


I am not expert in the widget but I do know quite a lot about browsers. 
Those APIs are restricted access API which usually require some sort of 
configuration on the browser library you're using when building your 
product, which is a convoluted way to say that LiveCode HQ proabably 
needs to set something on libbrowser for this to work out of the box.

I have checked the LC source code and found that the browser 
initialization depends on some factory called `MCBrowserFactoryRef` 
which is an abstraction on the browser engine being used. In your macOS 
case, I don't know if it is using CEF or WebKit but it if is CEF then 
there is a "enable-media-stream" argument that is usually passed via 
command-line parameters but in our case it probably need to be passed 
via `t_args` in the calls to `CefExecuteProcess()`. I am sure there is a 
corresponding WebKit thing to do but I am not sure what.

These kind of switches are needed because Camera APIs are sensitive and 
can lead to privacy abuse and security exploits, so they tend to be 
disabled by default unless configured or asken for permission. In case 
of embeddable browser libraries, they usually lack the UI elements to 
ask for permission, so in their case it is is usually something you 
configure in code.

You might ask HQ to add the CEF param as a property for the widget. It 
might be easy to add.

On 30/11/2018 00:04, Dan Friedman via use-livecode wrote:
> Greeting!  I am hoping someone has an answer for this…
> I am working on a HTML5 web page that accesses the device's camera.  When I open the url in Safari (on my Mac or iOS device), I am asked if it's ok to use the camera and everything works perfectly!   However, if I load this same url in the Browser Widget (or a plain native browser), it doesn’t ask to use the camera and it all fails.   Is this a limitation of the implementation of the browser in LiveCode, or is there a setting I have to set?
> Thank you!
> -Dan
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list