How to use
You can download this git repository or install via
npm install zuck.js
Add/update a story:
Remove a story:
Add/remove a story item:
Stories structure example
A JSON example of the stories object:
In your HTML:
Then in your JS:
- You can use with autoFullScreen option (disabled by default) to emulate an app on mobile devices.
- If you use Ionic or some js that uses
location.hash, you should always disable the “backNative” option which can mess your navigation.
On mobile browsers, video can’t play with audio without a user gesture. So the script tries to play audio only when the user clicks to see the next story. When the story is playing automatically, the video is muted, but an alert is displayed so the user may click to turn the audio on.
Stories links opens in a new window too. This behaviour occurs because most websites are blocked on iframe embedding.