debug(web/session): expose player instance as window.__ap
The parse path works (metadata event fires with duration: 24.58s, idle event fires); next unknown is whether clicking play even reaches core.play(). Stash the player on window so the operator can call __ap.play() from DevTools to diff UI-click vs direct-call behaviour and see whether 'play' / 'playing' events fire. To be reverted once we pin the failure.
This commit is contained in:
@@ -183,6 +183,12 @@ const SessionDrawer: React.FC<SessionDrawerProps> = ({ decky, sid, fields, onClo
|
|||||||
(d: number) => console.debug('asciinema-player duration:', d),
|
(d: number) => console.debug('asciinema-player duration:', d),
|
||||||
(err: unknown) => console.error('asciinema-player getDuration failed:', err),
|
(err: unknown) => console.error('asciinema-player getDuration failed:', err),
|
||||||
);
|
);
|
||||||
|
// DEBUG: expose the live instance on window so the operator can
|
||||||
|
// poke it from DevTools — window.__ap.play() bypasses the UI
|
||||||
|
// click-handler chain entirely and tells us whether playback
|
||||||
|
// would advance if the button click actually reached core.play.
|
||||||
|
(window as unknown as { __ap: unknown }).__ap = p;
|
||||||
|
console.debug('asciinema-player instance → window.__ap');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('asciinema-player failed to mount (sync):', err);
|
console.error('asciinema-player failed to mount (sync):', err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user