Skip to main content

Module timers

Module timers 

Source
Expand description

Sleep-timer and autoplay commands.

TRACES: UR-026, UR-023 | DR-029, DR-047, DR-049

Thin command adapters over PlayerController’s sleep-timer and autoplay logic, plus persistence of autoplay settings to the database.

Functions§

player_cancel_autoplay_countdown
Cancel active autoplay countdown
player_cancel_sleep_timer
Cancel sleep timer
player_get_autoplay_settings
Get autoplay settings
player_get_sleep_timer
Get current sleep timer state
player_on_playback_ended
Handle playback ended event - triggers autoplay decision logic This is called from:
player_play_next_episode
Play next episode (user confirmed from popup)
player_recover_stream
Try to recover playback after a recoverable player error, reporting whether it was handled.
player_report_media_loaded
Report that a webview media element finished loading and knows its duration.
player_report_position
Report a webview media element’s position tick (seconds). The adapter should throttle these to roughly match the native backends’ ~250ms cadence.
player_report_state
Report a webview media element’s state change (playing/paused/loading/stopped/idle).
player_set_autoplay_settings
Set autoplay settings and persist to database
player_set_sleep_timer
Set sleep timer mode