Newbie here. I’m trying to use Looms embedSDK and having some trouble. I have the Javascript to Bubble element on the page and an HTML element. I want the video to display when a button is clicked.
- Here is the script I have in the Run javascript:
// Load the embedSDK (assuming it’s not already loaded)
var script = document.createElement(‘script’);
script.src = “https://cdn.loom.com/v1.0.0/sdk.js”;
document.head.appendChild(script);
// Wait for the script to load
script.onload = function() {
// Fetch the Loom video URL from your Bubble database
var loomUrl = ‘Parent group’s Learning Video’s URL’;
// Fetch the embed code using the embedSDK
loomEmbedSDK.oembed(loomUrl).then(embedData => {
var embedCode = embedData.html;
// Populate the HTML element with the embed code
document.getElementById('video-container').innerHTML = embedCode;
});
};
bubble_fn_embedVideo(embedCode);
-
In the Javascript to Bubble element I have the function named “embedVideo”.
-
In the HTML element I have “JavascripttoBubble A’s value”
Nothing is displaying with this. Where am I going wrong?