Release v0.9.11: Media playback behavior clarifications
This release clarifies the media playback behavior and fixes an incorrect "smart grace period" implementation that violated the core principle. Core Principle: - Media playback TRUMPS everything (rotation and inactivity prompts) - Media plays uninterrupted until: ends naturally, user pauses, session lockout, or display schedule - After media stops: 30-second grace period ALWAYS applies (no exceptions) - After grace period: Normal inactivity and rotation rules resume Changes: - Restored simple grace period logic (always 30 seconds after media stops) - Removed incorrect "smart" grace period that could skip the delay - Added clarifying comments about media blocking behavior - Documented that inactivity timeout is user-configurable (default 2 minutes) The grace period ensures smooth transitions when media ends naturally, preventing jarring interruptions with popups or rotation changes.
This commit is contained in:
@@ -1,9 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
################################################################################
|
################################################################################
|
||||||
### Ubuntu Based Kiosk (UBK) v0.9.10 ###
|
### Ubuntu Based Kiosk (UBK) v0.9.11 ###
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# RELEASE v0.9.10 - Rotation Logic Fixes
|
# RELEASE v0.9.11 - Media Playback Clarifications
|
||||||
|
#
|
||||||
|
# What's in v0.9.11:
|
||||||
|
# - Clarified media playback behavior in comments
|
||||||
|
# * While media plays: NO rotation, NO prompts, NOTHING interrupts
|
||||||
|
# * Media only pauses for: media ends, user pauses, session lockout, display schedule
|
||||||
|
# * After media stops: 30-second grace period ALWAYS applies
|
||||||
|
# * After grace period: Normal inactivity and rotation rules resume
|
||||||
|
# - Inactivity timeout is user-configurable
|
||||||
|
# * Default: 2 minutes (120 seconds)
|
||||||
|
# * Can be changed via Sites menu when setting home site
|
||||||
|
# * Value stored in seconds in config, converted to milliseconds in app
|
||||||
#
|
#
|
||||||
# What's in v0.9.10:
|
# What's in v0.9.10:
|
||||||
# - Fixed rotation logic to properly handle user interaction
|
# - Fixed rotation logic to properly handle user interaction
|
||||||
@@ -3865,11 +3876,14 @@ function startMasterTimer(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. MEDIA BLOCKING
|
// 3. MEDIA BLOCKING
|
||||||
|
// While media plays: NO rotation, NO prompts, NOTHING interrupts playback
|
||||||
if(mediaIsPlaying){
|
if(mediaIsPlaying){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. GRACE PERIOD
|
// 4. GRACE PERIOD
|
||||||
|
// After media stops: Always wait 30 seconds before rotation or prompts
|
||||||
|
// This prevents interruptions when video/audio ends naturally
|
||||||
const timeSinceMediaStopped=now-lastMediaStateChange;
|
const timeSinceMediaStopped=now-lastMediaStateChange;
|
||||||
if(timeSinceMediaStopped<MEDIA_GRACE_PERIOD){
|
if(timeSinceMediaStopped<MEDIA_GRACE_PERIOD){
|
||||||
return;
|
return;
|
||||||
Reference in New Issue
Block a user