Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/JarvanMo/ExoVideoView
Browse files Browse the repository at this point in the history
  • Loading branch information
JarvanMo committed Nov 19, 2018
2 parents 3997dae + 5eff705 commit 575f2a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The ExoVideoView can handle its orientation by sensor automatically only when Ex
}
});
```
Note:When the ExoVideoView handle its orientation automatically,The ExoVideoView will call ```activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)``` or ```activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);``` if the ```context``` in controller is an Activity.
> NOTE:When the ExoVideoView handle its orientation automatically,The ExoVideoView will call ```activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)``` or ```activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);``` if the ```context``` in controller is an Activity.
The fullscreen management is the same as orientation management.

### 4.Back Events
Expand Down Expand Up @@ -143,4 +143,4 @@ For more widgets you can hide or show,see [IDS_IN_CONTROLLER](./exoplayerview/sr
app:controller_background="@android:color/holo_orange_dark"
app:use_artwork="true"
app:default_artwork="@drawable/default_art"
```
```
15 changes: 5 additions & 10 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
![logo](./images/default_art.png)
# ExoVideoView




![demo](./images/demo.gif)

ExoVideoView 是一款基于[ExoPlayer](https://github.com/google/ExoPlayer)开发的视频播放器.
![demo](./images/demo.gif)

**ExoVideoView可以做什么**

1.自动处理音频焦点。
2.根据传感器自动处理方向。
3.手势支持。
Expand Down Expand Up @@ -94,7 +89,7 @@ ExoVideoView 可以自动处理方向问题,前提是为ExoVideoView设置一
```
如果返回值是 ```true```, 系统后续动作会被中断.否则,ExoVideoView会自动处理方向,并且会回调```OrientationLister.onOrientationChange()``` .
## 高级
### 1.多清清晰度
### 1.多清晰度支持
ExoVideoView 内置清晰度选择器.如果开启发多清晰度并添加了多清晰度,内置清晰度选择器将被加入```overlayFrameLayout```.
```java
List<ExoMediaSource.Quality> qualities = new ArrayList<>();
Expand Down Expand Up @@ -127,12 +122,12 @@ ExoVideoView 内置清晰度选择器.如果开启发多清晰度并添加了多
videoView.addCustomView(ExoVideoPlaybackControlView.CUSTOM_VIEW_TOP_LANDSCAPE, view);
videoView.addCustomView(ExoVideoPlaybackControlView.CUSTOM_VIEW_BOTTOM_LANDSCAPE, view);
```
### 4.使用自定义controller布局
### 4.使用自定义controller
```exo_video_playback_control_view.xml```是允许自定义的。其中一些属性在```ExoVideoPlaybackControlView```有定义。具体可看源码。
```xml
app:controller_layout_id="@layout/my_controller"
```
### 5.Change Visibility
### 5.更改控件可见性
有些时候我们可能不太喜欢返回,所以就让我们隐藏起来吧:
```java
videoView.changeWidgetVisibility(R.id.exo_player_controller_back,View.INVISIBLE);
Expand All @@ -145,4 +140,4 @@ videoView.changeWidgetVisibility(R.id.exo_player_controller_back,View.INVISIBLE)
app:controller_background="@android:color/holo_orange_dark"
app:use_artwork="true"
app:default_artwork="@drawable/default_art"
```
```

0 comments on commit 575f2a2

Please sign in to comment.