laten zien hoe downloads en zo gaan

This commit is contained in:
2026-10-29 10:39:35 +01:00
parent f7f4d440b8
commit 3fda5c2485
8 changed files with 293 additions and 69 deletions
+12 -1
View File
@@ -1461,6 +1461,11 @@
(player-renderers value))
'rendererId (or (playback-session-selected-id session) 'null)
'currentIndex (or (playback-session-current-index session) 'null)
'download
(let ((backend (playback-session-backend session)))
(if (and backend (eq? (playback-session-backend-kind session) 'agent))
(hash-ref (playback-agent-reported-state backend) 'download 'null)
'null))
'state (symbol->string (playback-session-state session))
'position (playback-session-position session)
'duration (or (playback-session-duration session) 'null)
@@ -2154,7 +2159,13 @@
'state
(hasheq 'state "stopped"
'position 0
'volume 25))))
'volume 25
'download (hasheq 'filename "Large.flac"
'received 65536 'total 100000000)))))
(check-equal?
(hash-ref (player-state->jsexpr example-player) 'download)
(hasheq 'filename "Large.flac" 'received 65536 'total 100000000))
(check-equal?
(hash-ref (hash-ref first-poll 'command) 'action)