From 4323ffbb4e981922ab6ac6098d21a334bffeaf7b Mon Sep 17 00:00:00 2001 From: Shalabh Agarwal Date: Wed, 21 May 2025 09:50:02 +0530 Subject: [PATCH] update allowfullscreen property --- client/src/root-helpers/video.ts | 4 ++-- packages/tests/src/api/server/services.ts | 8 ++++---- server/core/controllers/services.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/root-helpers/video.ts b/client/src/root-helpers/video.ts index 2999f0e40..bc06aed2b 100644 --- a/client/src/root-helpers/video.ts +++ b/client/src/root-helpers/video.ts @@ -14,8 +14,8 @@ export function buildVideoOrPlaylistEmbed (options: { iframe.width = responsive ? '100%' : '560' iframe.height = responsive ? '100%' : '315' iframe.src = embedUrl - iframe.frameBorder = '0' - iframe.allowFullscreen = true + iframe.style.border = 'none' + iframe.allow = 'fullscreen' iframe.sandbox.add('allow-same-origin', 'allow-scripts', 'allow-popups', 'allow-forms') if (responsive) { diff --git a/packages/tests/src/api/server/services.ts b/packages/tests/src/api/server/services.ts index c6074f25c..0e47cc9e9 100644 --- a/packages/tests/src/api/server/services.ts +++ b/packages/tests/src/api/server/services.ts @@ -80,7 +80,7 @@ describe('Test services', function () { const res = await server.services.getOEmbed({ oembedUrl }) const expectedHtml = '' + 'style="border:none" allow="fullscreen">' const expectedThumbnailUrl = 'http://' + server.host + video.previewPath @@ -104,7 +104,7 @@ describe('Test services', function () { const res = await server.services.getOEmbed({ oembedUrl }) const expectedHtml = '' + 'style="border:none" allow="fullscreen">' expect(res.body.html).to.equal(expectedHtml) expect(res.body.title).to.equal('The Life and Times of Scrooge McDuck') @@ -125,7 +125,7 @@ describe('Test services', function () { const expectedHtml = '' + 'style="border:none" allow="fullscreen">' expect(res.body.html).to.equal(expectedHtml) }) @@ -140,7 +140,7 @@ describe('Test services', function () { const res = await server.services.getOEmbed({ oembedUrl, format, maxHeight, maxWidth }) const expectedHtml = '' + 'style="border:none" allow="fullscreen">' expect(res.body.html).to.equal(expectedHtml) expect(res.body.title).to.equal(video.name) diff --git a/server/core/controllers/services.ts b/server/core/controllers/services.ts index a5a457b0d..a1b4c7ffb 100644 --- a/server/core/controllers/services.ts +++ b/server/core/controllers/services.ts @@ -137,7 +137,7 @@ function buildOEmbed (options: { } const html = `` + `title="${embedTitle}" src="${embedUrl}" style="border:none" allow="fullscreen">` const json: any = { type: 'video',