Unlisted
Back
Version 59
8/9/2024
// reddit embed static
/** @jsxImportSource https://esm.sh/react */
import { encode as base64Encode } from "https://deno.land/std@0.177.0/encoding/base64.ts";
// import { fetch } from "https://esm.town/v/std/fetch";
import { renderToStaticMarkup } from "https://esm.sh/react-dom/server";
const CLIENT_ID = Deno.env.get("REDDIT_CLIENT_ID");
const CLIENT_SECRET = Deno.env.get("REDDIT_SECRET");
// test ?id=17at2r7&sub=Unity3D
function Embed(props) {
const vid = props.secure_media?.reddit_video?.fallback_url;
return (
<body
style={{
margin: 0,
fontFamily: "system-ui, sans-serif",
}}
>
{vid && (
<>
<video
controls
width="896"
style={{
maxWidth: "100%",
}}
>
<source src={vid} />
</video>
{
/*
<video
width="896"
autoPlay
jxnblk-redditembed2.web.val.run
Updated: January 15, 2025