File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div id =" app" >
3- <StatusBoard />
3+ <iframe
4+ src =" https://www.youtube.com/embed/364zEAsOclU?start=0&autoplay=1&mute=1&loop=1&playlist=364zEAsOclU"
5+ title =" Video"
6+ :width =" showVideo ? '100%' : '0'"
7+ :height =" showVideo ? '100%' : '0'"
8+ allow =" autoplay"
9+ />
10+ <StatusBoard v-if =" !showVideo" />
411 </div >
512</template >
613
1118 name: ' app' ,
1219 components: {
1320 StatusBoard,
21+ },
22+ computed: {
23+ packetTimestamp () {
24+ const packetTimestamp = this .$store .state .refereeMsg .packetTimestamp ;
25+ return packetTimestamp / 1000 / 1000
26+ },
27+ showVideo () {
28+ if (this .showVideoAfter ) {
29+ const packetTimestamp = this .$store .state .refereeMsg .packetTimestamp ;
30+ const commandTimestamp = this .$store .state .refereeMsg .commandTimestamp ;
31+ const timeSinceLastCommand = (packetTimestamp - commandTimestamp) / 1000 / 1000 ;
32+ return timeSinceLastCommand > this .showVideoAfter ;
33+ }
34+ return false
35+ },
36+ showVideoAfter () {
37+ let urlParams = new URLSearchParams (window .location .search );
38+ return urlParams .get (' showVideoAfter' )
39+ },
1440 }
1541 }
1642 </script >
You can’t perform that action at this time.
0 commit comments