changed VideoActivity to allow for video looping
This commit is contained in:
parent
c9e7401fca
commit
1c5a58265f
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
package com.keylesspalace.tusky;
|
package com.keylesspalace.tusky;
|
||||||
|
|
||||||
|
import android.media.MediaPlayer;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
|
@ -52,6 +53,12 @@ public class ViewVideoActivity extends BaseActivity {
|
||||||
controller.setMediaPlayer(videoView);
|
controller.setMediaPlayer(videoView);
|
||||||
videoView.setMediaController(controller);
|
videoView.setMediaController(controller);
|
||||||
videoView.requestFocus();
|
videoView.requestFocus();
|
||||||
|
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
|
||||||
|
@Override
|
||||||
|
public void onPrepared(MediaPlayer mp) {
|
||||||
|
mp.setLooping(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
videoView.start();
|
videoView.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue