-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fast rewind forward in background activity #3437
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
Fast rewind forward in background activity #3437
Conversation
Only the playbackSpeedButton should be kept, to stay consistent with players. |
I would totally use fast rewind all the time. Like when you listen to some long talk, and missed what the guy just said, and you just want to repeat that - not mess with scroll bar. As for fast forward - I would almost never use that. Listening in background is either for music or some talks - and you totally need fast rewind for talks. I would lift pich/speed control up - you are probably not going to click that many times. |
I see, sorry for my wrong assumptions ;-)
What about moving it to the app bar at the top, where there is also the mute button? |
Progress bar now updates when you press fast forward/rewind and it's paused. |
Sorry for the late response. Apparently the mute button is present in the background player because some people find it useful: #3275 #2876 (comment) |
@Stypox In my opinion, as long as it keeps working as it is now, I don't care if the button is moved, the important thing is to work well. |
@TheLastGimbus could you implement the requested changes, if you have time? ;-) |
Sorry, some other stuffed poped up (I've fell into home automation rabbit hole :P ) |
Okay soo... that's it. |
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.
Your changes cause NewPipe to crash when you rotate your device in this activity.
app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
Outdated
Show resolved
Hide resolved
It does crash...
It's a null object on |
@TheLastGimbus: No, it doesn't, as you didn't make the appropriate changes to the landscape version of the layout: https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/res/layout-land/activity_player_queue_control.xml |
Whoopsie, sorry. Now it works :) |
Sorry that all of this took so long. All of those Java
and I totally agree |
No need to apologize.
That's just Android's API. I don't see how Kotlin would help with that. We're not actively converting the code to Kotlin, but we accept new code written in Kotlin in NewPipe. We're going to fully move to view binding (or data binding when view binding isn't enough for that fragment) though, see #3697. Also, NewPipe's code is currently just pretty crappy.
What are you using for that? I'm using Home Assistant and have it connected to my Hue lights, some Sonoff S20 switches, my UniFi APs for presence detection, and some other small stuff. |
Oh, a lot! Kotlin pretty much does that for you. You don't need to do anything like private ImageButton fastRewindButton;
fastRewindButton = rootView.findViewById(R.id.control_fast_rewind);
fastRewindButton.setOnClickListener(this);
...
// some global method onClick
@Override
public void onClick(final View view) {
switch(view.getId()) // need to check which is it
}
...
fastRewindButton.setText("Something"); you just do fastRewindButton.text = "Something"
fastRewindButton.setOnClickLister {
// stuff
} and it's done.
Yass, HASS is amazing. I use ESP8266's flashed with ESPHome. It enables me to connect anything in my home, with any sensor I want, and then HASS allows me to bind them with each other to do crazy stuff, almost like my home is alive. |
I just discovered that when I use some other way to click backward/forward - that is, buttons on headphones, or volume buttons on LineageOS - it activates next/previous video instead of fast forward/rewind. Spotify in "podcast mode" has those external buttons connected to forward/rewind - could we do the same, or this is intentional? |
Neither do you on Java: button.setOnClickListener((View v) -> {
v.doWhatever();
}); That's also much clearer to me than: button.setOnClickListener {
it.doWhatever()
} View binding also isn't specific to Kotlin, but works on Java as well. Null is also not really a problem if you properly annotate everything. Btw I also use some ESP8266s flashed with ESPHome for e.g. temperature, though I have some Hue lights as well. |
What is it?
Description of the changes in your PR
Honestly, 9 icons in one row is maybe too much? We could move shuffle and repeat upward. And we could remove (one of) playbackSpeedButton/playbackPitchButton, since they both do the same.
Fixes the following issue(s)
fixes #2722
Agreement