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

Handle a re-init phase when websocket is revived after phone is locked #79

Open
rtshkmr opened this issue Aug 12, 2024 · 0 comments
Open
Labels
lift.high high lift issue -- may require some strategizing around it module.eventBridge anything that involves handling how events are passed via the events bridge. module.sessions priority.low type.UX Involves UX work, that improves the user's experience

Comments

@rtshkmr
Copy link
Member

rtshkmr commented Aug 12, 2024

Present Context

Based on empirical observation, it seems that the websocket that liveview relies on gets killed when the phone is locked.

Since the mediaSessions API is recent, we might choose to resolve this problem by finding a way to work around this killing of websocket.

The current pattern is that play-pause events are to be captured by the AudioPlayer hook and then emitted to the MediaBridge server livecomponent which handles similarly to a user event. This breaks down in the case where a user locks their phone and the websocket is dead / inactive in the background.

A pedestrian solution would be to @ heartbeats, let there be a listener module which handles:

  • listening and log-stream creation
  • possible: teardown of a hook -- save last known states to localStorage and re-init when user's screen is unlocked again. This could be part of an overall push for better network-robustness as well.

putting this as low priority for now and high lift

@rtshkmr rtshkmr added priority.low type.UX Involves UX work, that improves the user's experience lift.high high lift issue -- may require some strategizing around it module.sessions module.eventBridge anything that involves handling how events are passed via the events bridge. labels Aug 12, 2024
@rtshkmr rtshkmr changed the title Improvement: handle a re-init phase when websocket is revived after phone is locked Handle a re-init phase when websocket is revived after phone is locked Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lift.high high lift issue -- may require some strategizing around it module.eventBridge anything that involves handling how events are passed via the events bridge. module.sessions priority.low type.UX Involves UX work, that improves the user's experience
Projects
None yet
Development

No branches or pull requests

1 participant