-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
Prevent destruction of session, so that an app restart can reconnect (chromecast). #1469
base: master
Are you sure you want to change the base?
Conversation
@@ -190,6 +190,7 @@ class MainActivity : AppCompatActivity() { | |||
fragment.onUserLeaveHint() | |||
} | |||
} | |||
super.onUserLeaveHint() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added due to the linter/editor complaining it should not have been left out.
@@ -33,7 +33,7 @@ public final class Chromecast implements IChromecast { | |||
/** | |||
* Object to control the media. | |||
*/ | |||
private ChromecastSession media; | |||
private ChromecastSession chromecastSession; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed the variable name to be more "descriptive" as to what this variable actually was. For the longest time I got a little confused and thought this was the actual media, not the session.
org.gradle.jvmargs=-Xmx2G -XX:MaxMetaspaceSize=512m | ||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=1G |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a beefier debugging machine, but we can reset this down if folks want. This helped speed up my build times quite a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be interesting for you. I'd prefer to keep the lower defaults in this repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely I'll remove these changes when I can get back on my computer.
Would this also fix #184? Or is #184 describing this limitation:
|
It will allow you to reconnect. (You can build this yourself to see). But it's not automatic yet. I was having trouble getting the automatic reconnect to work. However you can manually reconnect by reperforming the normal steps you would do. |
This is my first commit but I'd like to keep things small-ish/have targeted improvement.
There is an issue where the controls have repeatedly disappeared for various users:
#459
This change set at least allows the user to forcibly close the app and re-open it, allowing for a reconnection to the session.
The downside is that the session will continue until the user intentionally stops it. Which means that it could potentially continue playing in the background indefinitely unless the server is somehow configured with an "Are you still here?" style of message & session booting based on no user input.
I still think this is better for the time being, because the alternative is that every time I lose control of the chromecast controls, I have to restart the app, which actually stops my TV from chromecasting, and I lose all my progress. This is exceedingly annoying as is.
By comparison, when YouTube is closed while chromecasting, it continues to operate (eventually displaying that "are you still here?" message).
Further notes:
Changes
Issues
#459