mirror of
https://github.com/tuskyapp/Tusky
synced 2024-12-18 03:48:53 +01:00
Merge branch 'video_loop' of https://github.com/theZacAttacks/Tusky into theZacAttacks-video_loop
This commit is contained in:
commit
e9c5c2b7c1
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user