Lots of media for mars rover software lead, yt video grid now working, small fixes to import orders and extra photos
This commit is contained in:
@@ -1,13 +1,26 @@
|
||||
---
|
||||
import type { videoConfig } from "@interfaces/video.ts";
|
||||
import type { videoConfig } from "@interfaces/yt-video.ts";
|
||||
|
||||
const config: videoConfig = Astro.props.videoConfig;
|
||||
interface Props extends videoConfig {}
|
||||
|
||||
const {
|
||||
videoPath,
|
||||
videoTitle,
|
||||
width = "1920",
|
||||
height = "1080",
|
||||
autoPlay = false,
|
||||
} = Astro.props;
|
||||
|
||||
const aspect = `${width} / ${height}`;
|
||||
---
|
||||
|
||||
<iframe
|
||||
class="h-128 w-full max-w-1/2"
|
||||
src={config.videoPath}
|
||||
title={config.videoTitle ?? ""}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
referrerpolicy="strict-origin-when-cross-origin"
|
||||
allowfullscreen></iframe>
|
||||
<div class="mx-auto my-auto w-full" style={`aspect-ratio: ${aspect};`}>
|
||||
<iframe
|
||||
src={videoPath}
|
||||
title={videoTitle}
|
||||
class="h-full w-full"
|
||||
allow={"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; " +
|
||||
(autoPlay ? "autoplay;" : "")}
|
||||
referrerpolicy="strict-origin-when-cross-origin"
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user