Spaces:
Running
Running
Commit ·
f048ad6
1
Parent(s): 221bebc
Fix iframe viewport clipping issue by removing 4:3 aspect ratio and supporting height scaling
Browse files- templates/player.html +17 -0
templates/player.html
CHANGED
|
@@ -266,12 +266,27 @@
|
|
| 266 |
}
|
| 267 |
|
| 268 |
/* Iframe Viewport for Scratch & HTML5 */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
.iframe-viewport {
|
| 270 |
width: 100%;
|
| 271 |
height: 100%;
|
| 272 |
border: none;
|
| 273 |
background-color: #000;
|
| 274 |
border-radius: 10px;
|
|
|
|
| 275 |
}
|
| 276 |
|
| 277 |
/* Guide Tip Overlay */
|
|
@@ -635,6 +650,8 @@
|
|
| 635 |
layout.style.gridTemplateColumns = "1fr";
|
| 636 |
statusWrapper.style.display = "none"; // Iframe handles itself
|
| 637 |
|
|
|
|
|
|
|
| 638 |
const iframe = document.createElement("iframe");
|
| 639 |
iframe.className = "iframe-viewport";
|
| 640 |
iframe.allow = "autoplay; fullscreen; microphone; camera";
|
|
|
|
| 266 |
}
|
| 267 |
|
| 268 |
/* Iframe Viewport for Scratch & HTML5 */
|
| 269 |
+
.screen-frame.iframe-mode {
|
| 270 |
+
aspect-ratio: auto;
|
| 271 |
+
max-height: 100%;
|
| 272 |
+
height: 100%;
|
| 273 |
+
width: 100%;
|
| 274 |
+
padding: 0;
|
| 275 |
+
overflow: auto;
|
| 276 |
+
border-radius: 12px;
|
| 277 |
+
box-shadow:
|
| 278 |
+
0 0 0 1px rgba(255,255,255,0.03),
|
| 279 |
+
0 25px 60px rgba(0,0,0,0.85),
|
| 280 |
+
0 0 45px rgba(99, 102, 241, 0.15);
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
.iframe-viewport {
|
| 284 |
width: 100%;
|
| 285 |
height: 100%;
|
| 286 |
border: none;
|
| 287 |
background-color: #000;
|
| 288 |
border-radius: 10px;
|
| 289 |
+
display: block;
|
| 290 |
}
|
| 291 |
|
| 292 |
/* Guide Tip Overlay */
|
|
|
|
| 650 |
layout.style.gridTemplateColumns = "1fr";
|
| 651 |
statusWrapper.style.display = "none"; // Iframe handles itself
|
| 652 |
|
| 653 |
+
viewportFrame.classList.add("iframe-mode");
|
| 654 |
+
|
| 655 |
const iframe = document.createElement("iframe");
|
| 656 |
iframe.className = "iframe-viewport";
|
| 657 |
iframe.allow = "autoplay; fullscreen; microphone; camera";
|