π«Embed player & custom webpages
DEPRECATED
This feature is now deprecated and won't work without beta access anymore. Please contact #api-support in Discord if you are interested.
π« Embed player & custom webpages
Using iframe message passing. Your page can receive "glif ran" events from our embeddable player.
Here is the demo: https://glif.app/embed-test.html
way you can receive results from the embed player. For security reasons, you can only listen to the demo and can't send to it. If you want to run workflow, register a key and run workflows via API. Additionally, check out Val.town + Web Fetcher Block for writing more advanced examples.
Simple example
You can copy a workflow embed code from the glif page in the "share" menu top right. Here is a detailed tutorial on how to do that, with screenshots
Here's a working webpage that runs one of my personal favorite workflows, Farthest Sider Cartoon Generator by @Carlos.
<div id="glif_1718829227200">
<iframe
id="glifIframe"
src="https://glif.app/@Carlos/glifs/clllbhk40000rmj0f7rk3qzfp/embed?mode=last_10_runs&ar=landscape"
style="width: 100%; height: 100%; border: 0"
frameborder="0"
allowfullscreen
></iframe>
</div>
<style>
#glif_1718829227200 {
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
overflow: hidden;
}
</style>Here is the core iframe communication part. Your page receives events from the workflow iframe using postMessage API
A more complex example is Glif Iframe Embed Demo app
Here is a simpler webpage:
If you need help us please contact us in #api-support in our Discord server.
Last updated