Embed
- Add the url of your published Wix store to the video settings. In production, it appears that wix uses 2 iFrames objects to add the custom code onto the site: your published domain and the format
https://${projectname}.filesusr.com
. You will need to add both to make the widget visible in production. - In the wix editor, add the element "Embed HTML" located under the "Embed Code" category. Add the following code in the code box replacing the video id src:
<div style="display:flex; justify-content: center;"> <div style="width:576px; height:1024px;"> <iframe id="revnite" src="https://revnite.com/embed/v1/${videoId}" frameborder="0" style="width:100%; height:100%;" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;"> </iframe> </div> </div>
Widgets
With Wix, you can only add the widget on a Paid Plan.
- First ensure your widget url is allowed for your website within your profile settings.
- Go to Settings in your dashboard and click on custom code in the advanced section. In the "Head" section, add the following script tag replacing $profilename with your profile name, excluding the '@' symbol. We will use the "all pages" and "load code on each new page" so the widget will show on all pages.
<script id='RevniteWidgetJs' src='https://revnite.com/js/widget/v1.js?profilename=$profilename' />
- In the section "Body End" add the following snippet replacing the video id:
<script> const settings = { video_id: 'Video:0123456789', fixed: { bottom: '20px', right: '20px', }, fullscreen: { limit: { height: 540, }, }, }; window.addEventListener('message', (e) => { const event = e.data.event; if (event === 'revnite.widget.mounted') { const revniteWidget = document.getElementById('RevniteWidgetiFrame'); revniteWidget?.contentWindow?.postMessage({ event: 'revnite.widget.settings', settings }, 'https://revnite.com'); }; }); </script>