From fcbcfc951eba2efb584942dcb2421df918fb1c8e Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 18 Nov 2015 10:00:44 +0100 Subject: [PATCH] Only pause is needed in Question Set (questions only have pause) HFJ-1218 --- js/questionset.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 39de57b..86ce470 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -572,17 +572,6 @@ H5P.QuestionSet = function (options, contentId) { typeof instance.pause === 'function')) { instance.pause(); } - else if (instance.video !== undefined && - instance.video.pause !== undefined && - (instance.video.pause instanceof Function || - typeof instance.video.pause === 'function')) { - instance.video.pause(); - } - else if (instance.stop !== undefined && - (instance.stop instanceof Function || - typeof instance.stop === 'function')) { - instance.stop(); - } } catch (err) { // Prevent crashing, log error. @@ -590,5 +579,6 @@ H5P.QuestionSet = function (options, contentId) { } }; }; + H5P.QuestionSet.prototype = Object.create(H5P.EventDispatcher.prototype); H5P.QuestionSet.prototype.constructor = H5P.QuestionSet;