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

Manual cache #9

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Manual cache #9

wants to merge 12 commits into from

Conversation

jochem725
Copy link

For both iOS and Android this allows setting the cache from outside of the package so we can configure the parameters in JS.

Android specific: the changes in ExoPlayerCache make sure we always export the full video. Previously the video cache would cache the video in 5 MB parts, the export code would download the full video again (and cache it in a full X MB file).

Now: The datasource first loads from the video player cache, if a part is missing or incomplete it will use the dataspec to download the missing bits. This should solve the export issue and significantly speed things up since it can now benefit from the video player cache while exporting!

Still needs a bit of cleanup :)
Mobileapp PR will follow tomorrow!

@FrikkieSnyman
Copy link
Collaborator

Epic! We should make sure it's well tested though

Comment on lines -25 to -30
options.cachePath = self.cachePath;
options.cacheIdentifier = self.cacheIdentifier;
options.defaultExpirationPeriod = 60 * 60 * 24 * 30;
options.garbageCollectionInterval = (NSUInteger)(1.5 * SPTPersistentCacheDefaultGCIntervalSec);
options.sizeConstraintBytes = 1024 * 1024 * 100;
options.useDirectorySeparation = NO;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did all this config go?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TypeScript 😄

@jochem725
Copy link
Author

^ Updated with export from iOS cache

jaspermeijaard pushed a commit that referenced this pull request Jun 24, 2022
Add support for L1 to L3 Widevine fallback if playback fails initially.
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.

3 participants