Skip to content

Commit

Permalink
🔧 update player kernel default value
Browse files Browse the repository at this point in the history
  • Loading branch information
ourfor committed Dec 7, 2024
1 parent 6204a84 commit 8cf8bb7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public enum PlayerKernelType {
MPV,
VLC,
EXO,
VLC,
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import lombok.NoArgsConstructor;
import lombok.With;
import top.ourfor.app.iplayx.common.type.PlayerKernelType;
import top.ourfor.app.iplayx.page.setting.theme.ThemeModel;

@Builder
@With
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
}
}
var kernelOptions = List.of(
new OptionModel<>(PlayerKernelType.VLC, getContext().getString(R.string.player_vlc)),
new OptionModel<>(PlayerKernelType.MPV, getContext().getString(R.string.player_mpv)),
new OptionModel<>(PlayerKernelType.EXO, getContext().getString(R.string.player_exo))
new OptionModel<>(PlayerKernelType.EXO, getContext().getString(R.string.player_exo)),
new OptionModel<>(PlayerKernelType.VLC, getContext().getString(R.string.player_vlc))
);
var defaultPlayerKernelOption = kernelOptions.get(0);
for (val option : kernelOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public PlayerContentView(Context context) {

public void initialize(String configDir, String cacheDir, String fontDir) {
switch (AppSetting.shared.playerKernel) {
case VLC:
viewModel = new VLCPlayerViewModel(this);
break;
case MPV:
viewModel = new MPVPlayerViewModel(configDir, cacheDir, fontDir);
break;
case EXO:
viewModel = new ExoPlayerViewModel(this);
break;
case VLC:
viewModel = new VLCPlayerViewModel(this);
break;
default:
log.info("Using default player: MPV");
viewModel = new MPVPlayerViewModel(configDir, cacheDir, fontDir);
Expand Down

0 comments on commit 8cf8bb7

Please sign in to comment.