Skip to content

Commit

Permalink
优化了现实的问题 (2017-04-28)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Apr 28, 2017
1 parent 5806005 commit e50ccdb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_detail_player);
ButterKnife.bind(this);

//String url = "http://baobab.wdjcdn.com/14564977406580.mp4";
String url = "http://7xse1z.com1.z0.glb.clouddn.com/1491813192";
String url = "http://baobab.wdjcdn.com/14564977406580.mp4";
//String url = "http://7xse1z.com1.z0.glb.clouddn.com/1491813192";
//String url = "http://111.198.24.133:83/yyy_login_server/pic/YB059284/97778276040859/1.mp4";
//String url = "http://vr.tudou.com/v2proxy/v?sid=95001&id=496378919&st=3&pw=";
//String url = "http://pl-ali.youku.com/playlist/m3u8?type=mp4&ts=1490185963&keyframe=0&vid=XMjYxOTQ1Mzg2MA==&ep=ciadGkiFU8cF4SvajD8bYyuwJiYHXJZ3rHbN%2FrYDAcZuH%2BrC6DPcqJ21TPs%3D&sid=04901859548541247bba8&token=0524&ctype=12&ev=1&oip=976319194";
//String url = "http://hls.ciguang.tv/hdtv/video.m3u8";
//String url = "https://res.exexm.com/cw_145225549855002";
detailPlayer.setUp(url, true, null, "测试视频");
detailPlayer.setUp(url, false, null, "测试视频");
//detailPlayer.setLooping(true);
//detailPlayer.setShowPauseCover(false);
/*VideoOptionModel videoOptionModel =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
//如果旋转后的高度大于宽度
if (width > height) {
//如果视频的旋转后,width(高度)大于控件高度,需要压缩下高度
if (heightS < widthS) {
if (originH < originW) {
if (width > heightS) {
height = (int) (height * ((float) width / heightS));
width = heightS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
//如果旋转后的高度大于宽度
if (width > height) {
//如果视频的旋转后,width(高度)大于控件高度,需要压缩下高度
if (heightS < widthS) {
if (originH < originW) {
if (width > heightS) {
height = (int) (height * ((float) width / heightS));
width = heightS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static int getShowType() {
}

/**
* 设置显示比例
* 设置显示比例,注意,这是全局生效的
*/
public static void setShowType(int type) {
TYPE = type;
Expand Down

0 comments on commit e50ccdb

Please sign in to comment.