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.
(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 :
- My be someone know how to configure iframe parameters to cancel user interaction need?
- 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?)
- Is the other API to simulate user interaction without actualy ineracting with use?
Thanks