mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 01:39:37 +02:00
update allowfullscreen property
This commit is contained in:
parent
ff400224c2
commit
4323ffbb4e
3 changed files with 7 additions and 7 deletions
|
@ -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) {
|
||||
|
|
|
@ -80,7 +80,7 @@ describe('Test services', function () {
|
|||
const res = await server.services.getOEmbed({ oembedUrl })
|
||||
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ' +
|
||||
`title="${video.name}" src="http://${server.host}/videos/embed/${video.shortUUID}${suffix.output}" ` +
|
||||
'frameborder="0" allowfullscreen></iframe>'
|
||||
'style="border:none" allow="fullscreen"></iframe>'
|
||||
|
||||
const expectedThumbnailUrl = 'http://' + server.host + video.previewPath
|
||||
|
||||
|
@ -104,7 +104,7 @@ describe('Test services', function () {
|
|||
const res = await server.services.getOEmbed({ oembedUrl })
|
||||
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ' +
|
||||
`title="${playlistDisplayName}" src="http://${server.host}/video-playlists/embed/${playlistShortUUID}${suffix.output}" ` +
|
||||
'frameborder="0" allowfullscreen></iframe>'
|
||||
'style="border:none" allow="fullscreen"></iframe>'
|
||||
|
||||
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 = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ' +
|
||||
`title="${video.name}" src="http://${server.host}/videos/embed/${video.shortUUID}${query}" ` +
|
||||
'frameborder="0" allowfullscreen></iframe>'
|
||||
'style="border:none" allow="fullscreen"></iframe>'
|
||||
|
||||
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 = '<iframe width="50" height="50" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ' +
|
||||
`title="${video.name}" src="http://${server.host}/videos/embed/${video.shortUUID}" ` +
|
||||
'frameborder="0" allowfullscreen></iframe>'
|
||||
'style="border:none" allow="fullscreen"></iframe>'
|
||||
|
||||
expect(res.body.html).to.equal(expectedHtml)
|
||||
expect(res.body.title).to.equal(video.name)
|
||||
|
|
|
@ -137,7 +137,7 @@ function buildOEmbed (options: {
|
|||
}
|
||||
|
||||
const html = `<iframe width="${embedWidth}" height="${embedHeight}" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ` +
|
||||
`title="${embedTitle}" src="${embedUrl}" frameborder="0" allowfullscreen></iframe>`
|
||||
`title="${embedTitle}" src="${embedUrl}" style="border:none" allow="fullscreen"></iframe>`
|
||||
|
||||
const json: any = {
|
||||
type: 'video',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue