From 1c5a58265fa86ae76c11adb4f753e0d374e050ca Mon Sep 17 00:00:00 2001 From: Zachary Epps Date: Mon, 10 Apr 2017 15:39:21 -0400 Subject: [PATCH] changed VideoActivity to allow for video looping --- .../java/com/keylesspalace/tusky/ViewVideoActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewVideoActivity.java b/app/src/main/java/com/keylesspalace/tusky/ViewVideoActivity.java index c32c8e45b..05ec430e2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewVideoActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ViewVideoActivity.java @@ -15,6 +15,7 @@ package com.keylesspalace.tusky; +import android.media.MediaPlayer; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.widget.Toolbar; @@ -52,6 +53,12 @@ public class ViewVideoActivity extends BaseActivity { controller.setMediaPlayer(videoView); videoView.setMediaController(controller); videoView.requestFocus(); + videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { + @Override + public void onPrepared(MediaPlayer mp) { + mp.setLooping(true); + } + }); videoView.start(); }