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

Add idle idleTimeLimit to websocket + eventsource drivers #252

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

devinchristianson
Copy link

I'm building a lightweight multi-terminal live streaming project for my own use running labs/demos/etc, and for my use case it was useful to be able to speed through the previously recorded content to get up to the live feed, so I added idleTimeLimit support to the websocket and eventsource drivers.

If this is an improvement that seems worth the effort, feel free to merge this or give feedback so I can get it up to your standard

If this is a niche use case and not worth the time, feel free to close this out

Either way, I'm loving the project, and I appreciate all the hard work!

@ku1ik
Copy link
Contributor

ku1ik commented Feb 15, 2024

Hey Devin! I'm glad you love the project!

I'm having a hard time understanding the result of this change... maybe because idleTimeLimit as used across this project always meant "remove idle moments by compressing long waits".

Not quite sure how this fits into live streaming, given you can't keep reducing idle time forever: even with a long bufferTime, the buffer will eventually run out if you keep subtracting the delay long enough 🤔

@devinchristianson
Copy link
Author

My apologies for the confusion - this change indeed performs the same function, removing idle moments by compressing long waits, it's just the end result is a bit different - if the client joins the stream as soon as it starts, then it indeed has no effect, but if the client joins the stream sometime after it started and the server sends all events from the start of the recording, the idleTimeLimit effectively allows the client to fast forward through the historical recording until it is caught up to the live event stream, at which point it simply displays events as they are streamed.

Perhaps this is a counter-intuitive method of achieving this result, but I thought it fit well into the existing API for drivers and it seems to work well for my purposes at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants