mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-05-26 06:20:20 -04:00
添加投屏
This commit is contained in:
parent
796643e549
commit
191df67125
@ -74,6 +74,7 @@ public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
||||
setmenu.findItem(R.id.actionBar_option_HAACC).setChecked(JfClient.config.isHAACC());
|
||||
setmenu.findItem(R.id.actionBar_option_FORCE_HAACC).setChecked(JfClient.config.isFORCE_HAACC());
|
||||
setmenu.findItem(R.id.actionBar_option_ExtensionPlayer).setChecked(JfClient.config.isExtensionPlayer());
|
||||
setmenu.findItem(R.id.actionBar_option_DlnaPlayer).setChecked(JfClient.config.isDlnaPlayer());
|
||||
}
|
||||
};
|
||||
|
||||
@ -97,6 +98,9 @@ public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
||||
case R.id.actionBar_option_ExtensionPlayer:
|
||||
JfClient.config.setExtensionPlayer(!JfClient.config.isExtensionPlayer());
|
||||
break;
|
||||
case R.id.actionBar_option_DlnaPlayer:
|
||||
JfClient.config.setDlnaPlayer(!JfClient.config.isDlnaPlayer());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -376,7 +376,10 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
||||
|
||||
public void toVlcPlayer() {
|
||||
Intent intent;
|
||||
if (JfClient.config.isExtensionPlayer()) {
|
||||
if (JfClient.config.isDlnaPlayer()) {
|
||||
ShowToask("投屏播放");
|
||||
return;
|
||||
} else if (JfClient.config.isExtensionPlayer()) {
|
||||
String videourl = JfClient.playList.get(JfClient.playIndex).Url;
|
||||
Uri uri = Uri.parse(videourl);
|
||||
intent = new Intent();
|
||||
|
@ -14,7 +14,7 @@ public class Config {
|
||||
private boolean HAACC; //硬解
|
||||
private boolean FORCE_HAACC; //强制硬解
|
||||
private boolean ExtensionPlayer; //调用外部播放器
|
||||
|
||||
private boolean DlnaPlayer; //投屏播放
|
||||
public boolean isExtensionPlayer() {
|
||||
return ExtensionPlayer;
|
||||
}
|
||||
@ -101,6 +101,15 @@ public class Config {
|
||||
saveConfigToSP("FORCE_HAACC",FORCE_HAACC);
|
||||
}
|
||||
|
||||
public boolean isDlnaPlayer() {
|
||||
return DlnaPlayer;
|
||||
}
|
||||
|
||||
public void setDlnaPlayer(boolean dlnaPlayer) {
|
||||
this.DlnaPlayer = dlnaPlayer;
|
||||
saveConfigToSP("DlnaPlayer",dlnaPlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取配置
|
||||
*/
|
||||
@ -115,6 +124,7 @@ public class Config {
|
||||
this.FORCE_HAACC = sp.getBoolean("FORCE_HAACC",false);
|
||||
this.PlayStartInBegin = sp.getBoolean("PlayStartInBegin",true);
|
||||
this.ExtensionPlayer = sp.getBoolean("ExtensionPlayer",false);
|
||||
this.DlnaPlayer = sp.getBoolean("DlnaPlayer",false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,6 +28,12 @@
|
||||
android:checkable="true"
|
||||
android:title="调用外部播放器" />
|
||||
|
||||
<item
|
||||
android:id="@+id/actionBar_option_DlnaPlayer"
|
||||
android:orderInCategory="10"
|
||||
android:checkable="true"
|
||||
android:title="投屏播放" />
|
||||
|
||||
<item
|
||||
android:id="@+id/activeBar_option_logout"
|
||||
android:orderInCategory="99"
|
||||
|
Loading…
Reference in New Issue
Block a user