Skip to content

Commit

Permalink
update support isNeedRotateWithSystem with Detail
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Nov 18, 2020
1 parent b4b845c commit 3cc7aad
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void onPrepared(String url, Object... objects) {
Debuger.printfError("***** onPrepared **** " + objects[1]);
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;

//设置 seek 的临近帧。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void onClick(View v) {
public void onPrepared(String url, Object... objects) {
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(danmakuVideoPlayer.isRotateWithSystem());
isPlay = true;
getDanmu();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void onPrepared(String url, Object... objects) {
Debuger.printfError("***** onPrepared **** " + objects[1]);
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;

//设置 seek 的临近帧。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void onPrepared(String url, Object... objects) {
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
//orientationUtils.setEnable(true);
orientationUtils.setEnable(false);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void onPrepared(String url, Object... objects) {
Debuger.printfError("***** onPrepared **** " + objects[1]);
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;

//设置 seek 的临近帧。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ protected void onCreate(Bundle savedInstanceState) {
.setRotateViewAuto(false)
//仅仅横屏旋转,不变直
//.setOnlyRotateLand(true)
.setRotateWithSystem(true)
.setLockLand(true)
.setAutoFullWithSize(true)
.setShowFullAnimation(false)
Expand Down Expand Up @@ -271,7 +272,7 @@ public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
//如果旋转了就全屏
if (isPlay && !isPause) {
detailPlayer.onConfigurationChanged(this, newConfig, needRotateSystem() ? orientationUtils : null, true, true);
detailPlayer.onConfigurationChanged(this, newConfig, orientationUtils, true, true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onPrepared(String url, Object... objects) {
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void onPrepared(String url, Object... objects) {
Debuger.printfError("***** onPrepared **** " + objects[1]);
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;
root.removeView(fab);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void onPrepared(String url, Object... objects) {
Debuger.printfError("***** onPrepared **** " + objects[1]);
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;

//设置 seek 的临近帧。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onPrepared(String url, Object... objects) {
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
isPlay = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onPrepared(String url, Object... objects) {
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
orientationUtils.setEnable(detailPlayer.isRotateWithSystem());
}

@Override
Expand Down

0 comments on commit 3cc7aad

Please sign in to comment.