Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(recordings): Treat initial player state as aria-busy #17543

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ const PlayerFrameOverlayContent = ({
<div className="SessionRecordingPlayer--buffering text-3xl italic font-medium text-white">Buffering…</div>
)
}
if (currentPlayerState === SessionPlayerState.PAUSE || currentPlayerState === SessionPlayerState.READY) {
if (currentPlayerState === SessionPlayerState.PAUSE || currentPlayerState === SessionPlayerState.INIT) {
content = <IconPlay className="text-6xl text-white" />
}
if (currentPlayerState === SessionPlayerState.SKIP) {
content = <div className="text-3xl italic font-medium text-white">Skipping inactivity</div>
}
return content ? (
<div className="PlayerFrameOverlay__content" aria-busy={currentPlayerState === SessionPlayerState.BUFFER}>
<div
className="PlayerFrameOverlay__content"
aria-busy={
currentPlayerState === SessionPlayerState.BUFFER || currentPlayerState === SessionPlayerState.INIT
}
>
{content}
</div>
) : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export const sessionRecordingPlayerLogic = kea<sessionRecordingPlayerLogicType>(
}

if (!snapshotsLoaded && !snapshotsLoading) {
return SessionPlayerState.READY
return SessionPlayerState.INIT
}
if (isErrored) {
return SessionPlayerState.ERROR
Expand Down Expand Up @@ -754,7 +754,7 @@ export const sessionRecordingPlayerLogic = kea<sessionRecordingPlayerLogicType>(
// If paused, start playing
if (
values.currentPlayerState === SessionPlayerState.PAUSE ||
values.currentPlayerState === SessionPlayerState.READY
values.currentPlayerState === SessionPlayerState.INIT
) {
actions.setPlay()
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export enum SessionRecordingPlayerTab {
}

export enum SessionPlayerState {
READY = 'ready',
INIT = 'init',
BUFFER = 'buffer',
PLAY = 'play',
PAUSE = 'pause',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.