|
|
|
|
@ -20,9 +20,6 @@ import com.github.tvbox.osc.R; |
|
|
|
|
import com.github.tvbox.osc.api.ApiConfig; |
|
|
|
|
import com.github.tvbox.osc.bean.IJKCode; |
|
|
|
|
import com.github.tvbox.osc.bean.ParseBean; |
|
|
|
|
import com.github.tvbox.osc.player.thirdparty.Kodi; |
|
|
|
|
import com.github.tvbox.osc.player.thirdparty.MXPlayer; |
|
|
|
|
import com.github.tvbox.osc.player.thirdparty.ReexPlayer; |
|
|
|
|
import com.github.tvbox.osc.subtitle.widget.SimpleSubtitleView; |
|
|
|
|
import com.github.tvbox.osc.ui.adapter.ParseAdapter; |
|
|
|
|
import com.github.tvbox.osc.ui.adapter.SelectDialogAdapter; |
|
|
|
|
@ -347,22 +344,19 @@ public class VodController extends BaseController { |
|
|
|
|
// myHandle.postDelayed(myRunnable, myHandleSeconds);
|
|
|
|
|
try { |
|
|
|
|
int playerType = mPlayerConfig.getInt("pl"); |
|
|
|
|
boolean playerVail = false; |
|
|
|
|
do { |
|
|
|
|
playerType++; |
|
|
|
|
if (playerType <= 2) { |
|
|
|
|
playerVail = true; |
|
|
|
|
} else if (playerType == 10) { |
|
|
|
|
playerVail = MXPlayer.getPackageInfo() != null; |
|
|
|
|
} else if (playerType == 11) { |
|
|
|
|
playerVail = ReexPlayer.getPackageInfo() != null; |
|
|
|
|
} else if (playerType == 12) { |
|
|
|
|
playerVail = Kodi.getPackageInfo() != null; |
|
|
|
|
} else if (playerType > 11) { |
|
|
|
|
playerType = 0; |
|
|
|
|
playerVail = true; |
|
|
|
|
ArrayList<Integer> exsitPlayerTypes = PlayerHelper.getExistPlayerTypes(); |
|
|
|
|
int playerTypeIdx = 0; |
|
|
|
|
int playerTypeSize = exsitPlayerTypes.size(); |
|
|
|
|
for(int i = 0; i<playerTypeSize; i++) { |
|
|
|
|
if (playerType == exsitPlayerTypes.get(i)) { |
|
|
|
|
if (i == playerTypeSize - 1) { |
|
|
|
|
playerTypeIdx = 0; |
|
|
|
|
} else { |
|
|
|
|
playerTypeIdx = i + 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} while (!playerVail); |
|
|
|
|
} |
|
|
|
|
playerType = exsitPlayerTypes.get(playerTypeIdx); |
|
|
|
|
mPlayerConfig.put("pl", playerType); |
|
|
|
|
updatePlayerCfgView(); |
|
|
|
|
listener.updatePlayerCfg(); |
|
|
|
|
@ -574,9 +568,11 @@ public class VodController extends BaseController { |
|
|
|
|
@Override |
|
|
|
|
public boolean onLongClick(View view) { |
|
|
|
|
mSubtitleView.setVisibility(View.GONE); |
|
|
|
|
mSubtitleView.destroy(); |
|
|
|
|
mSubtitleView.clearSubtitleCache(); |
|
|
|
|
mSubtitleView.isInternal = false; |
|
|
|
|
hideBottom(); |
|
|
|
|
Toast.makeText(getContext(), "外挂字幕已关闭", Toast.LENGTH_SHORT).show(); |
|
|
|
|
Toast.makeText(getContext(), "字幕已关闭", Toast.LENGTH_SHORT).show(); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|