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 a6cc817 [OPENMEETINGS-1649] small improvements on settings dialog
a6cc817 is described below
commit a6cc81710f3e34af98440a114770d73764cd52a9
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Mon Mar 12 23:26:55 2018 +0700
[OPENMEETINGS-1649] small improvements on settings dialog
---
.../org/apache/openmeetings/web/room/settings.js | 28 +++++++++++++---------
.../java/org/apache/openmeetings/web/room/video.js | 4 +++-
2 files changed, 20 insertions(+), 12 deletions(-)
diff --git
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
index b2d6a52..d858ea0 100644
---
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
+++
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
@@ -18,16 +18,16 @@ var VideoSettings = (function() {
VideoManager.refresh(o.uid, s.video);
}
}
- function _clear() {
- if (vid.length === 1) {
- const ms = vid[0].srcObject;
- if (ms !== null && 'function' ===
typeof(ms.getAudioTracks)) {
- ms.getAudioTracks().forEach(function(track) {
- track.stop();
- });
- ms.getVideoTracks().forEach(function(track) {
- track.stop();
- });
+ function _clear(_ms) {
+ const ms = _ms || (vid.length === 1 ? vid[0].srcObject : null);
+ if (ms !== null && 'function' === typeof(ms.getAudioTracks)) {
+ ms.getAudioTracks().forEach(function(track) {
+ track.stop();
+ });
+ ms.getVideoTracks().forEach(function(track) {
+ track.stop();
+ });
+ if (vid.length === 1) {
vid[0].srcObject = null;
}
}
@@ -74,6 +74,9 @@ var VideoSettings = (function() {
}
}
]
+ , close: function() {
+ _clear();
+ }
});
lm.progressbar({ value: 0 });
o.width = 300;
@@ -167,11 +170,13 @@ var VideoSettings = (function() {
mic.find('option[value!="-1"]').remove();
navigator.mediaDevices.getUserMedia({video:true, audio:true})
.then(function(stream) {
- return navigator.mediaDevices.enumerateDevices()
+ const devices =
navigator.mediaDevices.enumerateDevices()
.then(function(devices) {
return devices;
})
.catch(function(err) { throw err; });
+ _clear(stream);
+ return devices;
})
.then(function(devices) {
let cCount = 0, mCount = 0;
@@ -219,6 +224,7 @@ var VideoSettings = (function() {
function _open() {
recAllowed = false;
vs.dialog('open');
+ _load();
_initDevices();
}
return {
diff --git
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js
index af9bba7..5f6af9e 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js
@@ -198,7 +198,9 @@ var Video = (function() {
o.type = c.type;
delete o.keycode;
- video = $('<video>').attr('id', 'vid' +
_id).width(o.width).height(o.height)
+ video = $('<video>').attr('id', 'vid' + _id)
+ .attr('poster', 'profile/' + o.userId + '?anti=' + new
Date().time) //TODO add normal URL
+ .width(o.width).height(o.height)
.prop('autoplay', true).prop('controls', false);
vc.append(video);
--
To stop receiving notification emails like this one, please contact
[email protected].