|
@@ -1,15 +1,19 @@
|
1
|
1
|
/* global $, config, JitsiMeetJS */
|
2
|
2
|
import 'jquery';
|
|
3
|
+import { setConfigFromURLParams } from '../../react/features/base/config/functions';
|
3
|
4
|
import { parseURLParams } from '../../react/features/base/util/parseURLParams';
|
4
|
5
|
import { parseURIString } from '../../react/features/base/util/uri';
|
5
|
6
|
|
|
7
|
+setConfigFromURLParams(config, {}, {}, window.location);
|
|
8
|
+
|
6
|
9
|
const params = parseURLParams(window.location, false, 'hash');
|
7
|
10
|
const { isHuman = false } = params;
|
8
|
11
|
const {
|
9
|
|
- localAudio = params['config.startWithAudioMuted'] !== true,
|
10
|
|
- localVideo = params['config.startWithVideoMuted'] !== true,
|
|
12
|
+ localAudio = config.startWithAudioMuted !== true,
|
|
13
|
+ localVideo = config.startWithVideoMuted !== true,
|
11
|
14
|
remoteVideo = isHuman,
|
12
|
|
- remoteAudio = isHuman
|
|
15
|
+ remoteAudio = isHuman,
|
|
16
|
+ autoPlayVideo = config.testing.noAutoPlayVideo !== true
|
13
|
17
|
} = params;
|
14
|
18
|
|
15
|
19
|
const { room: roomName } = parseURIString(window.location.toString());
|
|
@@ -56,7 +60,8 @@ window.APP = {
|
56
|
60
|
localAudio,
|
57
|
61
|
localVideo,
|
58
|
62
|
remoteVideo,
|
59
|
|
- remoteAudio
|
|
63
|
+ remoteAudio,
|
|
64
|
+ autoPlayVideo
|
60
|
65
|
};
|
61
|
66
|
}
|
62
|
67
|
};
|
|
@@ -76,7 +81,7 @@ function onLocalTracks(tracks = []) {
|
76
|
81
|
localTracks = tracks;
|
77
|
82
|
for (let i = 0; i < localTracks.length; i++) {
|
78
|
83
|
if (localTracks[i].getType() === 'video') {
|
79
|
|
- $('body').append(`<video autoplay='1' id='localVideo${i}' />`);
|
|
84
|
+ $('body').append(`<video ${autoPlayVideo ? 'autoplay="1" ' : ''}id='localVideo${i}' />`);
|
80
|
85
|
localTracks[i].attach($(`#localVideo${i}`)[0]);
|
81
|
86
|
} else {
|
82
|
87
|
$('body').append(
|