Skip to content

Commit

Permalink
Update embed youtube markup (#1462)
Browse files Browse the repository at this point in the history
* Update embed youtube player

* Add SECURE_REFERRER_POLICY to dev settings, bump version to dev2
  • Loading branch information
rafalp committed Mar 10, 2023
1 parent 9e8353e commit e57b6b4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions devproject/settings.py
Expand Up @@ -238,6 +238,8 @@

ROOT_URLCONF = "devproject.urls"

SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin"

SOCIAL_AUTH_STRATEGY = "misago.socialauth.strategy.MisagoStrategy"

SOCIAL_AUTH_PIPELINE = (
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/services/one-box.js
Expand Up @@ -43,15 +43,16 @@ export class OneBox {
swapYoutubePlayer(element, youtube) {
let url = "https://www.youtube.com/embed/"
url += youtube.video
url += "?rel=0"
url += "?feature=oembed"
if (youtube.start) {
url += "&start=" + youtube.start
}

const player = $(
'<iframe class="embed-responsive-item" src="' +
url +
'" allowfullscreen></iframe>'
'<iframe class="embed-responsive-item" frameborder="0" ' +
'src="' + url + '" ' +
'allow="encrypted-media; gyroscope; picture-in-picture" ' +
'allowfullscreen></iframe>'
)
$(element).replaceWith(player)
player.wrap('<div class="embed-responsive embed-responsive-16by9"></div>')
Expand Down
2 changes: 1 addition & 1 deletion misago/__init__.py
@@ -1,5 +1,5 @@
from .plugins.pluginlist import load_plugin_list_if_exists


__version__ = "0.30.0.dev1"
__version__ = "0.30.0.dev2"
__released__ = False
2 changes: 1 addition & 1 deletion misago/static/misago/js/misago.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion misago/static/misago/js/misago.js.map

Large diffs are not rendered by default.

0 comments on commit e57b6b4

Please sign in to comment.