|
|
@@ -5,7 +5,7 @@
|
|
|
<title>Lee Morgan -lecture-</title>
|
|
|
<link rel="stylesheet" href="/learn/style">
|
|
|
</head>
|
|
|
- <body>
|
|
|
+ <body id="lectureBody">
|
|
|
<h1 id="title"></h1>
|
|
|
|
|
|
<h3 id="course"></h3>
|
|
|
@@ -23,8 +23,18 @@
|
|
|
<ol id="exercises">
|
|
|
<h2>Exercises</h2>
|
|
|
</ol>
|
|
|
-
|
|
|
+
|
|
|
<script>
|
|
|
+ let video = document.getElementById("video");
|
|
|
+
|
|
|
+ let sizeIframe = ()=>{
|
|
|
+ let width = document.getElementById("lectureBody").clientWidth;
|
|
|
+ let multiplier = (width * 0.9) / video.contentWindow.document.body.scrollWidth;
|
|
|
+ video.width = video.contentWindow.document.body.scrollWidth * multiplier;
|
|
|
+ video.height = video.contentWindow.document.body.scrollHeight * multiplier;
|
|
|
+ }
|
|
|
+
|
|
|
+ video.onload = sizeIframe();
|
|
|
let id = window.location.href.split("/");
|
|
|
id = id[id.length-1];
|
|
|
|
|
|
@@ -34,7 +44,8 @@
|
|
|
document.getElementById("title").innerText = response.title;
|
|
|
document.getElementById("course").innerText = response.course.title;
|
|
|
document.getElementById("date").innerText = response.date;
|
|
|
- document.getElementById("video").src = response.video;
|
|
|
+ video.src = response.video;
|
|
|
+ // video.src = "https://rumble.com/embed/vg8er5/?pub=n4vcr";
|
|
|
document.getElementById("description").innerText = response.description;
|
|
|
|
|
|
let documents = document.getElementById("documents");
|