瀏覽代碼

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 年之前
父節點
當前提交
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'

Loading…
取消
儲存