Skip to content

Commit

Permalink
Release 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinchoolur committed May 1, 2018
1 parent 55ca568 commit cc4e276
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lg-video",
"version": "1.2.1",
"version": "1.2.2",
"description": "Video module for lightgallery.",
"main": [
"dist/lg-video.min.js"
Expand Down
13 changes: 12 additions & 1 deletion dist/lg-video.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! lg-video - v1.2.1 - 2018-03-08
/*! lg-video - v1.2.2 - 2018-05-01
* http://sachinchoolur.github.io/lightGallery
* Copyright (c) 2018 Sachin N; Licensed GPLv3 */

Expand Down Expand Up @@ -76,6 +76,17 @@
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
_this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
});

if (_this.core.s.autoplayFirstVideo) {
_this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {
if (!_this.core.lGalleryOn) {
var $el = _this.core.$slide.eq(index);
setTimeout(function () {
_this.loadVideoOnclick($el);
}, 100);
}
});
}
};

Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {
Expand Down
4 changes: 2 additions & 2 deletions dist/lg-video.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lg-video",
"version": "1.2.1",
"version": "1.2.2",
"description": "Video module for lightgallery.",
"keywords": [
"gallery",
Expand Down
2 changes: 1 addition & 1 deletion src/lg-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
_this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
});

if (_this.s.core.autoplayFirstVideo) {
if (_this.core.s.autoplayFirstVideo) {
_this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {
if (!_this.core.lGalleryOn) {
var $el = _this.core.$slide.eq(index);
Expand Down

0 comments on commit cc4e276

Please sign in to comment.