swipebox icon indicating copy to clipboard operation
swipebox copied to clipboard

load video dynamically

Open ibarral opened this issue 10 years ago • 3 comments

Hello!, it's possible to load video dynamically? (the example only shows how to load images dynamically).

Thanks, and great plugin!

ibarral avatar Jan 29 '15 18:01 ibarral

I would also like this option!

dssilva avatar Apr 10 '15 12:04 dssilva

It works by default as documented here for images: https://brutaldesign.github.io/swipebox/#dynamic

simply use a youtube or vimeo url as documented here: https://brutaldesign.github.io/swipebox/#video

For youtube the url must have a format with "watch" in the url, e.g. https://www.youtube.com/watch?v=XXX

$( '#gallery' ).click( function( e ) { e.preventDefault(); $.swipebox( [ { href:'http://vimeo.com/29193046', title:'My Vimeo Video' }, { href:'big/image2.jpg', title:'My Second Caption' } ] ); } );

The newer url (shortened version) https://youtu.be/XXX did not work for me

Hope this helps

xtra-dev avatar Nov 22 '19 16:11 xtra-dev

Hi, I have the same problem, added video link exactly as You, and film doesn't load. I downloaded newest copy from github, and test only demo, no extra changes.

Where I make a mistake?

Majusek avatar Nov 28 '19 12:11 Majusek