Skip to content

Commit

Permalink
Merge pull request #2428 from QuizandSurveyMaster/CU-86cu6w0zk-bug-wi…
Browse files Browse the repository at this point in the history
…th-video-playing

Fixed not pausing video on click next or previous btn click
  • Loading branch information
zubairraeen authored Dec 26, 2023
2 parents 208d991 + ff68cf6 commit 95b9c36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,12 +1332,20 @@ function qmnInitPagination(quiz_id) {

function qsmPauseVideo( quiz_id, btn ) {
let video_sections = jQuery(btn).closest(`.qsm-quiz-container-${quiz_id}.qmn_quiz_container`).find('video:visible');
let iframeVideos = jQuery(btn).closest(`.qsm-quiz-container-${quiz_id}.qmn_quiz_container`).find('iframe:visible');

iframeVideos.each(function() {
let src = this.src;
jQuery(this).attr('src', '');
jQuery(this).attr('src', src);
});
video_sections.each(function() {
if (!this.paused) {
this.pause();
}
});
}

function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id, share_url) {
var sTop = window.screen.height / 2 - (218);
var sLeft = window.screen.width / 2 - (313);
Expand Down

0 comments on commit 95b9c36

Please sign in to comment.