UNPKG

@gobistories/gobi-web-integration

Version:

This library will let you put your Gobi stories on your site.

65 lines (61 loc) 1.9 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Gobi - Web Integration test</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="/dist/run-config.js"></script> <script type="text/javascript" src="../index.js?v=d85e77"></script></head> <body> <div id="gobi-module-container"></div> <script> const moduleContainerElement = '#gobi-module-container' new gobi.Bubbles({ container: moduleContainerElement, avatarSize: '120px', color: '#BD00FE', isFullHeightMobile: true, on: { 'close': function () { console.log(arguments, this, 'close') }, }, playerOptions: { autoStartWithSound: true, apiBaseUrl: runConfig.apiBaseUrl, on: { 'videoPlay': function () { console.log('videoPlay', arguments, this) }, 'videoPause': function () { console.log('videoPause', arguments, this) }, 'videoComplete': function () { console.log('videoComplete', arguments, this) }, 'clickPrevious': function () { console.log('clickPrevious', arguments, this) }, 'clickNext': function (a, b, c, d) { console.log('clickNext', arguments, this) }, 'loaded': function () { console.log('loaded', arguments, this) }, 'error': function () { console.log('error', arguments, this) }, 'newIteration': function () { console.log('newIteration', arguments, this) }, } }, stories: [ //replace with your stories { id: "demo09", bubbleSrc: './tiny-image.jfif' }, { id: "demo20", bubbleSrc: './tiny-image.jfif' }, ] }) </script> </body> </html>