Technique for embedding external video in gallery
stubble
Registered Users Posts: 17 Big grins
I find I have typically have two types of movies to post, short clips that go along with an event's stills, and "feature" movies that stand alone, and might be anywhere from five to fifteen minutes long. For the former, Smugmug's video support works great. The clips go in a gallery with stills, and they tend not to be too long.
But for the "features" that are often too long to put on SmugMug directly, I've been playing with a solution that still allows me to show all my stuff here in a pleasing way. It's based on the official HOWTO for HTML-only gallery pages, but with a small twist, and I thought I'd share it.
First, you need a place to host your video. I like Motionbox and Vimeo, but even YouTube works, so I hear. Any place that allows you to embed video externally.
Starting with an empty gallery, upload a still image to serve as your album thumbnail. A screenshot from your movie works well.
Then, in the gallery's description, place the following, including the <html> tags:
That's it. Here's a sample gallery using the above, with a video from Motionbox:
http://www.smugmug.com/share/gzZhiAKtIBjmQ
Keep the above template in an easy-to-find place and paste it in when you need it. I like this method of hiding the gallery stuff over the official HOWTO because it's less work, you just change one place and you don't have to fiddle with the gallery ID.
Interested in further thoughts or refinements
But for the "features" that are often too long to put on SmugMug directly, I've been playing with a solution that still allows me to show all my stuff here in a pleasing way. It's based on the official HOWTO for HTML-only gallery pages, but with a small twist, and I thought I'd share it.
First, you need a place to host your video. I like Motionbox and Vimeo, but even YouTube works, so I hear. Any place that allows you to embed video externally.
Starting with an empty gallery, upload a still image to serve as your album thumbnail. A screenshot from your movie works well.
Then, in the gallery's description, place the following, including the <html> tags:
<html> <p>Write your description of the movie here. <center> <!-- Paste your provider's embed code below this line--> </center> <!-- Below this we place some CSS to hide the normal gallery components -->[FONT=monospace] [/FONT]<style>.nophotos, .pagenav, .albumNav, #photos {display: none;}</style> </html>
That's it. Here's a sample gallery using the above, with a video from Motionbox:
http://www.smugmug.com/share/gzZhiAKtIBjmQ
Keep the above template in an easy-to-find place and paste it in when you need it. I like this method of hiding the gallery stuff over the official HOWTO because it's less work, you just change one place and you don't have to fiddle with the gallery ID.
Interested in further thoughts or refinements
0
Comments
But, the code could be improved - here's how: Maybe you don't fiddle with the gallery id, but what you end up with is invalid code: a <style> tag is not allowed inside the <body>, and some browsers will ignore it for that reason. With the result that the stuff you want hidden won't be for every viewer.
Much better to use valid code instead. Here's what to do:
It's only a fraction more work (or even less if you use a category for your video galleries), but it's more flexible and won't be ignored as invalid by any browser.
Look through my eyes on Cultural Surfaces! - customizing... currently in a state between limbo and chaos
(the OP above was me under a different profile)