mirror of
https://github.com/outline/outline.git
synced 2026-11-22 14:01:41 +03:00
23 lines
585 B
TypeScript
23 lines
585 B
TypeScript
import * as React from "react";
|
|
import useMeasure from "react-use-measure";
|
|
import Frame from "../components/Frame";
|
|
import type { EmbedProps as Props } from ".";
|
|
|
|
export default function Berrycast({ matches, ...props }: Props) {
|
|
const normalizedUrl = props.attrs.href.replace(/\/$/, "");
|
|
const [measureRef, { width }] = useMeasure();
|
|
|
|
return (
|
|
<>
|
|
<div ref={measureRef} />
|
|
<Frame
|
|
{...props}
|
|
src={`${normalizedUrl}/video-player`}
|
|
title="Berrycast Embed"
|
|
height={`${0.5625 * width}px`}
|
|
border={false}
|
|
/>
|
|
</>
|
|
);
|
|
}
|