Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(external-api) allow vh and vw values as parameters

Saúl Ibarra Corretgé631e39d4fdc5
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index 2fe1fcacb3..3f77ed5ca4 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -273,10 +273,10 @@ function parseArguments(args) {
function parseSizeParam(value) {
let parsedValue;
- // This regex parses values of the form 100px, 100em, 100pt or 100%.
+ // This regex parses values of the form 100px, 100em, 100pt, 100vh, 100vw or 100%.
// Values like 100 or 100px are handled outside of the regex, and
// invalid values will be ignored and the minimum will be used.
- const re = /([0-9]*\.?[0-9]+)(em|pt|px|%)$/;
+ const re = /([0-9]*\.?[0-9]+)(em|pt|px|((d|l|s)?v)(h|w)|%)$/;
if (typeof value === 'string' && String(value).match(re) !== null) {
parsedValue = value;