Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
1673 esurio
Sharkey
Commits
82c34f7f
Unverified
Commit
82c34f7f
authored
1 year ago
by
MeiMei
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 (#13196)
* Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 * CHANGELOG
parent
52bf808d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
packages/frontend/src/components/MkUrlPreview.vue
+1
-1
1 addition, 1 deletion
packages/frontend/src/components/MkUrlPreview.vue
packages/frontend/test/url-preview.test.ts
+28
-0
28 additions, 0 deletions
packages/frontend/test/url-preview.test.ts
with
30 additions
and
1 deletion
CHANGELOG.md
+
1
−
0
View file @
82c34f7f
...
...
@@ -74,6 +74,7 @@
-
Fix: プロフィールを編集してもリロードするまで反映されない問題を修正
-
Fix: エラー画像URLを設定した後解除すると,デフォルトの画像が表示されない問題の修正
-
Fix: MkCodeEditorで行がずれていってしまう問題の修正
-
Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 #13196
### Server
-
Enhance: 連合先のレートリミットに引っかかった際にリトライするようになりました
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/components/MkUrlPreview.vue
+
1
−
1
View file @
82c34f7f
...
...
@@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
v-if=
"player.url.startsWith('http://') || player.url.startsWith('https://')"
sandbox=
"allow-popups allow-scripts allow-storage-access-by-user-activation allow-same-origin"
scrolling=
"no"
:allow=
"player.allow.join(';')"
:allow=
"player.allow
== null ? 'autoplay;encrypted-media;fullscreen' : player.allow.filter(x => ['autoplay', 'clipboard-write', 'fullscreen', 'encrypted-media', 'picture-in-picture', 'web-share'].includes(x))
.join(';')"
:class=
"$style.playerIframe"
:src=
"player.url + (player.url.match(/\?/) ? '&autoplay=1&auto_play=1' : '?autoplay=1&auto_play=1')"
:style=
"
{ border: 0 }"
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/test/url-preview.test.ts
+
28
−
0
View file @
82c34f7f
...
...
@@ -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
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment