зеркало из https://github.com/nextcloud/spreed.git
Unify the initial audio and video settings with and without local media
When "startWithoutLocalMedia" is called there is never audio nor video (otherwise "startLocalMedia" would have been called instead), so there is no need to call "isAudioEnabled" nor "isVideoEnabled". Moreover, "initAudioVideoSettings" performs the same setup as the custom handling in "startWithoutLocalMedia", so that custom handling can be replaced by a call to "initAudioVideoSettings". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Родитель
a4e0a6e2e8
Коммит
6ed774e1f3
13
js/app.js
13
js/app.js
|
@ -787,23 +787,14 @@
|
|||
|
||||
localMediaChannel.trigger('startLocalMedia');
|
||||
},
|
||||
startWithoutLocalMedia: function(isAudioEnabled, isVideoEnabled) {
|
||||
startWithoutLocalMedia: function(configuration) {
|
||||
if (this.callbackAfterMedia) {
|
||||
this.callbackAfterMedia(null);
|
||||
this.callbackAfterMedia = null;
|
||||
}
|
||||
|
||||
$('.videoView').removeClass('hidden');
|
||||
|
||||
this.disableAudio();
|
||||
if (!isAudioEnabled) {
|
||||
this.hasNoAudio();
|
||||
}
|
||||
|
||||
this.disableVideo();
|
||||
if (!isVideoEnabled) {
|
||||
this.hasNoVideo();
|
||||
}
|
||||
this.initAudioVideoSettings(configuration);
|
||||
|
||||
if (OCA.SpreedMe.webrtc.capabilities.support) {
|
||||
localMediaChannel.trigger('startWithoutLocalMedia');
|
||||
|
|
|
@ -1024,7 +1024,7 @@ var spreedPeerConnectionTable = [];
|
|||
console.log('Error while accessing microphone & camera: ', error.message || error.name);
|
||||
}
|
||||
|
||||
app.startWithoutLocalMedia(webrtc.webrtc.isAudioEnabled(), webrtc.webrtc.isVideoEnabled());
|
||||
app.startWithoutLocalMedia({audio: false, video: false});
|
||||
OC.Notification.show(message, {
|
||||
type: 'error',
|
||||
timeout: 15,
|
||||
|
|
Загрузка…
Ссылка в новой задаче