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

Automatically cache audio when playing #8

Open
NeuroCPP opened this issue Dec 15, 2021 · 7 comments · May be fixed by #13
Open

Automatically cache audio when playing #8

NeuroCPP opened this issue Dec 15, 2021 · 7 comments · May be fixed by #13
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@NeuroCPP
Copy link

NeuroCPP commented Dec 15, 2021

@Seneral I don't know about the languages and scripts that were used in this project
But I am quite familiar with them...
I want to ask if there is any way to ##Automatically Cache the playing content
As it seems that the Cache First functions just as preloading the content
I hope you understand and help me out or guide me to the way, so that I can do it on my own

Your Junior
NeuroCPP
image
SOME GUYS THAT I KNOW AS WELL: @p3g4asus

@Seneral
Copy link
Owner

Seneral commented Dec 15, 2021

Oh that is a good feature to add, yes.
Unfortunately it is impossible (afaik) to cache what is currently playing, but you can either
a) wait for it to cache before playing when it's not cached yet
b) play it and cache it simultaneously, as soon as caching has surpassed the play head it should use the cached content automatically, though I did not test it.

How to do these things:
Call ct_cacheVideo (or make a new function using db_cacheStream that does not create notifications) in ct_mediaLoaded before md_updateStreams, if you want a) you can do a .then/.catch (JS Promise) between them to chain them (only works when you do db_cacheStream manually, unfortunately ct_cacheVideo doesn't expose the promise interface yet)

@Seneral Seneral closed this as completed Dec 15, 2021
@Seneral Seneral reopened this Dec 15, 2021
@NeuroCPP
Copy link
Author

NeuroCPP commented Dec 15, 2021 via email

@Seneral
Copy link
Owner

Seneral commented Dec 15, 2021

Oh sure, just updated my comment, accidentally clicked close (on mobile) before finishing it. Hope that gives you an idea. If you want, feel free to create a pull request whne you're done, good feature to have (could add a toggle in settings as well)

@Seneral Seneral added enhancement New feature or request good first issue Good for newcomers labels Dec 15, 2021
@Seneral Seneral changed the title CACHE FIRST NOT CACHING THE AUDIO AUTOMATICALLY Automatically cache audio when playing Dec 15, 2021
@Seneral
Copy link
Owner

Seneral commented Dec 15, 2021

oh btw, "Cache First" is misleading that toggle is supposed to switch between it using the cache and using the online version when it has internet (e.g. always use cache vs checking for updated audio).
Now that I think about it, almost no reason to disable it, audio won't change usually, so we could switch that to be "Cache Automatically"

@NeuroCPP
Copy link
Author

NeuroCPP commented Dec 15, 2021

good opinion to be pointed out...
my opinion is to first add the description of the "cache first" .. so that someone who reads it never misunderstands it.....
As for pointing it out..... I loved your work....

@NeuroCPP
Copy link
Author

And to be said I want to that if we can KEEP the cache first and automatically having different toggle buttons...
Wait for sometime ... I will upload a video recording or audio recording to explain..
In the meanwhile I will try to learn some JC and HTML so that i can also help you out

@NeuroCPP
Copy link
Author

NeuroCPP commented Jan 7, 2022

[FOR NEWCOMERS]Refer to #13 if you want to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants