mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-20 14:12:01 -05:00
* YouTube lite embed + CSS bundled import * Migration initial * New VoD page initial functioning * Table changes + add TODOs * New structure for add vod page * WIP add new VoD backend * Merge branch 'rewrite' of https://github.com/Sendouc/sendou.ink into vods * Fix when leaderboard appears * Function new vod form * Single vod page initial * Different YouTubeEmbed * Scroll to top when going to timestamp * Vod match weapon/mode icons * Vod page user * Add date to vod page * Adjust migration order * Vod page many weapons * Add title to vod page * New vods page cast many weapons * Add player index to order by * Vods new more validation * Vod listing page initial * Vods page with filters * Show message if no vods * Fix not being to unset filters * Fix seed sometimes throwing errors * User page VoDs * Vods nullable weapon combobox * Link directly to user custom url from vod page * Make video adder admin action * Can add video checks * i18n * New VoD form tests * VoD operates filters test * Vods behind flag * Remove from config
25 lines
604 B
TypeScript
25 lines
604 B
TypeScript
export function YouTubeEmbed({
|
|
id,
|
|
start,
|
|
autoplay = false,
|
|
}: {
|
|
id: string;
|
|
start?: number;
|
|
autoplay?: boolean;
|
|
}) {
|
|
return (
|
|
<div className="youtube__container">
|
|
<iframe
|
|
className="youtube__iframe"
|
|
src={`https://www.youtube.com/embed/${id}?autoplay=${
|
|
autoplay ? "1" : "0"
|
|
}&controls=1&rel=0&modestbranding=1&start=${start ?? 0}`}
|
|
frameBorder="0"
|
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
allowFullScreen
|
|
title="Embedded youtube"
|
|
/>
|
|
</div>
|
|
);
|
|
}
|