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

fix: playback fails when changing videos + reels example #59

Merged
merged 15 commits into from
Sep 25, 2024

Conversation

daytime-em
Copy link
Collaborator

@daytime-em daytime-em commented Sep 25, 2024

Previously, every MuxPlayer instance would share a single SQLiteOpenHelper. This is a problem because the underlying database could become closed while switching-to and loading new media items. Instead, every Player can have its own DbHelper instance, and CacheDatastore will force the database to stay open until the MuxPlayer is released

To test this, I also added a quick & dirty scrolling video carousel.

This also makes CacheController public and renames it to MuxPlayerCache. I had to make it public, so I renamed it to avoid confusion in customer apps that might have their own cache classes for REST or something. It's still not part of the public API, and it's not possible to create an instance from the outside or obtain an instance being used

@daytime-em daytime-em requested a review from a team as a code owner September 25, 2024 00:16
@daytime-em daytime-em changed the base branch from main to releases/v1.1.2 September 25, 2024 00:28
@@ -0,0 +1,298 @@
package com.mux.player.internal.cache
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed from CacheController, not new code

@daytime-em daytime-em changed the title fix: playback fails due to caching problems fix: playback fails due to caching problems + reels example Sep 25, 2024
@daytime-em daytime-em changed the title fix: playback fails due to caching problems + reels example fix: playback fails when changing videos + reels example Sep 25, 2024
@daytime-em
Copy link
Collaborator Author

Only change since last green-check was a comment, lets goo

@daytime-em daytime-em merged commit 686d0e5 into releases/v1.1.2 Sep 25, 2024
2 of 3 checks passed
@github-actions github-actions bot mentioned this pull request Sep 25, 2024
@daytime-em daytime-em deleted the fix/cache-state-errors branch September 25, 2024 20:33
daytime-em added a commit that referenced this pull request Sep 25, 2024
## Improvements

* fix: playback fails sometimes when changing videos  (#59)



Co-authored-by: Emily Dixon <edixon@mux.com>
Co-authored-by: GitHub <noreply@github.com>
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.

2 participants