@@ -1104,9 +1104,14 @@ private void openPopupPlayer(final boolean append) {
1104
1104
}
1105
1105
}
1106
1106
1107
+ /**
1108
+ * Opens the video player, in fullscreen if needed. In order to open fullscreen, the activity
1109
+ * is toggled to landscape orientation (which will then cause fullscreen mode).
1110
+ *
1111
+ * @param directlyFullscreenIfApplicable whether to open fullscreen if we are not already
1112
+ * in landscape and screen orientation is locked
1113
+ */
1107
1114
public void openVideoPlayer (final boolean directlyFullscreenIfApplicable ) {
1108
- // Toggle to landscape orientation (which will then cause fullscreen mode) if we are not
1109
- // already in landscape and screen orientation is locked.
1110
1115
if (directlyFullscreenIfApplicable
1111
1116
&& !DeviceUtils .isLandscape (requireContext ())
1112
1117
&& PlayerHelper .globalScreenOrientationLocked (requireContext ())) {
@@ -1130,9 +1135,15 @@ public void openVideoPlayer(final boolean directlyFullscreenIfApplicable) {
1130
1135
}
1131
1136
}
1132
1137
1138
+ /**
1139
+ * If the option to start directly fullscreen is enabled, calls
1140
+ * {@link #openVideoPlayer(boolean)} with {@code directlyFullscreenIfApplicable = true}, so that
1141
+ * if the user is not already in landscape and he has screen orientation locked the activity
1142
+ * rotates and fullscreen starts. Otherwise, if the option to start directly fullscreen is
1143
+ * disabled, calls {@link #openVideoPlayer(boolean)} with {@code directlyFullscreenIfApplicable
1144
+ * = false}, hence preventing it from going directly fullscreen.
1145
+ */
1133
1146
public void openVideoPlayerAutoFullscreen () {
1134
- // if the option to start directly fullscreen is enabled, openVideoPlayer will be called
1135
- // with directlyFullscreenIfApplicable=true and therefore open fullscreen if applicable
1136
1147
openVideoPlayer (PlayerHelper .isStartMainPlayerFullscreenEnabled (requireContext ()));
1137
1148
}
1138
1149
0 commit comments