Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 (#13196)
* Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 * CHANGELOG
This commit is contained in:
parent
52bf808d89
commit
82c34f7f45
3 changed files with 30 additions and 1 deletions
|
@ -116,6 +116,34 @@ describe('MkUrlPreview', () => {
|
|||
assert.strictEqual(iframe?.allow, 'fullscreen;web-share');
|
||||
});
|
||||
|
||||
test('A Summaly proxy response without allow falls back to the default', async () => {
|
||||
const iframe = await renderAndOpenPreview({
|
||||
url: 'https://example.local',
|
||||
player: {
|
||||
url: 'https://example.local/player',
|
||||
width: null,
|
||||
height: null,
|
||||
allow: undefined as any,
|
||||
},
|
||||
});
|
||||
assert.exists(iframe, 'iframe should exist');
|
||||
assert.strictEqual(iframe?.allow, 'autoplay;encrypted-media;fullscreen');
|
||||
});
|
||||
|
||||
test('Filtering the allow list from the Summaly proxy', async () => {
|
||||
const iframe = await renderAndOpenPreview({
|
||||
url: 'https://example.local',
|
||||
player: {
|
||||
url: 'https://example.local/player',
|
||||
width: null,
|
||||
height: null,
|
||||
allow: ['autoplay', 'camera', 'fullscreen'],
|
||||
},
|
||||
});
|
||||
assert.exists(iframe, 'iframe should exist');
|
||||
assert.strictEqual(iframe?.allow, 'autoplay;fullscreen');
|
||||
});
|
||||
|
||||
test('Having a player width should keep the fixed aspect ratio', async () => {
|
||||
const iframe = await renderAndOpenPreview({
|
||||
url: 'https://example.local',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue