|
|
@ -31,17 +31,15 @@ public class VideoPreviewBar extends RelativeLayout implements HardwareDecode.On |
|
|
|
|
|
|
|
|
|
|
|
private SeekBar previewBar; |
|
|
|
private SeekBar previewBar; |
|
|
|
|
|
|
|
|
|
|
|
private HardwareDecode hardwareDecode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int duration; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PreviewBarCallback mPreviewBarCallback; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private TextView txtVideoProgress; |
|
|
|
private TextView txtVideoProgress; |
|
|
|
|
|
|
|
|
|
|
|
private TextView txtVideoDuration; |
|
|
|
private TextView txtVideoDuration; |
|
|
|
|
|
|
|
|
|
|
|
private boolean isShowing; |
|
|
|
private HardwareDecode hardwareDecode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PreviewBarCallback mPreviewBarCallback; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int duration; |
|
|
|
|
|
|
|
|
|
|
|
private int screenWidth; |
|
|
|
private int screenWidth; |
|
|
|
|
|
|
|
|
|
|
@ -138,8 +136,7 @@ public class VideoPreviewBar extends RelativeLayout implements HardwareDecode.On |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onStartTrackingTouch(SeekBar seekBar) { |
|
|
|
public void onStartTrackingTouch(SeekBar seekBar) { |
|
|
|
if (!isShowing && texturePreView != null) { |
|
|
|
if (texturePreView != null) { |
|
|
|
isShowing = true; |
|
|
|
|
|
|
|
texturePreView.setVisibility(VISIBLE); |
|
|
|
texturePreView.setVisibility(VISIBLE); |
|
|
|
} |
|
|
|
} |
|
|
|
if (hardwareDecode != null) { |
|
|
|
if (hardwareDecode != null) { |
|
|
@ -149,8 +146,7 @@ public class VideoPreviewBar extends RelativeLayout implements HardwareDecode.On |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onStopTrackingTouch(SeekBar seekBar) { |
|
|
|
public void onStopTrackingTouch(SeekBar seekBar) { |
|
|
|
if (isShowing && texturePreView != null) { |
|
|
|
if (texturePreView != null) { |
|
|
|
isShowing = false; |
|
|
|
|
|
|
|
texturePreView.setVisibility(GONE); |
|
|
|
texturePreView.setVisibility(GONE); |
|
|
|
} |
|
|
|
} |
|
|
|
if (mPreviewBarCallback != null) { |
|
|
|
if (mPreviewBarCallback != null) { |
|
|
|