[Android] Change video from recommendation cards
Geoffrey Métais
git at videolan.org
Thu Sep 3 15:26:28 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Sep 3 15:21:02 2015 +0200| [98ff80c4a62b2a3b801a109a385df79b9c4242a9] | committer: Geoffrey Métais
Change video from recommendation cards
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=98ff80c4a62b2a3b801a109a385df79b9c4242a9
---
.../org/videolan/vlc/gui/video/VideoPlayerActivity.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 9eaa36b..da26ba0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -507,6 +507,18 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
setRequestedOrientation(mScreenOrientationLock);
}
+ @Override
+ protected void onNewIntent(Intent intent) {
+ setIntent(intent);
+ if (mPlaybackStarted) {
+ Uri uri = intent.hasExtra(PLAY_EXTRA_ITEM_LOCATION) ? (Uri) intent.getExtras().getParcelable(PLAY_EXTRA_ITEM_LOCATION) : intent.getData();
+ if (uri == null || uri.equals(mUri))
+ return;
+ stopPlayback();
+ startPlayback();
+ }
+ }
+
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
protected void onPause() {
More information about the Android
mailing list