This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
1,231 additions
and
1,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#自定义UI | ||
|
||
参照JCVideoPlayerSimple,JCVideoPlayerStandard,JCVideoPlayerStandardWithShareButton | ||
|
||
1. 继承JCVideoPlayer,JCVideoPlayer中包含所有关于播放的代码,不包含任何UI的代码 | ||
2. getLayoutId();布局的id | ||
3. Override init(Context context);这里初始化自定义控件 | ||
4. Override setStateAndUi(int state);是重点,自定义各个状态的UI,如果在其他地方修改UI应该保持谨慎 | ||
5. Override onTouch(),onClick();如果有需要 | ||
6. 在自定义UI之后,应该依然按照[README.md](./README-ZH.md)中的4步骤来调用播放器 | ||
|
||
关于控件id的问题,在Base simple ui example中的所有最基础的id是写死在JCVideoPlayer中的,下面的控件id已经findViewById过了不需要再findViewById | ||
|
||
| 控件 | id | | ||
| ------------- |:-------------:| | ||
| 开始按钮 | start | | ||
| 全屏按钮 | fullscreen | | ||
| 进度条 | progress | | ||
| 总共时间 | total | | ||
| 下方layout | layout_bottom | | ||
| 上方layout | layout_top | | ||
| SurfaceView的容器 | surface_container | | ||
|
||
如果想快速的集成视频播放功能,建议参照JCVideoPlayerStandardWithShareButton来做,它继承JCVideoPlayerStandard,JCVideoPlayerStandard的目标是和今日头条的细节保持一致 | ||
|
||
如果想完全自定义UI,参照JCVideoPlayerStandard | ||
|
||
如果在JCVideoPlayer之外写任何关于控制视频的代码不是我们的初衷,请提issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#Custom ui | ||
|
||
Referring JCVideoPlayerSimple, JCVideoPlayerStandard JCVideoPlayerStandardWith ShareButton | ||
|
||
1. Inheritance JCVideoPlayer, JCVideoPlayer contains all the code on the player and does not contain any UI code | ||
2. getLayoutId (); id layout | ||
3. Override init (Context context); custom initialized here | ||
4. Override setStateAndUi (int state); the focus, customize each state UI, if you modify the UI in other places should remain cautious | ||
5. Override onTouch (), onClick (); if necessary | ||
6. After the custom UI, you should still follow [README.md](./README.md) 4 steps to invoke Player | ||
|
||
Control id on the problem, all in the most basic id Base simple ui example of death is written in JCVideoPlayer the following controls id has findViewById past do not need to findViewById | ||
|
||
| control | id | | ||
| ------------- |:-------------:| | ||
| start button | start | | ||
| fullscreen button | fullscreen | | ||
| progress | progress | | ||
| current time | current | | ||
| total time | total | | ||
| bottom layout | layout_bottom | | ||
| top layout | layout_top | | ||
| SurfaceView container | surface_container | | ||
|
||
If you want to quickly integrate video playback, we recommend referring JCVideoPlayerStandardWithShareButton do, it inherits JCVideoPlayerStandard, JCVideoPlayerStandard goal is and details of today's headlines are consistent | ||
|
||
If you want to fully customize the UI, referring JCVideoPlayerStandard | ||
|
||
If you write any code on the control of the video outside JCVideoPlayer not our intention, please mention the issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.