You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The widget **container** option can be set as id string (with "#" as prefix) or element node, so the following are equivalent:
@@ -487,6 +522,8 @@ var gallery = blueimp.Gallery([
487
522
488
523
The URL property name defined by each list object can be configured via the **urlProperty** option. By default, it is set to **href**, which allows to pass a list of HTML link elements as first argument.
489
524
525
+
For images, the **thumbnail** property defines the URL of the image thumbnail, which is used for the indicator navigation displayed at the bottom of the Gallery, if the controls are visible.
526
+
490
527
The object returned by executing the Gallery function (the **gallery** variable in the example code above) is a new instance of the Gallery and allows to access the public [API methods](#api-methods) provided by the Gallery.
491
528
The Gallery initialization function returns **false** if the given list was empty, the Gallery widget is missing, or the browser doesn't pass the functionality test.
492
529
@@ -523,6 +560,9 @@ gallery.close();
523
560
```
524
561
525
562
### Videos
563
+
564
+
#### HTML5 video player
565
+
526
566
The Gallery can be initialized with a list of videos instead of images, or a combination of both:
527
567
528
568
```js
@@ -543,9 +583,8 @@ blueimp.Gallery([
543
583
```
544
584
545
585
The Gallery uses the **type** property to determine the content type of the object to display.
546
-
If the type property is empty or doesn't exist, the default type **image** is assumed.
547
-
548
-
For images, the **thumbnail** property defines the URL of the image thumbnail, which is used for the indicator navigation displayed at the bottom of the Gallery, if the controls are visible.
586
+
If the type property is empty or doesn't exist, the default type **image** is assumed.
587
+
Objects with a video type will be displayed in a [HTML5 video element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video) if the browser supports the video content type.
549
588
550
589
For videos, the **poster** property defines the URL of the poster image to display, before the video is started.
551
590
@@ -586,6 +625,52 @@ It is also possible to define the video sources as data-attribute on a link elem
586
625
</div>
587
626
```
588
627
628
+
#### YouTube
629
+
The Gallery can display [YouTube](https://www.youtube.com/) videos for Gallery items with a **type** of **text/html** and a **youtube** property (configurable via [YouTube options](#youtube-options)) with the YouTube video-ID:
Please note that the Gallery YouTube integration requires a browser with [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/window.postMessage) support, which excludes IE7.
650
+
651
+
#### Vimeo
652
+
The Gallery can display [Vimeo](https://vimeo.com/) videos for Gallery items with a **type** of **text/html** and a **vimeo** property (configurable via [Vimeo options](#vimeo-options)) with the Vimeo video-ID:
Please note that the Gallery Vimeo integration requires a browser with [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/window.postMessage) support, which excludes IE7.
673
+
589
674
### Additional Gallery elements
590
675
It is possible to add additional elements to the Gallery widget, e.g. a description label.
591
676
@@ -654,7 +739,9 @@ The Gallery uses the **type** property of each content object to determine which
654
739
The main type (the string in front of the slash, **text** in the example above) is concatenated with the string **Factory** to create the factory method name, e.g. **textFactory**.
655
740
656
741
#### Example HTML text factory implementation
657
-
Please note that although blueimp Gallery doesn't require [jQuery](http://jquery.com/), the following example uses it for convenience.
742
+
Please note that the textFactory script has to be included after the core Gallery script, but before including the [YouTube](#youtube) and [Vimeo](#vimeo) integration plugins, which extend the textFactory implementation to handle YouTube and Vimeo video links.
743
+
744
+
Please also note that although blueimp Gallery doesn't require [jQuery](http://jquery.com/), the following example uses it for convenience.
658
745
659
746
Extend the Gallery prototype with the **textFactory** method:
660
747
@@ -681,7 +768,7 @@ blueimp.Gallery.prototype.textFactory = function (obj, callback) {
681
768
};
682
769
```
683
770
684
-
Add the **text-content** class to the Gallery CSS:
771
+
Next, add the **text-content** class to the Gallery CSS:
685
772
686
773
```css
687
774
.blueimp-gallery>.slides>.slide>.text-content {
@@ -837,19 +924,23 @@ You can also use the individual source files instead of the standalone minified
The helper script can be replaced by [jQuery](http://jquery.com/) v. 1.7+.
843
-
The fullscreen, indicatorand video source files are optional if their functionality is not required.
932
+
The fullscreen, indicator, video, youtube and vimeo source files are optional if their functionality is not required.
844
933
845
-
The [jQuery plugin](#jquery-plugin) requires [jQuery](http://jquery.com/) v. 1.7+ and the basic Gallery script, while the fullscreen, indicatorand video source files are also optional:
934
+
The [jQuery plugin](#jquery-plugin) requires [jQuery](http://jquery.com/) v. 1.7+ and the basic Gallery script, while the fullscreen, indicator, video, youtube and vimeo source files are also optional:
Copy file name to clipboardExpand all lines: blueimp-gallery.jquery.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "blueimp-gallery",
3
-
"version": "2.9.0",
3
+
"version": "2.10.0",
4
4
"title": "blueimp Gallery",
5
5
"description": "blueimp Gallery is a touch-enabled, responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionality, fullscreen support and on-demand content loading and can be extended to display additional content types.",
Copy file name to clipboardExpand all lines: bower.json
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "blueimp-gallery",
3
-
"version": "2.9.0",
3
+
"version": "2.10.0",
4
4
"title": "blueimp Gallery",
5
5
"description": "blueimp Gallery is a touch-enabled, responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionality, fullscreen support and on-demand content loading and can be extended to display additional content types.",
0 commit comments