Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs

  • Loading branch information...
commit 6f65378d9e2533e80c6bc816938edeb781cb5acd 1 parent 1525db3
@davidhellsing davidhellsing authored
View
2  docs/options/index.rst
@@ -163,6 +163,8 @@ List of options
- :doc:`trueFullscreen` Makes Galleria enter a native fullscreen mode where supported.
+- :doc:`videoPoster` Defines if a poster image should be used for videos
+
- :doc:`vimeo` Sets options for the Vimeo player
- :doc:`wait` Defines if and how Galleria should wait until it can be displayed using user interaction.
View
2  docs/references/changelog.rst
@@ -11,6 +11,8 @@ Changelog
* Added thumbPosition option, same as imagePosition but for thumbnails
* Fixed FF fullscreen class bug
* Fixed FF carousel animation bug
+* Added a poster image for videos, and an option for disabling it.
+* Much improved general video handling using poster images, better media fetching and overall improved user experience
1.2.9
-----
View
5 docs/references/data.rst
@@ -130,7 +130,10 @@ If you want Galleria to fetch thumbnails from the provider API’s, just provide
<a href="http://www.youtube.com/watch?v=GCZrz8siv4Q"><span class="video">Watch this at YouTube</span></a>
-Galleria will first add an empty image as thumbnail, then fetch the thumbnail from the provider and swap the src when ready.
+Since 1.3, Galleria supports poster images for videos. It will automatically fetch posters from it’s provider, but you
+may also manually add one using the ``data-image`` attribute::
+
+ <a href="http://www.youtube.com/watch?v=GCZrz8siv4Q"><span class="video" data-image="/myposter.jpg">Watch this at YouTube</span></a>
Displaying iframes
------------------
View
8 src/galleria.js
@@ -2695,7 +2695,7 @@ Galleria.prototype = {
}( doc.createElement( 'canvas' ) ) );
- Galleria.Fastclick.init( this.get('target' ));
+ //Galleria.Fastclick.init( this.get('target' ));
// bind the gallery to run when data is ready
this.bind( Galleria.DATA, function() {
@@ -2879,7 +2879,7 @@ Galleria.prototype = {
}
self.$( 'images' ).find( 'iframe' ).remove();
- self.$( 'images' ).find( '.galleria-frame' ).css('opacity', 0);
+ self.$( 'images' ).find( '.galleria-frame' ).css('opacity', 0).hide();
var src = self.isFullscreen() && data.big ? data.big : ( data.image || data.iframe ),
image = self._controls.slides[index],
@@ -2917,6 +2917,10 @@ Galleria.prototype = {
w = self._stageWidth,
h = self._stageHeight;
+ if ( $( frame.container ).find('iframe').length ) {
+ return;
+ }
+
$( frame.container ).css({
width: w,
height: h,
Please sign in to comment.
Something went wrong with that request. Please try again.