Browse Source

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 years ago
parent
commit
17ae89a56c
1 changed files with 4 additions and 8 deletions
  1. 4
    8
      react/features/mobile/picture-in-picture/actions.js

+ 4
- 8
react/features/mobile/picture-in-picture/actions.js View File

21
         const state = getState();
21
         const state = getState();
22
         const { app } = state['features/app'];
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
             const { PictureInPicture } = NativeModules;
28
             const { PictureInPicture } = NativeModules;
33
             const p
29
             const p
34
                 = Platform.OS === 'android'
30
                 = Platform.OS === 'android'

Loading…
Cancel
Save