Skip to content

Commit d934a51

Browse files
committed
Make url configurable
1 parent a7c11d1 commit d934a51

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

frontend/src/App.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div id="app">
33
<iframe
4-
src="https://www.youtube.com/embed/364zEAsOclU?start=0&autoplay=1&mute=1&loop=1&playlist=364zEAsOclU"
4+
:src="url"
55
title="Video"
66
:width="showVideo ? '100%' : '0'"
77
:height="showVideo ? '100%' : '0'"
@@ -25,7 +25,7 @@
2525
return packetTimestamp / 1000 / 1000
2626
},
2727
showVideo() {
28-
if (this.showVideoAfter) {
28+
if (this.showVideoAfter && this.url) {
2929
const packetTimestamp = this.$store.state.refereeMsg.packetTimestamp;
3030
const commandTimestamp = this.$store.state.refereeMsg.commandTimestamp;
3131
const timeSinceLastCommand = (packetTimestamp - commandTimestamp) / 1000 / 1000;
@@ -37,6 +37,10 @@
3737
let urlParams = new URLSearchParams(window.location.search);
3838
return urlParams.get('showVideoAfter')
3939
},
40+
url() {
41+
let urlParams = new URLSearchParams(window.location.search);
42+
return urlParams.get('url')
43+
}
4044
}
4145
}
4246
</script>

rpi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ssl-status-board",
3-
"main": "http://localhost:8082?showVideoAfter=300",
3+
"main": "http://localhost:8082?showVideoAfter=300&url=https%3A%2F%2Fwww.youtube.com%2Fembed%2F364zEAsOclU%3Fstart%3D0%26autoplay%3D1%26mute%3D1%26loop%3D1%26playlist%3D364zEAsOclU",
44
"window": {
55
"kiosk": true,
66
"width": 1920,

0 commit comments

Comments
 (0)