Skip to content

Commit

Permalink
Comparison operator
Browse files Browse the repository at this point in the history
  • Loading branch information
echo360-damyon committed Feb 26, 2024
1 parent f6b47e2 commit 261340b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/echo360.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ H5P.VideoEchoVideo = (function () {
else {
this.trigger('stateChange', H5P.Video.PAUSED);
}
if (currentTime >== (duration - 1) && options.loop) {
if (currentTime >= (duration - 1) && options.loop) {
this.seek(0);
this.play();
}
Expand Down Expand Up @@ -193,6 +193,16 @@ H5P.VideoEchoVideo = (function () {
// allows the guard statement above to be hit if this function is called
// more than once.
player = null;
let queryString = '?';
if (options.controls) {
queryString += 'controls=true&';
}
if (options.disableFullscreen) {
queryString += 'disableFullscreen=true&';
}
if (options.deactivateSound) {
queryString += 'deactivateSound=true&';
}
wrapperElement.innerHTML = '<iframe src="' + sources[0].path + '" style="display: inline-block; width: 100%; height: 100%;" allow="autoplay; fullscreen" frameborder="0"></iframe>';
player = wrapperElement.firstChild;
// Create a new player
Expand Down

0 comments on commit 261340b

Please sign in to comment.