Просмотр исходного кода

ref(PiP/actions): remove 'is ok to enter PiP' check

Currently enterPictureInPicture action can only be dispatched when
the app is on the conference view and the enter PiP button is displayed,
so no check should be necessary.
master
paweldomas 7 лет назад
Родитель
Сommit
17ae89a56c
1 измененных файлов: 4 добавлений и 8 удалений
  1. 4
    8
      react/features/mobile/picture-in-picture/actions.js

+ 4
- 8
react/features/mobile/picture-in-picture/actions.js Просмотреть файл

@@ -21,14 +21,10 @@ export function enterPictureInPicture() {
21 21
         const state = getState();
22 22
         const { app } = state['features/app'];
23 23
 
24
-        // FIXME We want to be able to enter Picture-in-Picture as soon as we
25
-        // are on the Conference page i.e. even before `joining` was set in the
26
-        // reducer.
27
-        const { conference, joining } = state['features/base/conference'];
28
-
29
-        if (app
30
-                && app.props.pictureInPictureEnabled
31
-                && (conference || joining)) {
24
+        // XXX At the time of this writing this action can only be dispatched by
25
+        // the button which is on the conference view, which means that it's
26
+        // fine to enter PiP mode.
27
+        if (app && app.props.pictureInPictureEnabled) {
32 28
             const { PictureInPicture } = NativeModules;
33 29
             const p
34 30
                 = Platform.OS === 'android'

Загрузка…
Отмена
Сохранить