OZP With No Remote Connection?

19 views
Skip to first unread message

ccl...@isenpai.com

unread,
Jul 3, 2018, 8:24:37 AM7/3/18
to ozoneplat...@googlegroups.com
My understanding is that OZP is supposed to be able to work completely within the realm of the (HTML5) browser and without the need to hit a remote server, yet almost all of your examples instantiate a client with something like this:  var iwc = new ozpIwc.Client("//aml-development.github.io/ozp-iwc");

Am I missing something?  There was one example that I found that had {peerUrl: "https://localhost:13000"} in it.  Is that how it works without the need for a remote server?

Ozone Custodian

unread,
Jul 3, 2018, 8:46:17 AM7/3/18
to ozoneplatform-users
The cross-widget messaging feature works within the browser, but due to cross-origin browser security policies, the web page and script files (which may be found at https://github.com/aml-development/ozp-iwc) used to start the shared service worker must be hosted on a single domain. The back-end support (other than for simply hosting the page and scripts) is optional, but enables features such as persistent data storage. If you are only developing locally, you could host the IWC peer file and scripts on the same server you are hosting your widgets.

Additional information may be found in the following locations:


ccl...@isenpai.com

unread,
Jul 3, 2018, 8:58:27 AM7/3/18
to ozoneplatform-users
I see.  That was a missing piece for me.

Thanks!
Reply all
Reply to author
Forward
0 new messages