Skip to content

Commit 46ab825

Browse files
committed
Support more scale types
1 parent 80e312b commit 46ab825

File tree

10 files changed

+411
-314
lines changed

10 files changed

+411
-314
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ VideoListPlayer实现了在列表控件(ListView, RecyclerView)中加载并
1010

1111
#Changelogs
1212

13+
**v.14**
14+
1.支持更多类型的scaleType,详见 [Android-ScalableVideoView](https://github.com/yqritc/Android-ScalableVideoView)
15+
2.加入 `getCurrentPosition()``getDuration()` 接口
16+
1317
**v1.3**
1418

1519
fix在多类型列表元素中出现视频无法正常播放的bug

app/src/main/java/com/waynell/videolist/demo/holder/VideoViewHolder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ void cliclVideoView() {
8282
videoView.mute();
8383
Toast.makeText(itemView.getContext(), "turn off video sound", Toast.LENGTH_SHORT).show();
8484
}
85+
86+
Toast.makeText(itemView.getContext(), "durration: " + videoView.getDuration() + " pos: " + videoView.getCurrentPosition(), Toast.LENGTH_LONG).show();
8587
}
8688

8789
private void reset() {

app/src/main/res/layout/video_list_item.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
android:layout_width="match_parent"
66
android:layout_height="300dp"
7+
android:background="#000000"
78
android:orientation="vertical">
89

910
<FrameLayout
@@ -13,7 +14,8 @@
1314
<com.waynell.videolist.widget.TextureVideoView
1415
android:id="@+id/video_view"
1516
android:layout_width="match_parent"
16-
android:layout_height="300dp" />
17+
android:layout_height="300dp"
18+
app:scaleType="fitCenter"/>
1719

1820
<ImageView
1921
android:id="@+id/video_cover"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.waynell.videolist.widget;
2+
3+
/**
4+
* Create On 05/01/2017
5+
* @author Wayne
6+
*/
7+
public enum PivotPoint {
8+
LEFT_TOP,
9+
LEFT_CENTER,
10+
LEFT_BOTTOM,
11+
CENTER_TOP,
12+
CENTER,
13+
CENTER_BOTTOM,
14+
RIGHT_TOP,
15+
RIGHT_CENTER,
16+
RIGHT_BOTTOM
17+
}

video-list-player/src/main/java/com/waynell/videolist/widget/ScalableTextureView.java

Lines changed: 0 additions & 287 deletions
This file was deleted.

0 commit comments

Comments
 (0)