Skip to content

Commit

Permalink
Update jQuery plugin to version 1.6.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Mar 23, 2021
1 parent 699c899 commit 75f5127
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
41 changes: 22 additions & 19 deletions src/Resources/public/js/rocksolid-slider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! rocksolid-slider v1.6.10 */
/*! rocksolid-slider v1.6.11 */
(function($, window, document) {

var Rst = {};
Expand Down Expand Up @@ -756,12 +756,7 @@ Rst.Slide = (function() {
src += '&start=' + time;
}

this.videoElement = $(document.createElement('iframe'))
.addClass(this.slider.options.cssPrefix + 'video-iframe')
.attr('src', src)
.attr('frameborder', 0)
.attr('allowfullscreen', 'allowfullscreen')
.appendTo(this.element);
this.videoElement = this.createVideoIframe(src).appendTo(this.element);

apiCallback = function() {
if (self.videoElement && window.YT) {
Expand Down Expand Up @@ -813,12 +808,7 @@ Rst.Slide = (function() {
src += '#t=' + time;
}

this.videoElement = $(document.createElement('iframe'))
.addClass(this.slider.options.cssPrefix + 'video-iframe')
.attr('src', src)
.attr('frameborder', 0)
.attr('allowfullscreen', 'allowfullscreen')
.appendTo(this.element);
this.videoElement = this.createVideoIframe(src).appendTo(this.element);

this.eventNamespace = 'rsts' + new Date().getTime();
$(window).on('message.' + this.eventNamespace, function(event) {
Expand All @@ -841,12 +831,7 @@ Rst.Slide = (function() {

this.element.addClass(this.slider.options.cssPrefix + 'video-unknown');

this.videoElement = $(document.createElement('iframe'))
.addClass(this.slider.options.cssPrefix + 'video-iframe')
.attr('src', this.data.video)
.attr('frameborder', 0)
.attr('allowfullscreen', 'allowfullscreen')
.appendTo(this.element);
this.videoElement = this.createVideoIframe(this.data.video).appendTo(this.element);

}

Expand All @@ -866,6 +851,18 @@ Rst.Slide = (function() {

};

/**
* @return {jQuery.<HTMLIFrameElement>}
*/
Slide.prototype.createVideoIframe = function(src) {
return $(document.createElement('iframe'))
.addClass(this.slider.options.cssPrefix + 'video-iframe')
.attr('frameborder', 0)
.attr('allowfullscreen', 'allowfullscreen')
.attr('allow', 'autoplay; encrypted-media; picture-in-picture; fullscreen')
.attr('src', src);
};

/**
* Set index
*/
Expand Down Expand Up @@ -2569,6 +2566,12 @@ Rst.Slider = (function() {
}
}

// Fix issues with min-content contribution in grid and flex layouts
this.modify(this.elements.crop, {
width: '',
height: ''
});

this.nav.resize();

var size = this.getViewSize(this.slideIndex);
Expand Down
Loading

0 comments on commit 75f5127

Please sign in to comment.