Browse Source

feat(p2p): enable H.264 for P2P by default

On mobile we got the extra step of overriding the option and always set it to
true.
master
Saúl Ibarra Corretgé 8 years ago
parent
commit
8a3cec4a9d
2 changed files with 10 additions and 11 deletions
  1. 1
    1
      config.js
  2. 9
    10
      react/features/base/conference/actions.js

+ 1
- 1
config.js View File

102
         ],
102
         ],
103
         // If set to true, it will prefer to use H.264 for P2P calls (if H.264
103
         // If set to true, it will prefer to use H.264 for P2P calls (if H.264
104
         // is supported).
104
         // is supported).
105
-        preferH264: false
105
+        preferH264: true
106
         // How long we're going to wait, before going back to P2P after
106
         // How long we're going to wait, before going back to P2P after
107
         // the 3rd participant has left the conference (to filter out page reload)
107
         // the 3rd participant has left the conference (to filter out page reload)
108
         //backToP2PDelay: 5
108
         //backToP2PDelay: 5

+ 9
- 10
react/features/base/conference/actions.js View File

1
+import _ from 'lodash';
1
 import { JitsiConferenceEvents } from '../lib-jitsi-meet';
2
 import { JitsiConferenceEvents } from '../lib-jitsi-meet';
2
 import { setVideoMuted } from '../media';
3
 import { setVideoMuted } from '../media';
3
 import {
4
 import {
255
         dispatch(_conferenceWillJoin(room));
256
         dispatch(_conferenceWillJoin(room));
256
 
257
 
257
         const config = state['features/base/config'];
258
         const config = state['features/base/config'];
259
+        const configOverride = {
260
+            p2p: {
261
+                preferH264: true
262
+            }
263
+        };
258
         const conference
264
         const conference
259
             = connection.initJitsiConference(
265
             = connection.initJitsiConference(
260
 
266
 
261
                 // XXX Lib-jitsi-meet does not accept uppercase letters.
267
                 // XXX Lib-jitsi-meet does not accept uppercase letters.
262
                 room.toLowerCase(),
268
                 room.toLowerCase(),
263
-                {
264
-                    ...config,
265
-
266
-                    openSctp: true
267
 
269
 
268
-                    // FIXME I tested H.264 from iPhone 6S during a morning
269
-                    // standup but, unfortunately, the other participants who
270
-                    // happened to be running the Web app saw only black.
271
-                    //
272
-                    // preferH264: true
273
-                });
270
+                // We use lodash's merge here because it will recursively merge
271
+                // objects allowing partial overrides.
272
+                _.merge({}, config, configOverride));
274
 
273
 
275
         _addConferenceListeners(conference, dispatch);
274
         _addConferenceListeners(conference, dispatch);
276
 
275
 

Loading…
Cancel
Save