Jump to content

Wedged

Member
  • Posts

    4
  • Joined

  • Last visited

Wedged's Achievements

  1. Is there a way to know the exact reference to a video stored in the squarespace library. I would like to acces it via a url Thank you
  2. Hi I'm trying to dynamically change the source of a video with a button click. I have several videos to display and would love to be able the user to change them when needed. I have tried it with a normal button and a code element. I have added code: <script> function changeVideoSource() { // JavaScript code to change the video source // For example: var video = document.getElementById('block-yui_3_17_2_1_1709155643233_4986'); video.src = 'https://youtu.be/7m94ip38UKs?si=YEmrvTrkIkR6Zqgw'; console.log('Video source changed Successfully:', video.src); alert('Video source changed successfully!'); } </script> <button onclick="changeVideoSource()">Change Video Source</button> "Video source changed. Successfully: https://youtu.be/7m94ip38UKs?si=YEmrvTrkIkR6Zqgw" But the source doesnt change. Can you see any thing I'm doing wrong?
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.