mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 1223696 - Make canvas captureStream helper resilient to exceptions when there's no video. r=roc
--HG-- extra : commitid : FAzUHddlKxp extra : rebase_source : cdd127adc5352c464675635626274fc0d0da2c0e
This commit is contained in:
parent
ddc78c3b0c
commit
efff11f482
@ -97,7 +97,12 @@ CaptureStreamTestHelper.prototype = {
|
||||
const startTime = video.currentTime;
|
||||
CaptureStreamTestHelper2D.prototype.clear.call(this, this.cout);
|
||||
var ontimeupdate = () => {
|
||||
const pixelMatch = test(this.getPixel(video, offsetX, offsetY));
|
||||
var pixelMatch = false;
|
||||
try {
|
||||
pixelMatch = test(this.getPixel(video, offsetX, offsetY));
|
||||
} catch (NS_ERROR_NOT_AVAILABLE) {
|
||||
info("Waiting for pixel but no video available");
|
||||
}
|
||||
if (!pixelMatch &&
|
||||
(!timeout || video.currentTime < startTime + (timeout / 1000.0))) {
|
||||
// No match yet and,
|
||||
|
Loading…
x
Reference in New Issue
Block a user