Resize on video loaded and when results are already rendered.
parent
c282dbf72f
commit
b02fe7c668
|
@ -234,6 +234,7 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
var _displayEndGame = function () {
|
var _displayEndGame = function () {
|
||||||
if (rendered) {
|
if (rendered) {
|
||||||
$myDom.children().hide().filter('.questionset-results').show();
|
$myDom.children().hide().filter('.questionset-results').show();
|
||||||
|
self.trigger('resize');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//Remove old score screen.
|
//Remove old score screen.
|
||||||
|
@ -305,6 +306,10 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
video.attach($videoContainer);
|
video.attach($videoContainer);
|
||||||
|
// Resize on video loaded
|
||||||
|
video.on('loaded', function () {
|
||||||
|
self.trigger('resize');
|
||||||
|
});
|
||||||
video.play();
|
video.play();
|
||||||
|
|
||||||
if (params.endGame.skipButtonText) {
|
if (params.endGame.skipButtonText) {
|
||||||
|
@ -399,7 +404,7 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
if (renderSolutions) {
|
if (renderSolutions) {
|
||||||
showSolutions();
|
showSolutions();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.trigger('resize');
|
this.trigger('resize');
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -476,4 +481,4 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
H5P.QuestionSet.prototype = Object.create(H5P.EventDispatcher.prototype);
|
H5P.QuestionSet.prototype = Object.create(H5P.EventDispatcher.prototype);
|
||||||
H5P.QuestionSet.prototype.constructor = H5P.QuestionSet;
|
H5P.QuestionSet.prototype.constructor = H5P.QuestionSet;
|
||||||
|
|
Loading…
Reference in New Issue