diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2022-05-15 22:27:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 22:27:56 +0200 |
commit | 531326474f7e239609a5f9ea5bd9be2a38e2eb33 (patch) | |
tree | bbe6bcea7a0525bda80b2e74b48ea5a0477537e1 /app | |
parent | 33fb5e1f14f305b8074b94b578842681d1a4e850 (diff) | |
parent | d9dbfa17110e5cef050ef4075be516b409894d75 (diff) | |
download | AntennaPod-531326474f7e239609a5f9ea5bd9be2a38e2eb33.zip |
Merge pull request #5892 from ByteHamster/speed-video
Add speed dialog to video player
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java | 4 | ||||
-rw-r--r-- | app/src/main/res/menu/mediaplayer.xml | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index 954a6c2f6..9ffade1ca 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -36,6 +36,7 @@ import androidx.core.view.WindowCompat; import androidx.interpolator.view.animation.FastOutSlowInInterpolator; import com.bumptech.glide.Glide; import de.danoeh.antennapod.R; +import de.danoeh.antennapod.dialog.VariableSpeedDialog; import de.danoeh.antennapod.event.playback.BufferUpdateEvent; import de.danoeh.antennapod.event.playback.PlaybackPositionEvent; import de.danoeh.antennapod.event.PlayerErrorEvent; @@ -591,6 +592,7 @@ public class VideoplayerActivity extends CastEnabledActivity implements SeekBar. menu.findItem(R.id.player_switch_to_audio_only).setVisible(true); menu.findItem(R.id.audio_controls).setIcon(R.drawable.ic_sliders); + menu.findItem(R.id.playback_speed).setVisible(true); return true; } @@ -640,6 +642,8 @@ public class VideoplayerActivity extends CastEnabledActivity implements SeekBar. } else if (item.getItemId() == R.id.share_item && feedItem != null) { ShareDialog shareDialog = ShareDialog.newInstance(feedItem); shareDialog.show(getSupportFragmentManager(), "ShareEpisodeDialog"); + } else if (item.getItemId() == R.id.playback_speed) { + new VariableSpeedDialog().show(getSupportFragmentManager(), null); } else { return false; } diff --git a/app/src/main/res/menu/mediaplayer.xml b/app/src/main/res/menu/mediaplayer.xml index 7c66a4d10..ebb0befb0 100644 --- a/app/src/main/res/menu/mediaplayer.xml +++ b/app/src/main/res/menu/mediaplayer.xml @@ -36,6 +36,13 @@ </item> <item + android:id="@+id/playback_speed" + android:title="@string/playback_speed" + android:visible="false" + custom:showAsAction="never"> + </item> + + <item android:id="@+id/open_feed_item" android:icon="@drawable/ic_feed" custom:showAsAction="collapseActionView" |