Skip to content

Commit 7ce24d6

Browse files
committed
Improve embedding of video
1 parent 6a696c6 commit 7ce24d6

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test: frontend
2424
go test ./...
2525

2626
run: frontend
27-
go run ./cmd/$(word 1,$(CMDS))
27+
go run ./cmd/$(word 1,$(CMDS)) -refereeAddress 224.5.24.1:11003
2828

2929
proto: frontend
3030
cd frontend && npm run genProto

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ By default, the UI is available at http://localhost:8082
2626

2727
A configuration file will be generated to `config/board-config.yaml` and can be tweaked.
2828

29+
A website (like Youtube) can be displayed when there is no activity.
30+
Pass the URL like this: `http://localhost:8082??showVideoAfter=420&url=https%3A%2F%2Fwww.youtube.com%2Fembed%2F364zEAsOclU%3Fstart%3D0%26autoplay%3D1%26mute%3D1%26loop%3D1%26playlist%3D364zEAsOclU`
31+
2932
### Runtime Requirements
3033
* No software dependencies (except for development, see below)
3134
* 64bit Linux, Windows, OSX (build your 32bit binaries yourself...)

frontend/src/App.vue

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
2-
import { computed } from 'vue'
3-
import { useRefereeStore } from '@/stores/referee'
2+
import {computed} from 'vue'
3+
import {useRefereeStore} from '@/stores/referee'
44
import StatusBoard from '@/components/StatusBoard.vue'
55
66
const refereeStore = useRefereeStore()
@@ -30,25 +30,36 @@ const showVideo = computed(() => {
3030
<template>
3131
<div id="app">
3232
<iframe
33-
v-if="showVideo"
33+
:class="{hidden: !showVideo}"
3434
:src="url || ''"
3535
title="Video"
3636
:width="showVideo ? '100%' : '0'"
3737
:height="showVideo ? '100%' : '0'"
3838
allow="autoplay"
3939
/>
40-
<StatusBoard v-if="!showVideo" />
40+
<StatusBoard :class="{hidden: showVideo}"/>
4141
</div>
4242
</template>
4343

4444
<style>
45-
#app {
46-
font-family: 'Avenir', Helvetica, Arial, sans-serif;
47-
-webkit-font-smoothing: antialiased;
48-
-moz-osx-font-smoothing: grayscale;
49-
text-align: center;
50-
color: aliceblue;
51-
height: 100%;
52-
background-color: #353535;
53-
}
45+
#app {
46+
font-family: 'Avenir', Helvetica, Arial, sans-serif;
47+
-webkit-font-smoothing: antialiased;
48+
-moz-osx-font-smoothing: grayscale;
49+
text-align: center;
50+
color: aliceblue;
51+
height: 100%;
52+
background-color: #353535;
53+
}
54+
55+
iframe {
56+
border: 0;
57+
overflow:hidden;
58+
display:block;
59+
position: absolute;
60+
}
61+
62+
.hidden {
63+
display: none;
64+
}
5465
</style>

0 commit comments

Comments
 (0)