[Android] MediaPlayer: set setVideoTrackEnabled public
Thomas Guillem
git at videolan.org
Thu Nov 26 14:45:45 CET 2015
vlc-ports/android | branch: video_playlist | Thomas Guillem <thomas at gllm.fr> | Thu Nov 26 14:44:45 2015 +0100| [666d4435cbfccf3137253c8ed245b45733658621] | committer: Thomas Guillem
MediaPlayer: set setVideoTrackEnabled public
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=666d4435cbfccf3137253c8ed245b45733658621
---
libvlc/src/org/videolan/libvlc/MediaPlayer.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libvlc/src/org/videolan/libvlc/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
index 2eab202..32e67a0 100644
--- a/libvlc/src/org/videolan/libvlc/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
@@ -551,10 +551,15 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
return nativeSetVideoTrack(index);
}
- private void setVideoTrackEnabled(boolean enabled) {
+ /**
+ * Set the enabled state of the video track
+ *
+ * @param enabled
+ */
+ public void setVideoTrackEnabled(boolean enabled) {
if (!enabled) {
setVideoTrack(-1);
- } else {
+ } else if (getVideoTrack() == -1) {
final MediaPlayer.TrackDescription tracks[] = getVideoTracks();
if (tracks != null) {
More information about the Android
mailing list