Jump to content

Is it possible to get full video source link from video block?

Go to solution Solved by HoaLT,

Recommended Posts

Posted (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 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

 

Link to comment
  • nick_sh changed the title to Is it possible to get full video source link from video block?
  • Replies 3
  • Views 161
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Solution
Posted (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"

image.png.223430479040a3dab51c5c2b69b1a07a.png

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 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)

Link to comment
Posted (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

image.png.d97b04fe6aee6e241ea66a31f05ff24a.png

Howerver, File uploads must be 20 MB or smaller.

Edited 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)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.