File tree Expand file tree Collapse file tree 2 files changed +38
-2
lines changed
Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default function Home() {
1919 className = "w-full h-auto"
2020 />
2121 </ div >
22- < div className = "mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-3 lg:text-left" >
22+ < div className = "mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-2 xl:grid-cols-4 lg:text-left" >
2323 < div className = "text-center my-auto" > { dkEventAbbr } </ div >
2424 < Link
2525 href = "/break-dk/menu/1"
@@ -51,6 +51,21 @@ export default function Home() {
5151 </ p >
5252 </ Link >
5353
54+ < Link
55+ href = "/break-dk/monitor"
56+ className = "group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
57+ >
58+ < h2 className = { `mb-3 text-2xl font-semibold` } >
59+ Monitor{ ' ' }
60+ < span className = "inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none" >
61+ ->
62+ </ span >
63+ </ h2 >
64+ < p className = { `m-0 max-w-[30ch] text-sm opacity-50` } >
65+ モニター用のページはこちら.
66+ </ p >
67+ </ Link >
68+
5469 < div className = "text-center my-auto" > { eventAbbr } </ div >
5570 < Link
5671 href = "/break/menu/1"
Original file line number Diff line number Diff line change @@ -53,6 +53,21 @@ export default function MonitorPage() {
5353 }
5454 } , [ talks ] )
5555
56+ // trackのvideoId(m3u8 URL)をコピーする関数
57+ const copyStreamingUrl = async ( track : Track ) => {
58+ if ( track . videoId ) {
59+ try {
60+ await navigator . clipboard . writeText ( track . videoId )
61+ alert ( `配信URL をコピーしました:\n${ track . videoId } ` )
62+ } catch ( err ) {
63+ console . error ( 'URLのコピーに失敗しました:' , err )
64+ alert ( 'URLのコピーに失敗しました' )
65+ }
66+ } else {
67+ alert ( '配信URLが見つかりません' )
68+ }
69+ }
70+
5671 // 現在時刻をサーバー時刻基準で1秒ごとに更新
5772 useEffect ( ( ) => {
5873 startTimeSync ( )
@@ -159,7 +174,13 @@ export default function MonitorPage() {
159174 } bg-black/40 backdrop-blur-sm`}
160175 >
161176 < div className = "flex items-center justify-between mb-4" >
162- < h2 className = "text-2xl font-bold" > Track { track . name } </ h2 >
177+ < h2
178+ className = "text-2xl font-bold hover:text-blue-400 cursor-pointer transition-colors"
179+ onClick = { ( ) => copyStreamingUrl ( track ) }
180+ title = "クリックして配信URLをコピー"
181+ >
182+ Track { track . name }
183+ </ h2 >
163184 < div
164185 className = { `px-3 py-1 rounded-full text-sm font-semibold ${
165186 isOnAir
You can’t perform that action at this time.
0 commit comments