Skip to content

Commit

Permalink
Add Reex player support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuke committed Jul 6, 2022
1 parent fcd7625 commit c68bdd3
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 465 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.github.tvbox.osc.bean.IJKCode;
import com.github.tvbox.osc.bean.ParseBean;
import com.github.tvbox.osc.player.thirdparty.MXPlayer;
import com.github.tvbox.osc.player.thirdparty.ReexPlayer;
import com.github.tvbox.osc.ui.adapter.ParseAdapter;
import com.github.tvbox.osc.util.HawkConfig;
import com.github.tvbox.osc.util.PlayerHelper;
Expand Down Expand Up @@ -239,7 +240,9 @@ public void onClick(View view) {
playerVail = true;
} else if (playerType == 10) {
playerVail = mxPlayerExist;
} else if (playerType > 10) {
} else if (playerType == 11) {
playerVail = reexPlayerExist;
} else if (playerType > 11) {
playerType = 0;
playerVail = true;
}
Expand All @@ -248,7 +251,7 @@ public void onClick(View view) {
updatePlayerCfgView();
listener.updatePlayerCfg();
listener.replay();
hideBottom();
// hideBottom();
} catch (JSONException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -340,11 +343,13 @@ public void showParse(boolean userJxList) {
private JSONObject mPlayerConfig = null;

private boolean mxPlayerExist = false;
private boolean reexPlayerExist = false;

public void setPlayerConfig(JSONObject playerCfg) {
this.mPlayerConfig = playerCfg;
updatePlayerCfgView();
mxPlayerExist = MXPlayer.getMXPackageInfo() != null;
mxPlayerExist = MXPlayer.getPackageInfo() != null;
reexPlayerExist = ReexPlayer.getPackageInfo() != null;
}

void updatePlayerCfgView() {
Expand Down
Loading

0 comments on commit c68bdd3

Please sign in to comment.