page-synchronizer
v1.0.14
Published
# Introduction Let us say that you have a simple static page that you want to view together with your friends, and take people to a particular scroll position in real time.
Downloads
32
Maintainers
Readme
A simple scroll position synchronizer
Introduction
Let us say that you have a simple static page that you want to view together with your friends, and take people to a particular scroll position in real time.
You add the following a few lines to the page and then viewing the page becomes collaborative.
<script src="https://unpkg.com/@croquet/croquet"></script>
<script src="https://unpkg.com/[email protected]"></script>
<script type="text/javascript">
if (window.location.search !== "") {
SimplePageView.start({
apiKey: "<your apiKey from https://croquet.io/keys>",
})
}
</script>
Please obtain a Croquet apiKey from Croquet Developer Portal and use a key in above snippets.
A demonstration
You can try it on a page. You can create a new session by providing different ?q=
value, or you can remove the if
test in the snippet and get everybody into the same session.