nick_sh Posted July 8 Posted July 8 (edited) I'm trying to reuse a video block for a different purpose with javascript. Is it possible somehow to get a full link to video source via code or by other means (e.g. asset library)? Currently video source in html is shown as a blob: <video src="blob:https://website-los-angeles.squarespace.com/ac379584-faf4-48a1-b350-2a88216df79b" playsinline="" webkit-playsinline="" data-poster="https://video.squarespace-cdn.com/content/v1/55f9c8c4e4b09104215bfc07/6b464599-d27c-4311-91da-015f05522614/thumbnail" ></video> Edited July 8 by nick_sh Try new Squrespace ID & class finder Chrome Extension ✔ Supports Fluid Engine ✔ Generate Media Queries code ✔ Toggle IDs with Option / Alt ____ Hire me for SquareSpace development
Solution HoaLT Posted July 8 Solution Posted July 8 (edited) 14 hours ago, nick_sh said: I'm trying to reuse a video block for a different purpose with javascript. Is it possible somehow to get a full link to video source via code or by other means (e.g. asset library)? Currently video source in html is shown as a blob: <video src="blob:https://website-los-angeles.squarespace.com/ac379584-faf4-48a1-b350-2a88216df79b" playsinline="" webkit-playsinline="" data-poster="https://video.squarespace-cdn.com/content/v1/55f9c8c4e4b09104215bfc07/6b464599-d27c-4311-91da-015f05522614/thumbnail" ></video> Basically, hosted videos in squarespace are delivered as HLS (HTTP Live Streaming). You can find their URL by following these below steps: 1. Open the dev tool from browser 2. Hover the video element and find video block 3. Get data in attribute "data-poster" 4. Replace the slug /thumbnail with /playlist.m3u8 to get the right URL for hosted video This article (aff link) - non aff link describes super detail about the hosted video as well as the steps to get it. You can take it a look to find your own result Edited July 9 by HoaLT Press 👍 or mark my comment as solution if you find my sharing useful 🆒 Squarespace pinchzoom lightbox plugin (affiliate link) 👁🗨 360 degree photo viewer (affiliate link) 📑 Squarespace embed PDF popup (affiliate link)
nick_sh Posted July 9 Author Posted July 9 Thanks. It seems you still require a proper js video player to support m3u8 playbacks, like plyr or videojs 😞 Try new Squrespace ID & class finder Chrome Extension ✔ Supports Fluid Engine ✔ Generate Media Queries code ✔ Toggle IDs with Option / Alt ____ Hire me for SquareSpace development
HoaLT Posted July 9 Posted July 9 (edited) 3 hours ago, nick_sh said: Thanks. It seems you still require a proper js video player to support m3u8 playbacks, like plyr or videojs 😞 If you don't want to get the URL with m3u8, you can try uploading your vide into link editor with custom file Howerver, File uploads must be 20 MB or smaller. Edited July 9 by HoaLT nick_sh 1 Press 👍 or mark my comment as solution if you find my sharing useful 🆒 Squarespace pinchzoom lightbox plugin (affiliate link) 👁🗨 360 degree photo viewer (affiliate link) 📑 Squarespace embed PDF popup (affiliate link)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment