1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-04-29 13:37:16 +00:00

room info: look up to 15 minutes into the past and into the future

This commit is contained in:
Franzi 2023-02-28 11:17:14 +01:00
parent 5eabb5fa6a
commit 7d5f278536
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
schedule = null;
event_info = null;
function get_current_talk() {
function get_current_talk(max_offset) {
room_name = get_room_name();
if (!room_name) {
@ -10,7 +10,7 @@ function get_current_talk() {
current_talk = null;
for (let offset = 0; offset <= 5; offset++) {
for (let offset = 0; offset <= max_offset; offset++) {
time_start = new Date(Date.now() + offset*60000).getTime();
time_end = new Date(Date.now() - offset*60000).getTime();

View file

@ -25,7 +25,7 @@ function update_lower_third() {
return
}
current_talk = get_current_talk();
current_talk = get_current_talk(5);
if (current_talk) {
$('#l3title').text(current_talk['title']);
$('#l3speaker').text(current_talk['persons'].join(', '));

View file

@ -39,7 +39,7 @@ function update_room_info() {
return
}
current_talk = get_current_talk();
current_talk = get_current_talk(15);
if (current_talk) {
$('#broadcast_tools_room_info_title').text(current_talk['title']);
$('#broadcast_tools_room_info_speaker').text(current_talk['persons'].join(', '));