···11+<?php
22+33+// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
44+// See the LICENCE file in the repository root for full licence text.
55+66+declare(strict_types=1);
77+88+use Illuminate\Database\Migrations\Migration;
99+use Illuminate\Database\Schema\Blueprint;
1010+use Illuminate\Support\Facades\Schema;
1111+1212+return new class extends Migration
1313+{
1414+ /**
1515+ * Run the migrations.
1616+ */
1717+ public function up(): void
1818+ {
1919+ Schema::table('osu_builds', function (Blueprint $table) {
2020+ $table->string('youtube_id')->nullable();
2121+ });
2222+ }
2323+2424+ /**
2525+ * Reverse the migrations.
2626+ */
2727+ public function down(): void
2828+ {
2929+ Schema::table('osu_builds', function (Blueprint $table) {
3030+ $table->dropColumn('youtube_id');
3131+ });
3232+ }
3333+};
···11-// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
22-// See the LICENCE file in the repository root for full licence text.
33-44-.download-page-video {
55- // this trick maintains the video's aspect ratio while resizing
66- // see: http://alistapart.com/article/creating-intrinsic-ratios-for-video
77- padding-bottom: 56.25%; /* 16:9 */
88- position: relative;
99-1010- iframe {
1111- .full-size();
1212- }
1313-}
···3636 className: 'builds__group',
3737 div
3838 className: 'builds__item'
3939- el Build, build: @props.build, showDate: true, modifiers: ['build']
3939+ el Build, build: @props.build, showDate: true, showVideo: true, modifiers: ['build']
40404141 div className: 'page-nav',
4242 div className: 'page-nav__item page-nav__item--left',
+6-1
resources/js/components/build.coffee
···22# See the LICENCE file in the repository root for full licence text.
3344import * as React from 'react'
55-import { a, div, i, span } from 'react-dom-factories'
55+import { a, div, i, iframe, span } from 'react-dom-factories'
66import { classWithModifiers } from 'utils/css'
77import { changelogBuild } from 'utils/url'
88import { ChangelogEntry } from './changelog-entry'
···3131 if @props.showDate ? false
3232 div className: 'build__date', moment(@props.build.created_at).format('LL')
33333434+ if @props.build.youtube_id? && (@props.showVideo ? false)
3535+ div className: 'build__video u-embed-wide',
3636+ iframe
3737+ allowFullScreen: true
3838+ src: "https://www.youtube.com/embed/#{@props.build.youtube_id}?rel=0"
3439 for category in categories
3540 div
3641 key: category