Skip to content

Commit

Permalink
MCKIN-12576 Pause videos playing in a step when moving to next one (#254
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nasirhjafri authored and xitij2000 committed Dec 17, 2019
1 parent 9ea1154 commit 68c5e38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions problem_builder/public/js/mentoring_with_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ function MentoringWithStepsBlock(runtime, element) {
});
}

function stopVideos() {
$(element).find('video').trigger('pause');
}

function cleanAll() {
checkmark.removeClass('checkmark-correct icon-ok fa-check');
checkmark.removeClass('checkmark-partially-correct icon-ok fa-check');
Expand All @@ -187,6 +191,7 @@ function MentoringWithStepsBlock(runtime, element) {

function updateDisplay() {
cleanAll();
stopVideos();

if (atReviewStep()) {
// Tell supporting runtimes to enable navigation between units;
Expand Down Expand Up @@ -400,6 +405,7 @@ function MentoringWithStepsBlock(runtime, element) {
notifyInteraction();

cleanAll();
stopVideos();
showReviewStep();
showAttempts();

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# Constants #########################################################

VERSION = '3.4.2'
VERSION = '3.4.3'

# Functions #########################################################

Expand Down

0 comments on commit 68c5e38

Please sign in to comment.