Tweak watermark tamper detection
This commit is contained in:
parent
30fabd33ba
commit
e7a099895a
|
@ -177,12 +177,15 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for CSS hacking: this looks at the computed style, so only check if the top-level VideoFeed is not hidden.
|
// Check for CSS hacking: this looks at the computed style, so only check if the top-level VideoFeed is not hidden.
|
||||||
|
// TODO: this may generate false positives on some browsers, more testing needed.
|
||||||
try {
|
try {
|
||||||
if ($container.style.display !== "none") {
|
if ($container.style.display !== "none") {
|
||||||
if (isInvisible($watermark) || isInvisible($smallImage) || isInvisible($layer)) {
|
if (isInvisible($watermark) || isInvisible($smallImage) || isInvisible($layer)) {
|
||||||
this.onWatermarkRemoved();
|
console.error("Watermark CSS appears hidden");
|
||||||
|
// this.onWatermarkRemoved();
|
||||||
} else if (isImageMissing($watermark) || isImageMissing($smallImage)) {
|
} else if (isImageMissing($watermark) || isImageMissing($smallImage)) {
|
||||||
this.onWatermarkRemoved();
|
console.error("Watermark img src appears missing");
|
||||||
|
// this.onWatermarkRemoved();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user