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>2022-08-04 09:38:20 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2022-08-04 09:43:59 +0300
commitf00c1b25c365a47dbaac49ed36526806cd8f3d74 (patch)
tree6432060fa4430ee56e56e347ab88040c99108689
parentb604d1512b8425468e4c6ff4c4d5297752dce2d9 (diff)
fixup! Enforce zero-information-content video tracksenforce-zero-information-content-video-tracks
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--src/utils/media/pipeline/BlackVideoEnforcer.js2
-rw-r--r--src/utils/media/pipeline/BlackVideoEnforcer.spec.js15
2 files changed, 13 insertions, 4 deletions
diff --git a/src/utils/media/pipeline/BlackVideoEnforcer.js b/src/utils/media/pipeline/BlackVideoEnforcer.js
index 21c53a2c7..76dcd3af8 100644
--- a/src/utils/media/pipeline/BlackVideoEnforcer.js
+++ b/src/utils/media/pipeline/BlackVideoEnforcer.js
@@ -118,7 +118,7 @@ export default class BlackVideoEnforcer extends TrackSinkSource {
this._outputStream = outputCanvasElement.captureStream()
- outputCanvasContext.fillStyle = "black"
+ outputCanvasContext.fillStyle = 'black'
outputCanvasContext.fillRect(0, 0, outputCanvasElement.width, outputCanvasElement.height)
// Sometimes Chromium does not render one or more frames to the stream
diff --git a/src/utils/media/pipeline/BlackVideoEnforcer.spec.js b/src/utils/media/pipeline/BlackVideoEnforcer.spec.js
index f60444e9a..70c20f1da 100644
--- a/src/utils/media/pipeline/BlackVideoEnforcer.spec.js
+++ b/src/utils/media/pipeline/BlackVideoEnforcer.spec.js
@@ -108,7 +108,7 @@ describe('BlackVideoEnforcer', () => {
}),
}
})
- }
+ }()
})
})
@@ -146,9 +146,18 @@ describe('BlackVideoEnforcer', () => {
const STOPPED = true
+ /**
+ * Checks that a black video track has the expected attributes.
+ *
+ * @param {number} index the index of the black video track to check.
+ * @param {number} width the expected width of the black video track.
+ * @param {number} height the expected height of the black video track.
+ * @param {boolean} stopped whether the black video track is expected to
+ * have been stopped already or not.
+ */
function assertBlackVideoTrack(index, width, height, stopped = false) {
- expect(blackVideoTracks[index].getSettings()['width']).toBe(width)
- expect(blackVideoTracks[index].getSettings()['height']).toBe(height)
+ expect(blackVideoTracks[index].getSettings().width).toBe(width)
+ expect(blackVideoTracks[index].getSettings().height).toBe(height)
expect(blackVideoTracks[index].stop).toHaveBeenCalledTimes(stopped ? 1 : 0)
}