Skip to content

Commit

Permalink
Fix embedding of Video's (Kaltura)
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Jun 15, 2022
1 parent 226180b commit 38e5a71
Showing 1 changed file with 11 additions and 2 deletions.
Expand Up @@ -30,9 +30,10 @@
// function called every time the size of the LO is changed
this.sizeChanged = function() {
var $pageVideo = $("#pageVideo"),
ratio = $pageVideo.data('iframeRatio'),
iframeRatio = $pageVideo.data('iframeRatio'),
videoDimensions = $pageVideo.data('dimensions');
if (true) {
const ratio = iframeRatio[0] / iframeRatio[1];
// scale the iframe so it stays the right aspect ratio & doesn't exceed the max size (60% of width by default but can be changed with opt property
var iframeMax = x_currentPageXML.getAttribute("iframeMax");
if ($.isNumeric(x_currentPageXML.getAttribute("iframeMax"))) {
Expand Down Expand Up @@ -109,6 +110,7 @@
ratio = x_currentPageXML.getAttribute("iframeRatio"),
iframeRatio = ratio ? ratio : '16:9';

debugger;
if (videoSrc.substr(0,7) == "<iframe") {
$("#pageContents .panel").removeClass("panel inline");

Expand All @@ -125,7 +127,14 @@
iframeRatio = [16,9];
}
$pageVideo.data('iframeRatio', iframeRatio);

/*
setTimeout(function(){
// Set the height of the $pageVideo container
const height = $pageVideo.width() / iframeRatio[0] * iframeRatio[1];
$pageVideo.height(height);
}, 250);
*/

} else {
var videoDimensions;// = [320,240];

Expand Down

0 comments on commit 38e5a71

Please sign in to comment.