adding controls to exit pip or switch to background audio
This commit is contained in:
parent
f04c64a60d
commit
61aa0e379b
|
@ -56,6 +56,8 @@ import net.schueller.peertube.service.VideoPlayerService;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,7 +175,7 @@ public class VideoPlayActivity extends AppCompatActivity {
|
||||||
|
|
||||||
if (isLandscape) {
|
if (isLandscape) {
|
||||||
assert videoPlayerFragment != null;
|
assert videoPlayerFragment != null;
|
||||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) Objects.requireNonNull(videoPlayerFragment.getView()).getLayoutParams();
|
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) videoPlayerFragment.requireView().getLayoutParams();
|
||||||
params.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
params.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||||
params.height = FrameLayout.LayoutParams.MATCH_PARENT;
|
params.height = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||||
videoPlayerFragment.getView().setLayoutParams(params);
|
videoPlayerFragment.getView().setLayoutParams(params);
|
||||||
|
@ -390,7 +392,7 @@ public class VideoPlayActivity extends AppCompatActivity {
|
||||||
if (action.equals(ACTION_PLAY)){
|
if (action.equals(ACTION_PLAY)){
|
||||||
videoPlayerFragment.pauseToggle();
|
videoPlayerFragment.pauseToggle();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if (action.equals(BACKGROUND_AUDIO)) {
|
if (action.equals(BACKGROUND_AUDIO)) {
|
||||||
unregisterReceiver(receiver);
|
unregisterReceiver(receiver);
|
||||||
finish();
|
finish();
|
||||||
|
|
Loading…
Reference in New Issue