This commit is contained in:
david rice
2026-04-21 15:38:17 +01:00
parent ca0faf79d8
commit 54103e7b66
3 changed files with 18 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
import gi
import signal
import struct
import os
@@ -129,6 +130,9 @@ def play_kiosk():
manager = KioskManager(pipeline)
pipeline.set_property("uri", manager.videos[0])
# SIGUSR1 → switch video (used by device_server PUT /display {"state":"on"})
signal.signal(signal.SIGUSR1, lambda sig, frame: manager.switch_video())
# --- INPUT MONITORING ---
try:
btn_fd = open("/dev/input/event1", "rb")