Skip to content

Commit

Permalink
fix Bug 1341242 - Pause video playback when a user closes the modal o…
Browse files Browse the repository at this point in the history
…n the /contribute page.
  • Loading branch information
RCMainak committed Feb 27, 2017
1 parent ca04262 commit 4d8ce2d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions media/js/mozorg/contribute/contribute-landing.js
Expand Up @@ -16,6 +16,9 @@
title: '',
onCreate: function() {
playVideo();
},
onDestroy: function() {
pauseVideo();
}
});

Expand Down Expand Up @@ -44,6 +47,11 @@
}
};

// Pause the video when the modal is closed (Bug 1341242)
var pauseVideo = function() {
document.getElementById('htmlPlayer').pause();
};

// Track user scrolling through each section on the landing page
$('#landing .section').waypoint(function(direction) {
if (direction === 'down') {
Expand Down

0 comments on commit 4d8ce2d

Please sign in to comment.