Hi,
I am developing a web application. It has an iframe with netlogo source

<iframe id="iframe"  src="/web?/assets/modelslib/Code
Examples/MyExamle.nlogo"  width="850" height="600" >
</iframe>

It can`t start working because of html5-browser restriction
<https://developers.google.com/web/updates/2017/09/autoplay-policy-changes>
.
(Developer tools browser console reports the following error:
*Uncaught (in promise) DOMException: play() failed because the user didn't
interact with the document first*)

I tried to add iframe parameters like allow="autoplay" muted = "meted",
autoplay="true". Without success

I tried to simulate user interaction running command
iframe.contentWindow.workspace.evalPrims.runCode("user-yes-or-no?", false,
{"Start"}) (Get strange errors about tokens - *Unexpected token '}'*)

The question is actually how can I solve the issue :

   1. My be  someone know how to configure iframe parameters to cancel user
   interaction need?
   2. How can I use API to run user interaction primitive code? (Is there
   an option to run hidden it and transfer "yes/ok" by user in code?)
   3. Is the other API to simulate user interaction without actualy
   ineracting with use?

Thanks

-- 
Best,
Irena

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netlogo-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netlogo-devel/CA%2BBp_bUsf69RCXvVkUmd9h319seWEF5yz9QjjvZ9pQH3i9hMzA%40mail.gmail.com.

Reply via email to