mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-11-04 01:03:00 +00:00 
			
		
		
		
	Add speed button to top bar
This commit is contained in:
		@@ -164,6 +164,9 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
 | 
			
		||||
            case R.id.action_append_playlist:
 | 
			
		||||
                appendAllToPlaylist();
 | 
			
		||||
                return true;
 | 
			
		||||
            case R.id.action_playback_speed:
 | 
			
		||||
                openPlaybackParameterDialog();
 | 
			
		||||
                return true;
 | 
			
		||||
            case R.id.action_mute:
 | 
			
		||||
                player.onMuteUnmuteButtonClicked();
 | 
			
		||||
                return true;
 | 
			
		||||
@@ -688,7 +691,10 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
 | 
			
		||||
 | 
			
		||||
    private void onPlaybackParameterChanged(final PlaybackParameters parameters) {
 | 
			
		||||
        if (parameters != null) {
 | 
			
		||||
            Log.d("Dupa", "12");
 | 
			
		||||
            if (menu != null && player != null) {
 | 
			
		||||
                MenuItem item = menu.findItem(R.id.action_playback_speed);
 | 
			
		||||
                item.setTitle(formatSpeed(parameters.speed));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,14 @@
 | 
			
		||||
        android:visible="true"
 | 
			
		||||
        app:showAsAction="ifRoom"/>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/action_playback_speed"
 | 
			
		||||
        android:title="1x"
 | 
			
		||||
        android:tooltipText="@string/playback_speed_control"
 | 
			
		||||
        android:visible="true"
 | 
			
		||||
        app:showAsAction="ifRoom" />
 | 
			
		||||
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/action_mute"
 | 
			
		||||
        android:icon="?attr/volume_off"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user