use of org.thoughtcrime.securesms.giph.mp4.GiphyMp4ProjectionPlayerHolder in project Signal-Android by WhisperSystems.
the class MessageDetailsFragment method initializeVideoPlayer.
private void initializeVideoPlayer(@NonNull View view) {
FrameLayout videoContainer = view.findViewById(R.id.video_container);
RecyclerView recyclerView = view.findViewById(R.id.message_details_list);
List<GiphyMp4ProjectionPlayerHolder> holders = GiphyMp4ProjectionPlayerHolder.injectVideoViews(requireContext(), getLifecycle(), videoContainer, 1);
GiphyMp4ProjectionRecycler callback = new GiphyMp4ProjectionRecycler(holders);
GiphyMp4PlaybackController.attach(recyclerView, callback, 1);
}
use of org.thoughtcrime.securesms.giph.mp4.GiphyMp4ProjectionPlayerHolder in project Signal-Android by WhisperSystems.
the class ConversationFragment method initializeGiphyMp4.
@NonNull
private GiphyMp4ProjectionRecycler initializeGiphyMp4() {
int maxPlayback = GiphyMp4PlaybackPolicy.maxSimultaneousPlaybackInConversation();
List<GiphyMp4ProjectionPlayerHolder> holders = GiphyMp4ProjectionPlayerHolder.injectVideoViews(requireContext(), getViewLifecycleOwner().getLifecycle(), videoContainer, maxPlayback);
GiphyMp4ProjectionRecycler callback = new GiphyMp4ProjectionRecycler(holders);
GiphyMp4PlaybackController.attach(list, callback, maxPlayback);
list.addItemDecoration(new GiphyMp4ItemDecoration(callback, translationY -> {
reactionsShade.setTranslationY(translationY + list.getHeight());
return Unit.INSTANCE;
}), 0);
return callback;
}
use of org.thoughtcrime.securesms.giph.mp4.GiphyMp4ProjectionPlayerHolder in project Signal-Android by signalapp.
the class MessageDetailsFragment method initializeVideoPlayer.
private void initializeVideoPlayer(@NonNull View view) {
FrameLayout videoContainer = view.findViewById(R.id.video_container);
RecyclerView recyclerView = view.findViewById(R.id.message_details_list);
List<GiphyMp4ProjectionPlayerHolder> holders = GiphyMp4ProjectionPlayerHolder.injectVideoViews(requireContext(), getLifecycle(), videoContainer, 1);
GiphyMp4ProjectionRecycler callback = new GiphyMp4ProjectionRecycler(holders);
GiphyMp4PlaybackController.attach(recyclerView, callback, 1);
}
use of org.thoughtcrime.securesms.giph.mp4.GiphyMp4ProjectionPlayerHolder in project Signal-Android by signalapp.
the class ConversationFragment method initializeGiphyMp4.
@NonNull
private GiphyMp4ProjectionRecycler initializeGiphyMp4() {
int maxPlayback = GiphyMp4PlaybackPolicy.maxSimultaneousPlaybackInConversation();
List<GiphyMp4ProjectionPlayerHolder> holders = GiphyMp4ProjectionPlayerHolder.injectVideoViews(requireContext(), getViewLifecycleOwner().getLifecycle(), videoContainer, maxPlayback);
GiphyMp4ProjectionRecycler callback = new GiphyMp4ProjectionRecycler(holders);
GiphyMp4PlaybackController.attach(list, callback, maxPlayback);
list.addItemDecoration(new GiphyMp4ItemDecoration(callback, translationY -> {
reactionsShade.setTranslationY(translationY + list.getHeight());
return Unit.INSTANCE;
}), 0);
return callback;
}
Aggregations