This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push:
new 8a2b96d [OPENMEETINGS-1649] mic gain in Edge and dashboard security
errors should be fixed
8a2b96d is described below
commit 8a2b96d6eae6235085f220c2aef64a615eb69dc0
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Tue Oct 9 12:47:29 2018 +0700
[OPENMEETINGS-1649] mic gain in Edge and dashboard security errors should
be fixed
---
.../java/org/apache/openmeetings/web/room/raw-video.js | 18 ++++++------------
.../openmeetings/web/util/UserDashboardPersister.java | 2 +-
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
index 2a24c8e..1a14d3c 100644
---
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
+++
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
@@ -2,7 +2,7 @@
var Video = (function() {
const self = {};
let c, v, vc, t, f, size, vol, slider, handle, video, rtcPeer
- , lastVolume = 50, aCtx, aSrc, aDest, gainNode
+ , lastVolume = 50, aCtx, aSrc, gainNode
, lm, level, userSpeaks = false;
function _getName() {
@@ -48,7 +48,6 @@ var Video = (function() {
const constraints = VideoSettings.constraints(c);
navigator.mediaDevices.getUserMedia(constraints)
.then(function(stream) {
- let _stream = stream;
if (stream.getAudioTracks().length !== 0) {
vol.show();
lm = vc.find('.level-meter')
@@ -57,18 +56,13 @@ var Video = (function() {
aCtx = new AudioContext();
gainNode = aCtx.createGain();
aSrc =
aCtx.createMediaStreamSource(stream);
- aDest =
aCtx.createMediaStreamDestination();
aSrc.connect(gainNode);
- gainNode.connect(aDest);
- _stream = aDest.stream;
-
stream.getVideoTracks().forEach(function(track) {
- _stream.addTrack(track);
- });
+ gainNode.connect(aCtx.destination);
_handleVolume(lastVolume);
}
const options = VideoUtil.addIceServers({
localVideo: video[0]
- , videoStream: _stream
+ , videoStream: stream
, mediaConstraints: constraints
, onicecandidate: self.onIceCandidate
}, msg);
@@ -362,10 +356,10 @@ var Video = (function() {
VideoUtil.cleanStream(aSrc.mediaStream);
aSrc.disconnect();
}
- if (!!aDest) {
- aDest.disconnect();
- }
if (!!aCtx) {
+ if (!!aCtx.destination) {
+ aCtx.destination.disconnect();
+ }
aCtx.close();
aCtx = null;
}
diff --git
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/UserDashboardPersister.java
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/UserDashboardPersister.java
index cc58b48..5b468ed 100644
---
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/UserDashboardPersister.java
+++
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/UserDashboardPersister.java
@@ -67,8 +67,8 @@ public class UserDashboardPersister implements
DashboardPersister {
xstream.addPermission(NoTypePermission.NONE);
xstream.addPermission(NullPermission.NULL);
xstream.addPermission(PrimitiveTypePermission.PRIMITIVES);
+ xstream.allowTypesByWildcard(new String[]
{"org.apache.openmeetings.web.**"});
xstream.allowTypeHierarchy(ArrayList.class);
- xstream.allowTypeHierarchy(UserDashboard.class);
xstream.alias("dashboard", UserDashboard.class);
}