Skip to content

Commit c1e7060

Browse files
committed
- Fixed bug: resizing viewport pauses media elements on slides alvarotrigo#2471
1 parent 87098ee commit c1e7060

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

jquery.fullPage.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
var FP = $.fn.fullpage;
110110

111-
// Create some defaults, extending them with any options that were provided
111+
// Creating some defaults, extending them with any options that were provided
112112
options = $.extend({
113113
//navigation
114114
menu: false,
@@ -1436,7 +1436,10 @@
14361436
}
14371437
}
14381438

1439-
stopMedia(v.activeSection);
1439+
//pausing media of the leaving section (if we are not just resizing, as destinatino will be the same one)
1440+
if(!v.localIsResizing){
1441+
stopMedia(v.activeSection);
1442+
}
14401443

14411444
options.scrollOverflowHandler.beforeLeave();
14421445
element.addClass(ACTIVE).siblings().removeClass(ACTIVE);

0 commit comments

Comments
 (0)