Does anyone have an example of Java Script I can put on a Multi Step that would access a Web File and show the video uploaded to that Web File and play it on that form?
document.addEventListener("DOMContentLoaded", function () {
// Define the URL of the Web File where the video is stored
const videoUrl = "https://yourwebsite.com/path-to-video.mp4"; // Replace with your Web File URL
// Find the container where the video will be displayed
const videoContainer = document.getElementById("videoContainer");
// Check if the container is found
if (videoContainer) {
// Create the video element
const videoElement = document.createElement("video");
videoElement.src = videoUrl;
videoElement.controls = true; // Adds video controls
videoElement.width = 600; // Set width as needed
videoElement.height = 400; // Set height as needed
videoElement.autoplay = false; // Set to true if you want autoplay
// Append the video to the container
videoContainer.appendChild(videoElement);
} else {
console.log("Video container not found.");
}
});
Add this JavaScript to the Page Custom JavaScript or the form's JavaScript editor.
let me know, if you need more details. thanks.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.