mirror of
https://github.com/outline/outline.git
synced 2026-06-24 00:34:22 +03:00
31 lines
660 B
JavaScript
31 lines
660 B
JavaScript
// @flow
|
|
import * as React from "react";
|
|
import Frame from "./components/Frame";
|
|
|
|
const URL_REGEX = /^https:\/\/www\.berrycast\.com\/conversations\/([0-9A-F-]*)(?:\/?)$/i;
|
|
|
|
type Props = {|
|
|
attrs: {|
|
|
href: string,
|
|
matches: string[],
|
|
|},
|
|
|};
|
|
|
|
export default class Berrycast extends React.Component<Props> {
|
|
static ENABLED = [URL_REGEX];
|
|
|
|
render() {
|
|
const { matches } = this.props.attrs;
|
|
const videoId = matches[1];
|
|
|
|
return (
|
|
<Frame
|
|
{...this.props}
|
|
height="465px"
|
|
src={`https://www.berrycast.com/conversations/${videoId}/video-player`}
|
|
title={`Berrycast Embed (${videoId})`}
|
|
/>
|
|
);
|
|
}
|
|
}
|