Some fixes

This commit is contained in:
Thomas 2020-11-17 18:30:56 +01:00
parent 8cc8b284ce
commit 3233fe673d
2 changed files with 13 additions and 1 deletions

View File

@ -537,6 +537,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
binding.doubleTapPlayerView.setPlayer(player);
binding.loader.setVisibility(View.GONE);
player.setPlayWhenReady(autoPlay);
if (autoPlay) {
binding.doubleTapPlayerView.hideController();
}
captions = null;
}
currentResolution = null;
@ -819,6 +822,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
autoPlay, position, null, null);
player.prepare();
player.setPlayWhenReady(autoPlay);
if (autoPlay) {
binding.doubleTapPlayerView.hideController();
}
}
@ -951,6 +957,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
player.seekTo(0, position);
}
player.setPlayWhenReady(autoPlay);
if (autoPlay) {
binding.doubleTapPlayerView.hideController();
}
}
@Override
@ -1010,6 +1019,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
onStopCalled = false;
if (player != null && !player.isPlaying()) {
player.setPlayWhenReady(autoPlay);
if (autoPlay) {
binding.doubleTapPlayerView.hideController();
}
}
}

View File

@ -70,7 +70,7 @@ public class MenuAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
final MenuItemVideo menuItemVideo = menuItemVideos.get(i);
Glide.with(context).load(menuItemVideo.getIcon()).into(holder.binding.menuIcon);
holder.binding.menuIcon.setImageResource(menuItemVideo.getIcon());
holder.binding.title.setText(menuItemVideo.getTitle());
holder.binding.itemMenuContainer.setOnClickListener(v -> {
itemClicked.onItemClicked(menuItemVideo.getAction());