Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-11-23 22:03:15 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-11-24 13:54:04 +0300
commitfc67d9b3c0d92a34a0e9d19aeec3757565d44c9d (patch)
treea3d7b530fa03163d5f7a5d8f7869c07bda536ad9
parentf1d239d565e69749435a5240763b9cb1c00bf04d (diff)
Fix media never requested again when changing again to current device
When the MediaDevicesSource node is active and a media device changes the current stream is replaced by a stream from the new selected device. This is an asynchronous operation, so changing the stream again on further device changes is deferred until the previous one finished. However, when the changed device was the same as the current device (which should not happen, although it could potentially happen with a specific sequence of "devicechange" events emitted by the browser) the pending request count was not cleared and thus any further device change was ignored until the page was reloaded. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--src/utils/media/pipeline/MediaDevicesSource.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/media/pipeline/MediaDevicesSource.js b/src/utils/media/pipeline/MediaDevicesSource.js
index 948e56ecf..94457bc65 100644
--- a/src/utils/media/pipeline/MediaDevicesSource.js
+++ b/src/utils/media/pipeline/MediaDevicesSource.js
@@ -236,6 +236,8 @@ export default class MediaDevicesSource extends TrackSource {
if (this.getOutputTrack('audio')) {
const settings = this.getOutputTrack('audio').getSettings()
if (settings && settings.deviceId === audioInputId) {
+ resetPendingAudioInputIdChangedCount()
+
return
}
}
@@ -297,6 +299,8 @@ export default class MediaDevicesSource extends TrackSource {
if (this.getOutputTrack('video')) {
const settings = this.getOutputTrack('video').getSettings()
if (settings && settings.deviceId === videoInputId) {
+ resetPendingVideoInputIdChangedCount()
+
return
}
}