Skip to content

slick vimeo embedding for squarespace, includes post-play callbacks

Notifications You must be signed in to change notification settings

jackphelps/overplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVERPLAY.JS

As in, it plays over something and it also does something when the playing is over.

Requires: YUI3 & Vimeo, tested with specific Squarespace themes but should work anywhere.

Specifically, its goal is to smoothly embed a full-size, auto-playing video upon a click of the target image, and then take an action when the playing is done, like replace the embed with some HTML or the original image, leading to a much smoother experience for the watcher.

Example: https://theplanaproj.com

This script is designed to work with a few squarespace themes (Squarespace uses YUI3); it's been tested on Bedford and Marquee, which both have large full-sized images but mediocre vimeo playback options.

This script targets a specific div containing an image (such as Marquee's parallax-item divs with named data-url-id properties). It waits for the DOM to finish loading and then overlays a "play" button and make the entire div clickable. It then sets up a click callback that inserts the embed iframe and sets up Vimeo's 'finish' callback. Upon finishing, it takes more html (e.g. a return to the original image or a call to action) and inserts it back into place of the iframe.

About

slick vimeo embedding for squarespace, includes post-play callbacks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published