[Android] Do not permit seeking on an unseekable stream (PlayerControlClassic)

Edward Wang git at videolan.org
Sat Feb 23 19:09:26 CET 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sat Feb 23 12:53:23 2013 -0500| [5a27aee652c977f4a4444952ae52e363ff9f77cd] | committer: Edward Wang

Do not permit seeking on an unseekable stream (PlayerControlClassic)

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=5a27aee652c977f4a4444952ae52e363ff9f77cd
---

 .../src/org/videolan/vlc/widget/PlayerControlClassic.java     |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/widget/PlayerControlClassic.java b/vlc-android/src/org/videolan/vlc/widget/PlayerControlClassic.java
index 20537bb..7861599 100644
--- a/vlc-android/src/org/videolan/vlc/widget/PlayerControlClassic.java
+++ b/vlc-android/src/org/videolan/vlc/widget/PlayerControlClassic.java
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * PlayerControlClassic.java
  *****************************************************************************
- * Copyright © 2012 VLC authors and VideoLAN
+ * Copyright © 2012-2013 VLC authors and VideoLAN
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,6 +31,7 @@ import android.widget.ImageButton;
 import android.widget.LinearLayout;
 
 public class PlayerControlClassic extends LinearLayout implements IPlayerControl {
+    public final static String TAG = "VLC/PlayerControlClassic";
 
     private ImageButton mBackward;
     private ImageButton mPlayPause;
@@ -85,4 +86,10 @@ public class PlayerControlClassic extends LinearLayout implements IPlayerControl
     public void setOnPlayerControlListener(OnPlayerControlListener listener) {
         this.listener = listener;
     }
+
+    @Override
+    public void setSeekable(boolean isSeekable) {
+        mBackward.setVisibility(isSeekable ? View.VISIBLE : View.INVISIBLE);
+        mForward.setVisibility(isSeekable ? View.VISIBLE : View.INVISIBLE);
+    }
 }



More information about the Android mailing list