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

Add Rewind & FastForward buttons to AudioNowPlayingFragment #4503

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

conihorse
Copy link

Changes

Added rewind and fast-forward buttons to to AudioNowPlayingFragment. These allow the user to seek audio content forward and backward by a predefined duration using the UI.

Issues

@@ -161,13 +161,27 @@
android:layout_height="28sp"
android:src="@drawable/ic_previous" />

<ImageButton

Check warning

Code scanning / Android Lint

Image without contentDescription Warning

Missing contentDescription attribute on image
<ImageButton
android:id="@+id/playPauseBtn"
style="@style/Button.Icon"
android:layout_width="28sp"
android:layout_height="28sp"
android:src="@drawable/ic_pause" />

<ImageButton

Check warning

Code scanning / Android Lint

Image without contentDescription Warning

Missing contentDescription attribute on image
Comment on lines +277 to +282

val prefs = get<UserSettingPreferences>(UserSettingPreferences::class.java)
val amount = prefs.get<Int>(skipBackLength);
playbackManager.state.seek(
playbackManager.state.positionInfo.active - amount.toDuration(DurationUnit.MILLISECONDS),
)
Copy link
Member

Choose a reason for hiding this comment

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

Should use the PlayerState rewind function

Comment on lines +295 to +299
val prefs = get<UserSettingPreferences>(UserSettingPreferences::class.java)
val amount = prefs.get<Int>(skipForwardLength);
playbackManager.state.seek(
playbackManager.state.positionInfo.active + amount.toDuration(DurationUnit.MILLISECONDS),
)
Copy link
Member

Choose a reason for hiding this comment

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

Should use the PlayerState fastForward function

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