Open an Overlay Player as soon as a page loads
When a visitor lands on a page with an Overlay Flow, skip the Launcher or Eye-catcher, and have the Player open automatically.
An Overlay player normally stays closed until a visitor clicks the Eye-catcher. With a short piece of code, you can open it as soon as the page loads.
That works well for a page you link to from an email, a campaign or a sales follow-up, where the visitor has come specifically to watch the Flow.
You can open it on every visit, or only when the link contains a specific URL parameter. We cover both options below.
Before you start
You’ll need:
- an Overlay Flow, published, with the page you want to use set as an Activation Page in the Flow Builder’s Activation tab
- the ReelFlow Install Code working on that page
- the Flow ID, which you’ll find in the Flow Builder, in the Flow Summary flyover. It looks like
F-123456789 - someone who can add a script to your website, such as your developer
This only works with Overlay Flows. An Inline player is already visible on the page, and calling player.show() on an Inline Flow causes an error.
Open the Player up immediately on every visit
Use this when the page exists for the video, for example yoursite.com/watch/.
Add this script to the page, replacing F-123456789 with your Flow ID:
<script>
window.addEventListener('reelflow:ready', () => {
const flow = ReelFlow.getFlow('F-123456789');
if (flow) flow.player.show(); });
</script>
The script waits until ReelFlow has loaded, then opens the Overlay player. If the Flow ID is wrong or the Flow isn’t active on the page, nothing happens and the page loads as normal.
Add the script only to the page where you want this to happen.
If visitors don’t need the floating preview, turn off Show eye-catcher in the Activation tab (or do it programatically via the Player API).
Optional: open the Player on the page, only when using a customised link
Use this when the page includes traffic that shouldn’t see the player pop open most of the time, such as a pricing or product page. The player opens only when the URL contains an extra URL parameter you choose, for example - useful when sharing it via email for example:
https://yoursite.com/pricing/?watch=intro
Visitors who arrive without the extra parameter will see the page as normal.
<script>
window.addEventListener('reelflow:ready', () => {
const params = new URLSearchParams(window.location.search);
if (params.get('watch') !== 'intro') return;
const flow = ReelFlow.getFlow('F-12345678');
if (flow) flow.player.show();
});
</script>
This works alongside UTM tags and the tracking parameters email tools add, so a link like this still opens the player:
https://yoursite.com/pricing/?watch=intro&utm_source=email&utm_campaign=autumn
Autoplay and sound
Opening the player this way doesn’t guarantee that the video or its sound starts by itself. Each visitor’s browser and device decide that (it's part of browser spam prevention), so some visitors will need to press Play or unmute.
For more information, see Configure your player sound preferences.
Developer reference
See the Player API reference for the full list of player methods.